@debridge-finance/solana-utils 6.1.2 → 6.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13046,15 +13046,22 @@ function getTokenInfo(connection_1, tokenAddress_1) {
13046
13046
  }
13047
13047
  }
13048
13048
  }
13049
- if (!pdaAccount || pdaAccount.lamports === 0) {
13050
- return null;
13051
- }
13052
13049
  // parse token account
13053
13050
  // mint_authority - coption(pubkey) = 36
13054
13051
  // supply - u64 = 8
13055
13052
  // decimals - u8
13056
13053
  const decimalsOffset = 44;
13057
13054
  const decimals = tokenAccount.data[decimalsOffset];
13055
+ if (!pdaAccount || pdaAccount.lamports === 0) {
13056
+ return {
13057
+ address: tokenAddress,
13058
+ decimals,
13059
+ name: "",
13060
+ symbol: "",
13061
+ json: "",
13062
+ tokenProgram: tokenAccount.owner,
13063
+ };
13064
+ }
13058
13065
  const { name, symbol, uri } = decodeMetaplexMetadataPartial(pdaAccount.data);
13059
13066
  return {
13060
13067
  address: tokenAddress,