-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: sip10 tokens ledger send form, closes #4491
- Loading branch information
1 parent
642e08a
commit 1bd7837
Showing
5 changed files
with
45 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/app/features/asset-list/components/stacks-ledger-assets.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { useStxBalance } from '@app/common/hooks/balance/stx/use-stx-balance'; | ||
import { CryptoCurrencyAssetItem } from '@app/components/crypto-assets/crypto-currency-asset/crypto-currency-asset-item'; | ||
import { StxAvatar } from '@app/components/crypto-assets/stacks/components/stx-avatar'; | ||
import { useStacksFungibleTokenAssetBalancesAnchoredWithMetadata } from '@app/query/stacks/balance/stacks-ft-balances.hooks'; | ||
import { useCurrentStacksAccount } from '@app/store/accounts/blockchain/stacks/stacks-account.hooks'; | ||
import { useHasStacksLedgerKeychain } from '@app/store/accounts/blockchain/stacks/stacks.hooks'; | ||
|
||
import { ConnectLedgerAssetBtn } from './connect-ledger-asset-button'; | ||
import { StacksFungibleTokenAssetList } from './stacks-fungible-token-asset-list'; | ||
|
||
export function StacksLedgerAssetsList() { | ||
const hasStacksKeys = useHasStacksLedgerKeychain(); | ||
const currentAccount = useCurrentStacksAccount(); | ||
const { stxEffectiveBalance, stxEffectiveUsdBalance } = useStxBalance(); | ||
const stacksFtAssetBalances = useStacksFungibleTokenAssetBalancesAnchoredWithMetadata( | ||
currentAccount?.address || '' | ||
); | ||
return ( | ||
<> | ||
<CryptoCurrencyAssetItem | ||
assetBalance={stxEffectiveBalance} | ||
usdBalance={stxEffectiveUsdBalance} | ||
icon={<StxAvatar />} | ||
address={currentAccount?.address || ''} | ||
rightElement={hasStacksKeys ? undefined : <ConnectLedgerAssetBtn chain="stacks" />} | ||
/> | ||
<StacksFungibleTokenAssetList assetBalances={stacksFtAssetBalances} /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters