From a66cd107d46e3b5de58dee0ec06f5cbe1965974f Mon Sep 17 00:00:00 2001 From: tomiir Date: Wed, 27 Nov 2024 16:53:23 +0100 Subject: [PATCH] chore: adjust tabs --- packages/common/src/utils/ConstantsUtil.ts | 3 ++- .../src/partials/w3m-account-default-widget/index.ts | 12 +++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/common/src/utils/ConstantsUtil.ts b/packages/common/src/utils/ConstantsUtil.ts index a843f217a1..7289ef1a4b 100644 --- a/packages/common/src/utils/ConstantsUtil.ts +++ b/packages/common/src/utils/ConstantsUtil.ts @@ -9,7 +9,8 @@ export const ConstantsUtil = { CHAIN: { EVM: 'eip155', SOLANA: 'solana', - POLKADOT: 'polkadot' + POLKADOT: 'polkadot', + BITCOIN: 'bip122' } as const satisfies Record, CHAIN_NAME_MAP: { eip155: 'Ethereum', diff --git a/packages/scaffold-ui/src/partials/w3m-account-default-widget/index.ts b/packages/scaffold-ui/src/partials/w3m-account-default-widget/index.ts index d915503c69..0e867c7b5f 100644 --- a/packages/scaffold-ui/src/partials/w3m-account-default-widget/index.ts +++ b/packages/scaffold-ui/src/partials/w3m-account-default-widget/index.ts @@ -132,8 +132,9 @@ export class W3mAccountDefaultWidget extends LitElement { // -- Private ------------------------------------------- // private onrampTemplate() { const onramp = this.features?.onramp + const isBitcoin = ChainController.state.activeChain === 'bip122' - if (!onramp) { + if (!onramp || isBitcoin) { return null } @@ -168,9 +169,9 @@ export class W3mAccountDefaultWidget extends LitElement { private swapsTemplate() { const swaps = this.features?.swaps - const isSolana = ChainController.state.activeChain === ConstantsUtil.CHAIN.SOLANA + const isEvm = ChainController.state.activeChain === ConstantsUtil.CHAIN.EVM - if (!swaps || isSolana) { + if (!swaps || !isEvm) { return null } @@ -302,10 +303,7 @@ export class W3mAccountDefaultWidget extends LitElement { address=${this.address} > AccountController.setCaipAddress( `bip122:${this.chainId}:${this.allAccounts[index]?.address || ''}`,