@b3dotfun/sdk 0.1.70-alpha.19 → 0.1.70-alpha.20

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.
Files changed (50) hide show
  1. package/dist/cjs/anyspend/react/components/AnySpend.js +1 -2
  2. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +4 -9
  3. package/dist/cjs/anyspend/react/components/checkout/CryptoPayPanel.js +2 -3
  4. package/dist/cjs/anyspend/utils/address.d.ts +2 -1
  5. package/dist/cjs/anyspend/utils/address.js +12 -9
  6. package/dist/cjs/global-account/react/utils/createWagmiConfig.d.ts +2 -2
  7. package/dist/cjs/shared/constants/chains/supported.d.ts +4 -4
  8. package/dist/cjs/shared/constants/chains/supported.js +4 -4
  9. package/dist/cjs/shared/utils/zerionPositions.d.ts +3 -3
  10. package/dist/cjs/shared/utils/zerionPositions.js +12 -10
  11. package/dist/cjs/wallet/utils/createWalletConfig.d.ts +2 -2
  12. package/dist/esm/anyspend/react/components/AnySpend.js +2 -3
  13. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +5 -10
  14. package/dist/esm/anyspend/react/components/checkout/CryptoPayPanel.js +3 -4
  15. package/dist/esm/anyspend/utils/address.d.ts +2 -1
  16. package/dist/esm/anyspend/utils/address.js +9 -6
  17. package/dist/esm/global-account/react/utils/createWagmiConfig.d.ts +2 -2
  18. package/dist/esm/shared/constants/chains/supported.d.ts +4 -4
  19. package/dist/esm/shared/constants/chains/supported.js +1 -1
  20. package/dist/esm/shared/utils/zerionPositions.d.ts +3 -3
  21. package/dist/esm/shared/utils/zerionPositions.js +5 -3
  22. package/dist/esm/wallet/utils/createWalletConfig.d.ts +2 -2
  23. package/dist/types/anyspend/utils/address.d.ts +2 -1
  24. package/dist/types/global-account/react/utils/createWagmiConfig.d.ts +2 -2
  25. package/dist/types/shared/constants/chains/supported.d.ts +4 -4
  26. package/dist/types/shared/utils/zerionPositions.d.ts +3 -3
  27. package/dist/types/wallet/utils/createWalletConfig.d.ts +2 -2
  28. package/node_modules/@b3/chain-registry/chains.json +38 -1
  29. package/node_modules/@b3/chain-registry/dist/chains.json +1225 -0
  30. package/node_modules/@b3/chain-registry/dist/index.cjs +1676 -0
  31. package/node_modules/@b3/chain-registry/dist/index.d.cts +195 -0
  32. package/node_modules/@b3/chain-registry/dist/index.d.ts +195 -0
  33. package/node_modules/@b3/chain-registry/dist/index.mjs +1604 -0
  34. package/node_modules/@b3/chain-registry/dist/src/index.d.ts +193 -0
  35. package/node_modules/@b3/chain-registry/dist/src/index.js +408 -0
  36. package/node_modules/@b3/chain-registry/package.json +44 -8
  37. package/node_modules/@b3/chain-registry/src/index.test.ts +432 -0
  38. package/node_modules/@b3/chain-registry/src/index.ts +672 -0
  39. package/package.json +5 -2
  40. package/src/anyspend/react/components/AnySpend.tsx +2 -2
  41. package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +5 -10
  42. package/src/anyspend/react/components/__tests__/QRDeposit.test.tsx +39 -1
  43. package/src/anyspend/react/components/checkout/CryptoPayPanel.tsx +13 -4
  44. package/src/anyspend/services/gas.test.ts +95 -18
  45. package/src/anyspend/utils/__tests__/address.test.ts +39 -0
  46. package/src/anyspend/utils/address.ts +8 -6
  47. package/src/shared/constants/chains/supported.ts +1 -1
  48. package/src/shared/react/hooks/__tests__/useCurrencyConversion.test.ts +54 -43
  49. package/src/shared/utils/__tests__/zerionPositions.test.ts +23 -1
  50. package/src/shared/utils/zerionPositions.ts +6 -3
@@ -1,3 +1,5 @@
1
+ import { SOLANA_NATIVE_ASSET } from "@b3/chain-registry/runtime";
2
+
1
3
  /**
2
4
  * Canonical browser-side translation of Zerion wallet positions into B3 balance rows.
3
5
  *
@@ -13,12 +15,13 @@
13
15
 
14
16
  /** Address B3 uses for a chain's native coin on EVM. Matches NATIVE_TOKEN_ADDRESSES. */
15
17
  export const EVM_NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
16
- export const SOLANA_NATIVE_TOKEN_ADDRESS = "So11111111111111111111111111111111111111112";
17
- export const SOLANA_ZERION_SLUG = "solana";
18
+ export const SOLANA_NATIVE_TOKEN_ADDRESS = SOLANA_NATIVE_ASSET.wrapped
19
+ .address as "So11111111111111111111111111111111111111112";
20
+ export const SOLANA_ZERION_SLUG = SOLANA_NATIVE_ASSET.chain as "solana";
18
21
  /** What Zerion's `quantity.int` is: a base-10 integer, unbounded in length. */
19
22
  const DECIMAL_INTEGER_PATTERN = /^\d+$/;
20
23
  /** Solana's chain id as the chain registry defines it — the id every balance row is keyed by. */
21
- export const SOLANA_CHAIN_ID = 7565164;
24
+ export const SOLANA_CHAIN_ID = SOLANA_NATIVE_ASSET.chainId as 7565164;
22
25
 
23
26
  /**
24
27
  * Zerion chain slug → numeric chain id. Slugs are Zerion's own vocabulary and do not always match