diff --git a/packages/astro-example/src/components/DonateEthers.vue b/packages/astro-example/src/components/DonateEthers.vue index e058f62..dadbf16 100644 --- a/packages/astro-example/src/components/DonateEthers.vue +++ b/packages/astro-example/src/components/DonateEthers.vue @@ -77,7 +77,7 @@ watch(amount, validateAmount) watch( () => [chainId.value, accounts.value, contextAccounts.value] as [number, Array<`0x${string}`>, Array<`0x${string}`>], ([chainId, accounts, contextAccounts]: [number, Array<`0x${string}`>, Array<`0x${string}`>]) => { - walletConnected.value = accounts.length > 0 && contextAccounts.length > 0 + walletConnected.value = accounts.length > 0 && contextAccounts.length > 0 && (chainId === 42 || chainId === 4201) } ) function donate() { diff --git a/packages/astro-example/src/components/DonateViem.lit.ts b/packages/astro-example/src/components/DonateViem.lit.ts index 09d7a40..7956857 100644 --- a/packages/astro-example/src/components/DonateViem.lit.ts +++ b/packages/astro-example/src/components/DonateViem.lit.ts @@ -142,17 +142,17 @@ class DonateWidget extends LitElement { accountsChanged(_accounts: Array<`0x${string}`>) { this.accounts = [..._accounts] - this.walletConnected = this.accounts.length > 0 && this.contextAccounts.length > 0 + this.walletConnected = this.accounts.length > 0 && this.contextAccounts.length > 0 && (this.chainId === lukso.id || this.chainId === luksoTestnet.id) } chainChanged(_chainId: number) { this.chainId = _chainId - this.walletConnected = this.accounts.length > 0 && this.contextAccounts.length > 0 + this.walletConnected = this.accounts.length > 0 && this.contextAccounts.length > 0 && (this.chainId === lukso.id || this.chainId === luksoTestnet.id) } contextAccountsChanged(_accounts: Array<`0x${string}`>) { this.contextAccounts = [..._accounts] - this.walletConnected = this.accounts.length > 0 && this.contextAccounts.length > 0 + this.walletConnected = this.accounts.length > 0 && this.contextAccounts.length > 0 && (this.chainId === lukso.id || this.chainId === luksoTestnet.id) } async donate() {