Skip to content

Commit

Permalink
fix(wallet): Insufficient Balance on Swap (uplift to 1.74.x) (#26432)
Browse files Browse the repository at this point in the history
Uplift of #26409 (squashed) to beta
  • Loading branch information
brave-builds authored Nov 8, 2024
1 parent 4928d7d commit c16a806
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 c16a806

Please sign in to comment.