Skip to content

Commit

Permalink
fix(wallet): Insufficient Balance on Swap
Browse files Browse the repository at this point in the history
  • Loading branch information
Douglashdaniel committed Nov 6, 2024
1 parent c3d6b9b commit 819365d
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions components/brave_wallet_ui/utils/asset-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,13 @@ export const sortNativeAndAndBatAssetsToTop = (

export type GetBlockchainTokenIdArg = Pick<
BraveWallet.BlockchainToken,
'coin' | 'chainId' | 'contractAddress' | 'isErc721' |
'tokenId' | 'isNft' | 'isShielded'
| 'coin'
| 'chainId'
| 'contractAddress'
| 'isErc721'
| 'tokenId'
| 'isNft'
| 'isShielded'
>

/**
Expand All @@ -192,9 +197,13 @@ export const getAssetIdKey = (
) => {
return asset.tokenId
? `${asset.coin}-${asset.contractAddress.toLowerCase()}-${asset.tokenId}-${
asset.chainId}-${asset.isShielded}`
: `${asset.coin}-${asset.contractAddress.toLowerCase()}-${asset.chainId}-${
asset.isShielded}`
asset.chainId
}`
: asset.isShielded
? `${asset.coin}-${asset.contractAddress.toLowerCase()}-${
asset.chainId
}-shielded`
: `${asset.coin}-${asset.contractAddress.toLowerCase()}-${asset.chainId}`
}

export const findTokenByContractAddress = <
Expand Down

0 comments on commit 819365d

Please sign in to comment.