Skip to content

Commit

Permalink
chore: adjust tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomiir committed Nov 27, 2024
1 parent 61c1372 commit a66cd10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 2 additions & 1 deletion packages/common/src/utils/ConstantsUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export const ConstantsUtil = {
CHAIN: {
EVM: 'eip155',
SOLANA: 'solana',
POLKADOT: 'polkadot'
POLKADOT: 'polkadot',
BITCOIN: 'bip122'
} as const satisfies Record<string, ChainNamespace>,
CHAIN_NAME_MAP: {
eip155: 'Ethereum',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -302,10 +303,7 @@ export class W3mAccountDefaultWidget extends LitElement {
address=${this.address}
></wui-avatar>
<wui-tabs
.tabs=${[
{ label: 'Payment', icon: 'extension', platform: 'browser' },
{ label: 'Ordinal', icon: 'extension', platform: 'browser' }
]}
.tabs=${[{ label: 'Payment' }, { label: 'Ordinals' }]}
.onTabChange=${(index: number) =>
AccountController.setCaipAddress(
`bip122:${this.chainId}:${this.allAccounts[index]?.address || ''}`,
Expand Down

0 comments on commit a66cd10

Please sign in to comment.