Skip to content

Commit

Permalink
Merge pull request #265 from bnb-chain/feat/sendConfirmPopup1230
Browse files Browse the repository at this point in the history
fix: Fix solana token check issue
  • Loading branch information
Halibao-Lala authored Jan 7, 2025
2 parents 81ce517 + 7d24bac commit 918c0fc
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions packages/canonical-bridge-sdk/src/debridge/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,23 @@ export class DeBridge {
fromTokenList.status === 'fulfilled' &&
toTokenList.status === 'fulfilled'
) {
const fromToken =
fromTokenList?.value?.data.tokens[fromTokenAddress.toLowerCase()];
const toToken =
toTokenList?.value?.data.tokens[toTokenAddress.toLowerCase()];
const fromTokenAddr =
fromChainType === 'solana'
? fromTokenAddress
: fromTokenAddress.toLowerCase();
const toTokenAddr =
toChainType === 'solana'
? toTokenAddress
: toTokenAddress.toLowerCase();
const fromToken = fromTokenList?.value?.data.tokens[fromTokenAddr];
const toToken = toTokenList?.value?.data.tokens[toTokenAddr];

if (!toToken) {
console.log('Can not find toToken info');
}
if (!fromToken) {
console.log('Can not find fromToken info');
}
if (
!!fromToken &&
fromToken?.address.toLowerCase() === fromTokenAddress.toLowerCase() &&
Expand Down

0 comments on commit 918c0fc

Please sign in to comment.