@openocean.finance/wallet 1.9.3 → 1.9.5
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.
- package/lib/Chains.js +61 -15
- package/lib/TryWalletConnect/index.js +1 -1
- package/package.json +1 -1
package/lib/Chains.js
CHANGED
|
@@ -23,8 +23,17 @@ var chainObj = {
|
|
|
23
23
|
},
|
|
24
24
|
"solana": {
|
|
25
25
|
compiler: 'SOL',
|
|
26
|
-
chainName: "Solana Mainnet",
|
|
27
|
-
|
|
26
|
+
chainName: "Solana Mainnet",
|
|
27
|
+
blockExplorerUrl: "https://solscan.io/tx/",
|
|
28
|
+
popularToken: ["SOL", "SNY", "USDT", "USDC", "RAY", "STEP"],
|
|
29
|
+
rpcUrls: null,
|
|
30
|
+
nativeCurrency: {
|
|
31
|
+
symbol: "SOL",
|
|
32
|
+
id: "solana",
|
|
33
|
+
address: "So11111111111111111111111111111111111111112",
|
|
34
|
+
decimals: 9,
|
|
35
|
+
gasAmount: 1000000000000000
|
|
36
|
+
}
|
|
28
37
|
},
|
|
29
38
|
"starknet": {
|
|
30
39
|
compiler: 'STARKNET',
|
|
@@ -35,31 +44,37 @@ var chainObj = {
|
|
|
35
44
|
"flow": {
|
|
36
45
|
compiler: 'FLOW',
|
|
37
46
|
chainName: "Flow Mainnet", blockExplorerUrl: "https://flowscan.org/transaction/", popularToken: ["SOL", "SNY", "USDT", "USDC", "RAY", "STEP"],
|
|
38
|
-
rpcUrls: null
|
|
47
|
+
rpcUrls: null,
|
|
48
|
+
nativeCurrency: {}
|
|
39
49
|
},
|
|
40
50
|
"polygon": {
|
|
41
51
|
compiler: 'EVM',
|
|
42
|
-
chainName: "Polygon Mainnet", chainId: 137, blockExplorerUrl: "https://polygonscan.com/tx/", popularToken: ["USDT", "USDC", "MATIC", "AAVE", "DINO", "ADDY", "MIMATIC"],
|
|
52
|
+
chainName: "Polygon Mainnet", chainId: 137, blockExplorerUrl: "https://polygonscan.com/tx/", popularToken: ["USDT", "USDC", "MATIC", "AAVE", "DINO", "ADDY", "MIMATIC"],
|
|
53
|
+
nativeCurrency: { name: "MATIC", symbol: "MATIC", decimals: 18, address: "0x0000000000000000000000000000000000001010" },
|
|
43
54
|
rpcUrls: ["https://polygon.llamarpc.com"]
|
|
44
55
|
},
|
|
45
56
|
"polygon_zkevm": {
|
|
46
57
|
compiler: 'EVM',
|
|
47
|
-
chainName: "Polygon zkEVM", chainId: 1101, blockExplorerUrl: "https://zkevm.polygonscan.com/tx/", popularToken: ["USDT", "USDC", "MATIC", "AAVE", "DINO", "ADDY", "MIMATIC"],
|
|
58
|
+
chainName: "Polygon zkEVM", chainId: 1101, blockExplorerUrl: "https://zkevm.polygonscan.com/tx/", popularToken: ["USDT", "USDC", "MATIC", "AAVE", "DINO", "ADDY", "MIMATIC"],
|
|
59
|
+
nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
|
|
48
60
|
rpcUrls: ["https://rpc.ankr.com/polygon_zkevm"]
|
|
49
61
|
},
|
|
50
62
|
"avax": {
|
|
51
63
|
compiler: 'EVM',
|
|
52
|
-
chainName: "Avalanche", chainId: 43114, blockExplorerUrl: "https://cchain.explorer.avax.network/tx/", popularToken: ["AVAX", "PNG", "DAI.E", "ETH", "WAVAX", "JOE", "QI", "USDC.E"],
|
|
64
|
+
chainName: "Avalanche", chainId: 43114, blockExplorerUrl: "https://cchain.explorer.avax.network/tx/", popularToken: ["AVAX", "PNG", "DAI.E", "ETH", "WAVAX", "JOE", "QI", "USDC.E"],
|
|
65
|
+
nativeCurrency: { name: "AVAX", symbol: "AVAX", decimals: 18, address: "0x0000000000000000000000000000000000000000" },
|
|
53
66
|
rpcUrls: ["https://api.avax.network/ext/bc/C/rpc"]
|
|
54
67
|
},
|
|
55
68
|
"fantom": {
|
|
56
69
|
compiler: 'EVM',
|
|
57
|
-
chainName: "Fantom", chainId: 250, blockExplorerUrl: "https://ftmscan.com/tx/", popularToken: ["ETH", "USDT", "USDC", "SPIRIT", "1INCH", "C98", "FTM", "fUSDT", "MIM", "BOO"],
|
|
70
|
+
chainName: "Fantom", chainId: 250, blockExplorerUrl: "https://ftmscan.com/tx/", popularToken: ["ETH", "USDT", "USDC", "SPIRIT", "1INCH", "C98", "FTM", "fUSDT", "MIM", "BOO"],
|
|
71
|
+
nativeCurrency: { name: "FTM", symbol: "FTM", decimals: 18, address: "0x0000000000000000000000000000000000000000" },
|
|
58
72
|
rpcUrls: ["https://rpcapi.fantom.network"]
|
|
59
73
|
},
|
|
60
74
|
"arbitrum": {
|
|
61
75
|
compiler: 'EVM',
|
|
62
|
-
chainName: "Arbitrum", chainId: 42161, blockExplorerUrl: "https://arbiscan.io/tx/",
|
|
76
|
+
chainName: "Arbitrum", chainId: 42161, blockExplorerUrl: "https://arbiscan.io/tx/",
|
|
77
|
+
nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
|
|
63
78
|
rpcUrls: ["https://arb1.arbitrum.io/rpc"]
|
|
64
79
|
},
|
|
65
80
|
"xdai": {
|
|
@@ -72,22 +87,33 @@ var chainObj = {
|
|
|
72
87
|
},
|
|
73
88
|
"boba": {
|
|
74
89
|
compiler: 'EVM',
|
|
75
|
-
chainName: "Boba Mainnet", chainId: 288, blockExplorerUrl: "https://blockexplorer.boba.network/tx/",
|
|
90
|
+
chainName: "Boba Mainnet", chainId: 288, blockExplorerUrl: "https://blockexplorer.boba.network/tx/",
|
|
91
|
+
nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18, address: "0x0000000000000000000000000000000000000000" },
|
|
76
92
|
rpcUrls: ["https://mainnet.boba.network"]
|
|
77
93
|
},
|
|
78
94
|
"ont": {
|
|
79
95
|
compiler: 'ONT',
|
|
80
|
-
chainName: "Ontology Mainnet", blockExplorerUrl: "https://explorer.ont.io/transaction/",
|
|
96
|
+
chainName: "Ontology Mainnet", blockExplorerUrl: "https://explorer.ont.io/transaction/",
|
|
97
|
+
popularToken: [],
|
|
98
|
+
nativeCurrency: {
|
|
99
|
+
symbol: "ONG",
|
|
100
|
+
id: "ong",
|
|
101
|
+
address: "0x0000000000000000000000000000000000000000",
|
|
102
|
+
decimals: 18,
|
|
103
|
+
gasAmount: 1000000000000000
|
|
104
|
+
},
|
|
81
105
|
rpcUrls: null
|
|
82
106
|
},
|
|
83
107
|
"ontevm": {
|
|
84
108
|
compiler: 'EVM',
|
|
85
|
-
chainName: "Ontology Evm", chainId: 58, blockExplorerUrl: "https://explorer.ont.io/transaction/",
|
|
109
|
+
chainName: "Ontology Evm", chainId: 58, blockExplorerUrl: "https://explorer.ont.io/transaction/",
|
|
110
|
+
nativeCurrency: { name: "ONG", symbol: "ONG", decimals: 18, address: "0x0000000000000000000000000000000000000000" },
|
|
86
111
|
rpcUrls: ["https://dappnode10.ont.io:10339"]
|
|
87
112
|
},
|
|
88
113
|
"metis": {
|
|
89
114
|
compiler: 'EVM',
|
|
90
|
-
chainName: "Andromeda (Metis)", chainId: 1088, blockExplorerUrl: "https://andromeda-explorer.metis.io/tx/",
|
|
115
|
+
chainName: "Andromeda (Metis)", chainId: 1088, blockExplorerUrl: "https://andromeda-explorer.metis.io/tx/",
|
|
116
|
+
nativeCurrency: { name: "METIS", symbol: "METIS", decimals: 18, address: "0x0000000000000000000000000000000000000000" },
|
|
91
117
|
rpcUrls: ["https://andromeda.metis.io/?owner=1088"]
|
|
92
118
|
},
|
|
93
119
|
"tron": {
|
|
@@ -95,6 +121,13 @@ var chainObj = {
|
|
|
95
121
|
chainName: "Tron Mainnet",
|
|
96
122
|
blockExplorerUrl: "https://tronscan.io/#/transaction/",
|
|
97
123
|
popularToken: ["TRX", "WTRX", "ETH", "BTC", "USDT", "USDJ", "JST"],
|
|
124
|
+
nativeCurrency: {
|
|
125
|
+
symbol: "TRX",
|
|
126
|
+
id: "tron",
|
|
127
|
+
address: "T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb",
|
|
128
|
+
decimals: 6,
|
|
129
|
+
gasAmount: 1000000000000000
|
|
130
|
+
},
|
|
98
131
|
rpcUrls: null
|
|
99
132
|
},
|
|
100
133
|
"heco": {
|
|
@@ -108,7 +141,9 @@ var chainObj = {
|
|
|
108
141
|
},
|
|
109
142
|
"okex": {
|
|
110
143
|
compiler: 'EVM',
|
|
111
|
-
chainName: "OEC Mainnet", chainId: 66, blockExplorerUrl: "https://www.oklink.com/okexchain/",
|
|
144
|
+
chainName: "OEC Mainnet", chainId: 66, blockExplorerUrl: "https://www.oklink.com/okexchain/",
|
|
145
|
+
popularToken: ["OKT", "OKB", "USDT", "USDC", "BUSD", "BNB", "CHE"],
|
|
146
|
+
nativeCurrency: { name: "OKT", symbol: "OKT", decimals: 18, address: "0x0000000000000000000000000000000000000000" },
|
|
112
147
|
rpcUrls: ["https://exchainrpc.okex.org"]
|
|
113
148
|
},
|
|
114
149
|
"optimism": {
|
|
@@ -130,11 +165,13 @@ var chainObj = {
|
|
|
130
165
|
},
|
|
131
166
|
"dot": {
|
|
132
167
|
compiler: 'EVM',
|
|
133
|
-
chainName: "Polkadot", blockExplorerUrl: "", popularToken: ["ETH", "USDT", "USDC", "BUSD", "1INCH", "C98"]
|
|
168
|
+
chainName: "Polkadot", blockExplorerUrl: "", popularToken: ["ETH", "USDT", "USDC", "BUSD", "1INCH", "C98"],
|
|
169
|
+
nativeCurrency: {}
|
|
134
170
|
},
|
|
135
171
|
"neo": {
|
|
136
172
|
compiler: 'EVM',
|
|
137
|
-
chainName: "Neo", blockExplorerUrl: "",
|
|
173
|
+
chainName: "Neo", blockExplorerUrl: "",
|
|
174
|
+
popularToken: ["ETH", "USDT", "USDC", "BUSD", "1INCH", "C98"]
|
|
138
175
|
},
|
|
139
176
|
"aurora": {
|
|
140
177
|
chainName: "Aurora Mainnet",
|
|
@@ -215,6 +252,13 @@ var chainObj = {
|
|
|
215
252
|
],
|
|
216
253
|
blockExplorerUrl: '',
|
|
217
254
|
compiler: 'COSMOS',
|
|
255
|
+
nativeCurrency: {
|
|
256
|
+
symbol: "ATOM",
|
|
257
|
+
id: "cosmos",
|
|
258
|
+
address: "",
|
|
259
|
+
decimals: 18,
|
|
260
|
+
gasAmount: 1000000000000000
|
|
261
|
+
}
|
|
218
262
|
},
|
|
219
263
|
osmosis: {
|
|
220
264
|
chainId: 'osmosis-1',
|
|
@@ -524,6 +568,8 @@ var Chains = /** @class */ (function () {
|
|
|
524
568
|
return this.chainObj[name] || null;
|
|
525
569
|
};
|
|
526
570
|
Chains.prototype.isNativeToken = function (chainName, address) {
|
|
571
|
+
if (!chainName || !address)
|
|
572
|
+
return false;
|
|
527
573
|
if (chainObj[chainName] && chainObj[chainName].nativeCurrency && chainObj[chainName].nativeCurrency.address) {
|
|
528
574
|
return chainObj[chainName].nativeCurrency.address.toUpperCase() === address.toUpperCase();
|
|
529
575
|
}
|
|
@@ -152,7 +152,7 @@ function link(reqConnectWalletVo, chain) {
|
|
|
152
152
|
// https://solana-api.projectserum.com
|
|
153
153
|
// https://mercuria-fronten-1cd8.mainnet.rpcpool.com/
|
|
154
154
|
// "https://rpc.ankr.com/solana/ad9d7bb3250b29d691330e63e3b46778099aca307af8f5e49b2ebc0a470dd848"
|
|
155
|
-
wallet.connection = new web3_js_1.Connection(reqConnectWalletVo.localRpcUrl || "https://solana-mainnet.
|
|
155
|
+
wallet.connection = new web3_js_1.Connection(reqConnectWalletVo.localRpcUrl || "https://solana-mainnet.g.alchemy.com/v2/O2uK_K8FGzQeuRZyI2msw2EgwIGqNoHP"
|
|
156
156
|
// "https://few-silent-choice.solana-mainnet.quiknode.pro/b37eb00eb03a5a5e0ae9d9b7cf535b0b9c0dd6a9/"
|
|
157
157
|
);
|
|
158
158
|
if (res) {
|