Skip to content

Commit

Permalink
chore: show BRC-20 tokens on ledger, ref #5797
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed Aug 27, 2024
1 parent aafd992 commit bcc40f7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
3 changes: 1 addition & 2 deletions config/wallet-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,5 @@
},
"recoverUninscribedTaprootUtxosFeatureEnabled": true,
"runesEnabled": true,
"swapsEnabled": true,
"brc20SendEnabled": false
"swapsEnabled": true
}
4 changes: 0 additions & 4 deletions config/wallet-config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@
"swapsEnabled": {
"type": "boolean",
"description": "Determines whether or not the swaps feature is enabled"
},
"brc20SendEnabled": {
"type": "boolean",
"description": "Determines whether or not BRC-20 tokens can be sent"
}
},
"$defs": {
Expand Down
16 changes: 5 additions & 11 deletions src/app/features/asset-list/asset-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Stack } from 'leather-styles/jsx';

import { BtcAvatarIcon, StxAvatarIcon } from '@leather.io/ui';

import { useWalletType } from '@app/common/use-wallet-type';
import {
BitcoinNativeSegwitAccountLoader,
BitcoinTaprootAccountLoader,
Expand Down Expand Up @@ -35,7 +34,6 @@ interface AssetListProps {
variant?: AssetListVariant;
}
export function AssetList({ onSelectAsset, variant = 'read-only' }: AssetListProps) {
const { whenWallet } = useWalletType();
const currentAccount = useCurrentStacksAccount();
const isLedger = useHasLedgerKeys();

Expand Down Expand Up @@ -117,15 +115,11 @@ export function AssetList({ onSelectAsset, variant = 'read-only' }: AssetListPro
<BitcoinTaprootAccountLoader current>
{taprootAccount => (
<>
{isReadOnly &&
whenWallet({
software: (
<Brc20TokensLoader>
{tokens => <Brc20TokenAssetList tokens={tokens} variant={variant} />}
</Brc20TokensLoader>
),
ledger: null,
})}
{isReadOnly && (
<Brc20TokensLoader>
{tokens => <Brc20TokenAssetList tokens={tokens} variant={variant} />}
</Brc20TokensLoader>
)}
{isReadOnly && (
<>
<Src20TokensLoader address={nativeSegwitAccount.address}>
Expand Down

0 comments on commit bcc40f7

Please sign in to comment.