From 524a8d6b5cc4d1bf2c7ef3838fc337d71793ba18 Mon Sep 17 00:00:00 2001 From: Luc Date: Tue, 29 Oct 2024 12:38:00 +0000 Subject: [PATCH] Bump --- packages/thorin-core/package.json | 2 +- .../thorin-core/src/components/connect-modal/index.ts | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/thorin-core/package.json b/packages/thorin-core/package.json index 383786d..9ff759c 100644 --- a/packages/thorin-core/package.json +++ b/packages/thorin-core/package.json @@ -1,6 +1,6 @@ { "name": "@ens-tools/thorin-core", - "version": "0.1.4-2", + "version": "0.1.4-3", "type": "module", "main": "./dist/esm/index.js", "types": "./dist/types/index.d.ts", diff --git a/packages/thorin-core/src/components/connect-modal/index.ts b/packages/thorin-core/src/components/connect-modal/index.ts index d9cf0f7..a4880d0 100644 --- a/packages/thorin-core/src/components/connect-modal/index.ts +++ b/packages/thorin-core/src/components/connect-modal/index.ts @@ -159,6 +159,9 @@ export class ThorinConnectModal extends LitElement { `, ]; + @state() + config: Config; + @state() connections: Connection[] = []; @@ -188,13 +191,14 @@ export class ThorinConnectModal extends LitElement { window.addEventListener( 'wagmiConfigChangedThorin', ({ detail }: CustomEvent) => { + this.config = detail; this.updateWagmiState(detail); } ); } override render() { - const wagmiConfig = getWagmiConfig(); + const wagmiConfig = this.config || getWagmiConfig(); const account = wagmiConfig // && wagmiConfig?.state ? getAccount(wagmiConfig) : undefined; @@ -363,7 +367,7 @@ export class ThorinConnectModal extends LitElement { } _connect(connector: Connector) { - const wagmiConfig = getWagmiConfig(); + const wagmiConfig = this.config || getWagmiConfig(); console.log(connector); this.status = 'connecting'; @@ -445,7 +449,7 @@ export class ThorinConnectModal extends LitElement { } disconnect() { - const wagmiConfig = getWagmiConfig(); + const wagmiConfig = this.config || getWagmiConfig(); console.log('Disconnect Requested!'); this.showQR = undefined;