Skip to content

Commit

Permalink
Merge pull request #26409 from brave/fix-wallet-insufficient-balance-…
Browse files Browse the repository at this point in the history
…on-swap

fix(wallet): Insufficient Balance on Swap
  • Loading branch information
Douglashdaniel authored Nov 7, 2024
2 parents 28ef2c0 + d7f01de commit d78c85f
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 d78c85f

Please sign in to comment.