@silentswap/react 0.0.83 → 0.0.84

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.
@@ -8,17 +8,12 @@ import { getAssociatedTokenAddress } from '@solana/spl-token';
8
8
  import { PublicKey } from '@solana/web3.js';
9
9
  import { useAssetsContext } from './AssetsContext.js';
10
10
  import { usePrices } from '../hooks/usePrices.js';
11
- import { isSolanaAsset, parseSolanaCaip19, isSolanaNativeToken, isSplToken, isEvmNativeToken, isBitcoinAsset, isBitcoinMainnetAsset, SB58_CHAIN_ID_SOLANA_MAINNET, A_VIEM_CHAINS, BITCOIN_CHAIN_ID, } from '@silentswap/sdk';
11
+ import { isSolanaAsset, parseSolanaCaip19, isSolanaNativeToken, isSplToken, isEvmNativeToken, isBitcoinAsset, isBitcoinMainnetAsset, SB58_CHAIN_ID_SOLANA_MAINNET, A_VIEM_CHAINS, BITCOIN_CHAIN_ID, H_RPCS, } from '@silentswap/sdk';
12
12
  const BalancesContext = createContext(undefined);
13
- // Custom RPC endpoints from 0xrpc.io (fast, free, private public RPC)
14
- // Reference: https://0xrpc.io
15
- const CUSTOM_RPC_ENDPOINTS = {
16
- 1: 'https://red-old-fog.quiknode.pro/7a0bdad6750af42fb7fb312cabd90f196594e700/', // Ethereum Mainnet
17
- 10: 'https://cold-white-mountain.optimism.quiknode.pro/dd00719b96a7c719aa6065c476ef928e465c6799/', // Optimism L2 Mainnet
18
- };
19
13
  // Utility: Create viem client with custom RPC endpoints where available
14
+ // Uses H_RPCS from @silentswap/sdk (rpc.ts) as the single source of truth
20
15
  const createViemClient = (chain) => {
21
- const customRpc = CUSTOM_RPC_ENDPOINTS[chain.id];
16
+ const customRpc = H_RPCS[chain.id];
22
17
  const chainWithCustomRpc = customRpc
23
18
  ? {
24
19
  ...chain,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@silentswap/react",
3
3
  "type": "module",
4
- "version": "0.0.83",
4
+ "version": "0.0.84",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -24,8 +24,8 @@
24
24
  "dependencies": {
25
25
  "@bigmi/core": "^0.6.5",
26
26
  "@ensdomains/ensjs": "^4.2.0",
27
- "@silentswap/sdk": "0.0.83",
28
- "@silentswap/ui-kit": "0.0.83",
27
+ "@silentswap/sdk": "0.0.84",
28
+ "@silentswap/ui-kit": "0.0.84",
29
29
  "@solana/codecs-strings": "^5.1.0",
30
30
  "@solana/kit": "^5.1.0",
31
31
  "@solana/rpc": "^5.1.0",