Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix: wallet connect-button update

nirholasacd25406839c
diff --git a/src/wallet/connect-button.js b/src/wallet/connect-button.js
index ff39fa9ba..363675b70 100644
--- a/src/wallet/connect-button.js
+++ b/src/wallet/connect-button.js
@@ -307,9 +307,13 @@ const LABEL_DEFAULTS = {
* @returns {ConnectWalletController}
*/
export function createConnectWalletButton(mountEl, opts = {}) {
+ // Dispose any previous controller on this mount point (handles HMR remounts).
+ mountEl._cwbCtrl?.dispose();
+
const labels = { ...LABEL_DEFAULTS, ...(opts.labels || {}) };
const allowedChainIds = opts.allowedChainIds || DEFAULT_CHAIN_IDS;
const ctrl = new ConnectWalletController({ ...opts, allowedChainIds });
+ mountEl._cwbCtrl = ctrl;
const btn = document.createElement('button');
btn.type = 'button';