@proton/wrap-constants 0.0.6 → 0.0.11
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/dist/coins.d.ts +14 -2
- package/dist/parsers.d.ts +2 -0
- package/dist/wrap-constants.cjs.development.js +171 -44
- package/dist/wrap-constants.cjs.development.js.map +1 -1
- package/dist/wrap-constants.cjs.production.min.js +1 -1
- package/dist/wrap-constants.cjs.production.min.js.map +1 -1
- package/dist/wrap-constants.esm.js +171 -44
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/coins.ts +205 -94
- package/src/parsers.ts +2 -1
package/src/coins.ts
CHANGED
|
@@ -6,14 +6,20 @@ export enum Chains {
|
|
|
6
6
|
EthereumMainnet = 'Ethereum',
|
|
7
7
|
EthereumRopsten = 'Ethereum (Ropsten)',
|
|
8
8
|
LitecoinMainnet = 'Litecoin',
|
|
9
|
+
LitecoinTestnet = 'Litecoin (Testnet)',
|
|
9
10
|
BitcoinCashMainnet = 'Bitcoin Cash',
|
|
11
|
+
BitcoinCashTestnet = 'Bitcoin Cash (Testnet)',
|
|
10
12
|
StellarMainnet = 'Stellar',
|
|
13
|
+
StellarTestnet = 'Stellar (Testnet)',
|
|
11
14
|
ProtonMainnet = 'Proton',
|
|
12
15
|
ProtonTestnet = 'Proton (Testnet)',
|
|
13
16
|
PolkadotMainnet = 'Polkadot',
|
|
14
17
|
BinanceBEP2 = 'Binance (BEP2)',
|
|
15
18
|
BinanceBEP20 = 'Binance (BEP20)',
|
|
16
19
|
EosMainnet = 'EOS',
|
|
20
|
+
EosTestnet = 'EOS (Jungle Testnet)',
|
|
21
|
+
HederaMainnet = 'Hedera (Mainnet)',
|
|
22
|
+
HederaTestnet = 'Hedera (Testnet)'
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
export enum Networks {
|
|
@@ -57,23 +63,29 @@ export const explorerLinkByChain = {
|
|
|
57
63
|
[Chains.EthereumMainnet] : (txid: string) => `https://etherscan.io/tx/${txid}`,
|
|
58
64
|
[Chains.EthereumRopsten] : (txid: string) => `https://ropsten.etherscan.io/tx/${txid}`,
|
|
59
65
|
[Chains.LitecoinMainnet] : (txid: string) => `https://blockchair.com/litecoin/transaction/${txid}`,
|
|
66
|
+
[Chains.LitecoinTestnet] : (txid: string) => `https://blockexplorer.one/litecoin/testnet/blockHash/${txid}`,
|
|
60
67
|
[Chains.BitcoinCashMainnet]: (txid: string) => `https://blockchair.com/bitcoin-cash/transaction/${txid}`,
|
|
68
|
+
[Chains.BitcoinCashTestnet]: (txid: string) => `https://blockexplorer.one/bitcoin-cash/testnet/blockHash/${txid}`,
|
|
61
69
|
[Chains.StellarMainnet] : (txid: string) => `https://blockchair.com/stellar/transaction/${txid}`,
|
|
70
|
+
[Chains.StellarTestnet] : (txid: string) => `https://testnet.steexp.com/tx/${txid}`,
|
|
62
71
|
[Chains.ProtonMainnet] : (txid: string) => `https://proton.bloks.io/transaction/${txid}`,
|
|
63
72
|
[Chains.ProtonTestnet] : (txid: string) => `https://proton-test.bloks.io/transaction/${txid}`,
|
|
64
73
|
[Chains.PolkadotMainnet] : (txid: string) => `https://polkadot.subscan.io/extrinsic/${txid}`,
|
|
65
|
-
[Chains.EosMainnet] : (txid: string) => `https://bloks.io/transaction/${txid}`,
|
|
66
74
|
[Chains.BinanceBEP2] : (txid: string) => `https://binance.mintscan.io/txs/${txid}`,
|
|
67
|
-
[Chains.BinanceBEP20] : (txid: string) => `https://bscscan.com/tx/${txid}
|
|
75
|
+
[Chains.BinanceBEP20] : (txid: string) => `https://bscscan.com/tx/${txid}`,
|
|
76
|
+
[Chains.EosMainnet] : (txid: string) => `https://bloks.io/transaction/${txid}`,
|
|
77
|
+
[Chains.EosTestnet] : (txid: string) => `https://jungle.bloks.io/transaction/${txid}`,
|
|
78
|
+
[Chains.HederaMainnet] : (txid: string) => `https://app.dragonglass.me/transactions/${txid}`,
|
|
79
|
+
[Chains.HederaTestnet] : (txid: string) => `https://testnet.dragonglass.me/transactions/${txid}`,
|
|
68
80
|
}
|
|
69
81
|
|
|
70
82
|
export const initializeCoins = (protonChain: string): {
|
|
71
|
-
allCoins: Coin[];
|
|
72
|
-
swapCoins: Coin[];
|
|
73
|
-
bridgeCoins: Coin[];
|
|
74
|
-
lendCoins: Coin[];
|
|
75
|
-
borrowCoins: Coin[];
|
|
76
|
-
loanCoins: Coin[];
|
|
83
|
+
allCoins : Coin[];
|
|
84
|
+
swapCoins : Coin[];
|
|
85
|
+
bridgeCoins : Coin[];
|
|
86
|
+
lendCoins : Coin[];
|
|
87
|
+
borrowCoins : Coin[];
|
|
88
|
+
loanCoins : Coin[];
|
|
77
89
|
allEnabledCoins: Coin[];
|
|
78
90
|
} => {
|
|
79
91
|
const IS_MAINNET = protonChain === 'proton'
|
|
@@ -82,7 +94,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
82
94
|
const coins: Coin[] = [
|
|
83
95
|
{
|
|
84
96
|
allowSwap: true,
|
|
85
|
-
allowBridge:
|
|
97
|
+
allowBridge: IS_MAINNET,
|
|
86
98
|
allowLend: false,
|
|
87
99
|
allowBorrow: false,
|
|
88
100
|
name: 'Proton',
|
|
@@ -91,24 +103,26 @@ export const initializeCoins = (protonChain: string): {
|
|
|
91
103
|
xtokenPrecision: 4,
|
|
92
104
|
xtokenContract: 'eosio.token',
|
|
93
105
|
wallets: [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
106
|
+
...(IS_MAINNET ? [
|
|
107
|
+
{
|
|
108
|
+
wallet: 'XPR-ERC20',
|
|
109
|
+
symbol: 'XPR',
|
|
110
|
+
chain: Chains.EthereumMainnet,
|
|
111
|
+
network: Networks.ERC20,
|
|
112
|
+
precision: 4,
|
|
113
|
+
contract: '0xD7EFB00D12C2C13131FD319336FDF952525DA2AF',
|
|
114
|
+
hasWithdrawMemo: false
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
wallet: 'XPR-BEP20',
|
|
118
|
+
symbol: 'XPR',
|
|
119
|
+
chain: Chains.BinanceBEP20,
|
|
120
|
+
network: Networks.BEP20,
|
|
121
|
+
precision: 4,
|
|
122
|
+
contract: '0x5DE3939B2F811A61D830E6F52D13B066881412AB',
|
|
123
|
+
hasWithdrawMemo: false
|
|
124
|
+
}
|
|
125
|
+
]: []),
|
|
112
126
|
],
|
|
113
127
|
image: '/img/tokens/xpr.png'
|
|
114
128
|
},
|
|
@@ -123,30 +137,41 @@ export const initializeCoins = (protonChain: string): {
|
|
|
123
137
|
xtokenPrecision: 6,
|
|
124
138
|
xtokenContract: 'xtokens',
|
|
125
139
|
wallets: [
|
|
126
|
-
|
|
140
|
+
...(IS_MAINNET ? [
|
|
141
|
+
{
|
|
142
|
+
wallet: 'USDC',
|
|
143
|
+
symbol: 'USDC',
|
|
144
|
+
chain: Chains.EthereumMainnet,
|
|
145
|
+
network: Networks.ERC20,
|
|
146
|
+
precision: 6,
|
|
147
|
+
contract: '0xA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48',
|
|
148
|
+
hasWithdrawMemo: false
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
wallet: 'USDC-BEP20',
|
|
152
|
+
symbol: 'USDC',
|
|
153
|
+
chain: Chains.BinanceBEP20,
|
|
154
|
+
network: Networks.BEP20,
|
|
155
|
+
precision: 18,
|
|
156
|
+
contract: '0x8AC76A51CC950D9822D68B83FE1AD97B32CD580D',
|
|
157
|
+
hasWithdrawMemo: false
|
|
158
|
+
},
|
|
159
|
+
]: []),
|
|
160
|
+
...(IS_TESTNET ? [ {
|
|
127
161
|
wallet: 'USDC',
|
|
128
162
|
symbol: 'USDC',
|
|
129
|
-
chain: Chains.
|
|
130
|
-
network: Networks.
|
|
163
|
+
chain: Chains.EthereumRopsten,
|
|
164
|
+
network: Networks.Ropsten,
|
|
131
165
|
precision: 6,
|
|
132
166
|
contract: '0xA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48',
|
|
133
167
|
hasWithdrawMemo: false
|
|
134
|
-
}
|
|
135
|
-
// {
|
|
136
|
-
// wallet: 'USDC-BEP20',
|
|
137
|
-
// symbol: 'USDC',
|
|
138
|
-
// chain: Chains.BinanceBEP20,
|
|
139
|
-
// network: Networks.BEP20,
|
|
140
|
-
// precision: 18,
|
|
141
|
-
// contract: '0x8AC76A51CC950D9822D68B83FE1AD97B32CD580D',
|
|
142
|
-
// hasWithdrawMemo: false
|
|
143
|
-
// }
|
|
168
|
+
}]: [])
|
|
144
169
|
],
|
|
145
170
|
image: '/img/tokens/xusdc.png'
|
|
146
171
|
},
|
|
147
172
|
{
|
|
148
173
|
allowSwap: true,
|
|
149
|
-
allowBridge:
|
|
174
|
+
allowBridge: IS_MAINNET,
|
|
150
175
|
allowLend: false,
|
|
151
176
|
allowBorrow: false,
|
|
152
177
|
name: 'Metal',
|
|
@@ -155,7 +180,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
155
180
|
xtokenPrecision: 8,
|
|
156
181
|
xtokenContract: 'xtokens',
|
|
157
182
|
wallets: [
|
|
158
|
-
{
|
|
183
|
+
...(IS_MAINNET ? [{
|
|
159
184
|
wallet: 'MTL',
|
|
160
185
|
symbol: 'MTL',
|
|
161
186
|
chain: Chains.EthereumMainnet,
|
|
@@ -163,7 +188,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
163
188
|
precision: 8,
|
|
164
189
|
contract: '0xF433089366899D83A9F26A773D59EC7ECF30355E',
|
|
165
190
|
hasWithdrawMemo: false
|
|
166
|
-
}
|
|
191
|
+
}]: [])
|
|
167
192
|
],
|
|
168
193
|
image: '/img/tokens/xmt.png'
|
|
169
194
|
},
|
|
@@ -178,7 +203,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
178
203
|
xtokenPrecision: 8,
|
|
179
204
|
xtokenContract: 'xtokens',
|
|
180
205
|
wallets: [
|
|
181
|
-
{
|
|
206
|
+
...(IS_MAINNET ? [{
|
|
182
207
|
wallet: 'BTC',
|
|
183
208
|
symbol: 'BTC',
|
|
184
209
|
chain: Chains.BitcoinMainnet,
|
|
@@ -186,16 +211,16 @@ export const initializeCoins = (protonChain: string): {
|
|
|
186
211
|
precision: 8,
|
|
187
212
|
contract: undefined,
|
|
188
213
|
hasWithdrawMemo: false
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
214
|
+
}]: []),
|
|
215
|
+
...(IS_TESTNET ? [{
|
|
216
|
+
wallet: 'BTC',
|
|
217
|
+
symbol: 'BTC',
|
|
218
|
+
chain: Chains.BitcoinTestnet,
|
|
219
|
+
network: Networks.Testnet,
|
|
220
|
+
precision: 8,
|
|
221
|
+
contract: undefined,
|
|
222
|
+
hasWithdrawMemo: false
|
|
223
|
+
}]: [])
|
|
199
224
|
],
|
|
200
225
|
image: '/img/tokens/xbtc.png'
|
|
201
226
|
},
|
|
@@ -210,7 +235,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
210
235
|
xtokenPrecision: 8,
|
|
211
236
|
xtokenContract: 'xtokens',
|
|
212
237
|
wallets: [
|
|
213
|
-
{
|
|
238
|
+
...(IS_MAINNET ? [{
|
|
214
239
|
wallet: 'ETH',
|
|
215
240
|
symbol: 'ETH',
|
|
216
241
|
chain: Chains.EthereumMainnet,
|
|
@@ -218,16 +243,16 @@ export const initializeCoins = (protonChain: string): {
|
|
|
218
243
|
precision: 18,
|
|
219
244
|
contract: '0x0000000000000000000000000000000000000000',
|
|
220
245
|
hasWithdrawMemo: false
|
|
221
|
-
},
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
246
|
+
}]: []),
|
|
247
|
+
...(IS_TESTNET ? [{
|
|
248
|
+
wallet: 'ETH',
|
|
249
|
+
symbol: 'ETH',
|
|
250
|
+
chain: Chains.EthereumRopsten,
|
|
251
|
+
network: Networks.Ropsten,
|
|
252
|
+
precision: 18,
|
|
253
|
+
contract: '0x0000000000000000000000000000000000000000',
|
|
254
|
+
hasWithdrawMemo: false
|
|
255
|
+
}]: [])
|
|
231
256
|
],
|
|
232
257
|
image: '/img/tokens/xeth.png'
|
|
233
258
|
},
|
|
@@ -242,7 +267,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
242
267
|
xtokenPrecision: 6,
|
|
243
268
|
xtokenContract: 'xtokens',
|
|
244
269
|
wallets: [
|
|
245
|
-
{
|
|
270
|
+
...(IS_MAINNET ? [{
|
|
246
271
|
wallet: 'USDT',
|
|
247
272
|
symbol: 'USDT',
|
|
248
273
|
chain: Chains.EthereumMainnet,
|
|
@@ -250,13 +275,22 @@ export const initializeCoins = (protonChain: string): {
|
|
|
250
275
|
precision: 6,
|
|
251
276
|
contract: '0xDAC17F958D2EE523A2206206994597C13D831EC7',
|
|
252
277
|
hasWithdrawMemo: false
|
|
253
|
-
}
|
|
278
|
+
}]: []),
|
|
279
|
+
...(IS_TESTNET ? [{
|
|
280
|
+
wallet: 'USDT',
|
|
281
|
+
symbol: 'USDT',
|
|
282
|
+
chain: Chains.EthereumRopsten,
|
|
283
|
+
network: Networks.Ropsten,
|
|
284
|
+
precision: 6,
|
|
285
|
+
contract: '0xDAC17F958D2EE523A2206206994597C13D831EC7',
|
|
286
|
+
hasWithdrawMemo: false
|
|
287
|
+
}]: [])
|
|
254
288
|
],
|
|
255
289
|
image: '/img/tokens/xusdt.png'
|
|
256
290
|
},
|
|
257
291
|
{
|
|
258
292
|
allowSwap: false,
|
|
259
|
-
allowBridge:
|
|
293
|
+
allowBridge: IS_MAINNET,
|
|
260
294
|
allowLend: false,
|
|
261
295
|
allowBorrow: false,
|
|
262
296
|
name: 'TrueUSD',
|
|
@@ -265,7 +299,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
265
299
|
xtokenPrecision: 6,
|
|
266
300
|
xtokenContract: 'xtokens',
|
|
267
301
|
wallets: [
|
|
268
|
-
{
|
|
302
|
+
...(IS_MAINNET ? [{
|
|
269
303
|
wallet: 'TUSD',
|
|
270
304
|
symbol: 'TUSD',
|
|
271
305
|
chain: Chains.EthereumMainnet,
|
|
@@ -273,13 +307,13 @@ export const initializeCoins = (protonChain: string): {
|
|
|
273
307
|
precision: 18,
|
|
274
308
|
contract: '0x0000000000085D4780B73119B644AE5ECD22B376',
|
|
275
309
|
hasWithdrawMemo: false
|
|
276
|
-
}
|
|
310
|
+
}]: [])
|
|
277
311
|
],
|
|
278
312
|
image: '/img/tokens/xtusd.png'
|
|
279
313
|
},
|
|
280
314
|
{
|
|
281
315
|
allowSwap: false,
|
|
282
|
-
allowBridge:
|
|
316
|
+
allowBridge: IS_MAINNET,
|
|
283
317
|
allowLend: false,
|
|
284
318
|
allowBorrow: false,
|
|
285
319
|
name: 'Paxos Standard',
|
|
@@ -288,7 +322,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
288
322
|
xtokenPrecision: 6,
|
|
289
323
|
xtokenContract: 'xtokens',
|
|
290
324
|
wallets: [
|
|
291
|
-
{
|
|
325
|
+
...(IS_MAINNET ? [{
|
|
292
326
|
wallet: 'PAX',
|
|
293
327
|
symbol: 'PAX',
|
|
294
328
|
chain: Chains.EthereumMainnet,
|
|
@@ -296,7 +330,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
296
330
|
precision: 18,
|
|
297
331
|
contract: '0x8E870D67F660D95D5BE530380D0EC0BD388289E1',
|
|
298
332
|
hasWithdrawMemo: false
|
|
299
|
-
}
|
|
333
|
+
}]: [])
|
|
300
334
|
],
|
|
301
335
|
image: '/img/tokens/xpax.png'
|
|
302
336
|
},
|
|
@@ -311,7 +345,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
311
345
|
xtokenPrecision: 8,
|
|
312
346
|
xtokenContract: 'xtokens',
|
|
313
347
|
wallets: [
|
|
314
|
-
{
|
|
348
|
+
...(IS_MAINNET ? [{
|
|
315
349
|
wallet: 'PAXG',
|
|
316
350
|
symbol: 'PAXG',
|
|
317
351
|
chain: Chains.EthereumMainnet,
|
|
@@ -319,7 +353,16 @@ export const initializeCoins = (protonChain: string): {
|
|
|
319
353
|
precision: 18,
|
|
320
354
|
contract: '0x45804880DE22913DAFE09F4980848ECE6ECBAF78',
|
|
321
355
|
hasWithdrawMemo: false
|
|
322
|
-
}
|
|
356
|
+
}]: []),
|
|
357
|
+
...(IS_TESTNET ? [{
|
|
358
|
+
wallet: 'PAXG',
|
|
359
|
+
symbol: 'PAXG',
|
|
360
|
+
chain: Chains.EthereumRopsten,
|
|
361
|
+
network: Networks.Ropsten,
|
|
362
|
+
precision: 18,
|
|
363
|
+
contract: '0x45804880DE22913DAFE09F4980848ECE6ECBAF78',
|
|
364
|
+
hasWithdrawMemo: false
|
|
365
|
+
}]: [])
|
|
323
366
|
],
|
|
324
367
|
image: '/img/tokens/xpaxg.png'
|
|
325
368
|
},
|
|
@@ -334,7 +377,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
334
377
|
xtokenPrecision: 6,
|
|
335
378
|
xtokenContract: 'xtokens',
|
|
336
379
|
wallets: [
|
|
337
|
-
{
|
|
380
|
+
...(IS_MAINNET ? [{
|
|
338
381
|
wallet: 'UNI',
|
|
339
382
|
symbol: 'UNI',
|
|
340
383
|
chain: Chains.EthereumMainnet,
|
|
@@ -342,7 +385,16 @@ export const initializeCoins = (protonChain: string): {
|
|
|
342
385
|
precision: 18,
|
|
343
386
|
contract: '0x1F9840A85D5AF5BF1D1762F925BDADDC4201F984',
|
|
344
387
|
hasWithdrawMemo: false
|
|
345
|
-
}
|
|
388
|
+
}]: []),
|
|
389
|
+
...(IS_TESTNET ? [{
|
|
390
|
+
wallet: 'UNI',
|
|
391
|
+
symbol: 'UNI',
|
|
392
|
+
chain: Chains.EthereumRopsten,
|
|
393
|
+
network: Networks.Ropsten,
|
|
394
|
+
precision: 18,
|
|
395
|
+
contract: '0x1F9840A85D5AF5BF1D1762F925BDADDC4201F984',
|
|
396
|
+
hasWithdrawMemo: false
|
|
397
|
+
}]: [])
|
|
346
398
|
],
|
|
347
399
|
image: '/img/tokens/xuni.png'
|
|
348
400
|
},
|
|
@@ -357,7 +409,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
357
409
|
xtokenPrecision: 6,
|
|
358
410
|
xtokenContract: 'xtokens',
|
|
359
411
|
wallets: [
|
|
360
|
-
{
|
|
412
|
+
...(IS_MAINNET ? [{
|
|
361
413
|
wallet: '1INCH',
|
|
362
414
|
symbol: '1INCH',
|
|
363
415
|
chain: Chains.EthereumMainnet,
|
|
@@ -365,7 +417,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
365
417
|
precision: 18,
|
|
366
418
|
contract: '0x111111111117DC0AA78B770FA6A738034120C302',
|
|
367
419
|
hasWithdrawMemo: false
|
|
368
|
-
}
|
|
420
|
+
}]: [])
|
|
369
421
|
],
|
|
370
422
|
image: '/img/tokens/xinch.png'
|
|
371
423
|
},
|
|
@@ -380,7 +432,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
380
432
|
xtokenPrecision: 6,
|
|
381
433
|
xtokenContract: 'xtokens',
|
|
382
434
|
wallets: [
|
|
383
|
-
{
|
|
435
|
+
...(IS_MAINNET ? [{
|
|
384
436
|
wallet: 'LINK',
|
|
385
437
|
symbol: 'LINK',
|
|
386
438
|
chain: Chains.EthereumMainnet,
|
|
@@ -388,7 +440,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
388
440
|
precision: 18,
|
|
389
441
|
contract: '0x514910771AF9CA656AF840DFF83E8264ECF986CA',
|
|
390
442
|
hasWithdrawMemo: false
|
|
391
|
-
}
|
|
443
|
+
}]: [])
|
|
392
444
|
],
|
|
393
445
|
image: '/img/tokens/xlink.png'
|
|
394
446
|
},
|
|
@@ -403,7 +455,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
403
455
|
xtokenPrecision: 8,
|
|
404
456
|
xtokenContract: 'xtokens',
|
|
405
457
|
wallets: [
|
|
406
|
-
{
|
|
458
|
+
...(IS_MAINNET ? [{
|
|
407
459
|
wallet: 'LTC',
|
|
408
460
|
symbol: 'LTC',
|
|
409
461
|
chain: Chains.LitecoinMainnet,
|
|
@@ -411,7 +463,16 @@ export const initializeCoins = (protonChain: string): {
|
|
|
411
463
|
precision: 8,
|
|
412
464
|
contract: undefined,
|
|
413
465
|
hasWithdrawMemo: false
|
|
414
|
-
}
|
|
466
|
+
}]: []),
|
|
467
|
+
...(IS_TESTNET ? [{
|
|
468
|
+
wallet: 'LTC',
|
|
469
|
+
symbol: 'LTC',
|
|
470
|
+
chain: Chains.LitecoinTestnet,
|
|
471
|
+
network: Networks.Testnet,
|
|
472
|
+
precision: 8,
|
|
473
|
+
contract: undefined,
|
|
474
|
+
hasWithdrawMemo: false
|
|
475
|
+
}]: [])
|
|
415
476
|
],
|
|
416
477
|
image: '/img/tokens/xltc.png'
|
|
417
478
|
},
|
|
@@ -426,7 +487,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
426
487
|
xtokenPrecision: 8,
|
|
427
488
|
xtokenContract: 'xtokens',
|
|
428
489
|
wallets: [
|
|
429
|
-
{
|
|
490
|
+
...(IS_MAINNET ? [{
|
|
430
491
|
wallet: 'BCH',
|
|
431
492
|
symbol: 'BCH',
|
|
432
493
|
chain: Chains.BitcoinCashMainnet,
|
|
@@ -434,7 +495,16 @@ export const initializeCoins = (protonChain: string): {
|
|
|
434
495
|
precision: 8,
|
|
435
496
|
contract: undefined,
|
|
436
497
|
hasWithdrawMemo: false
|
|
437
|
-
}
|
|
498
|
+
}]: []),
|
|
499
|
+
...(IS_TESTNET ? [{
|
|
500
|
+
wallet: 'BCH',
|
|
501
|
+
symbol: 'BCH',
|
|
502
|
+
chain: Chains.BitcoinCashTestnet,
|
|
503
|
+
network: Networks.Testnet,
|
|
504
|
+
precision: 8,
|
|
505
|
+
contract: undefined,
|
|
506
|
+
hasWithdrawMemo: false
|
|
507
|
+
}]: [])
|
|
438
508
|
],
|
|
439
509
|
image: '/img/tokens/xbch.png'
|
|
440
510
|
},
|
|
@@ -449,7 +519,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
449
519
|
xtokenPrecision: 6,
|
|
450
520
|
xtokenContract: 'xtokens',
|
|
451
521
|
wallets: [
|
|
452
|
-
{
|
|
522
|
+
...(IS_MAINNET ? [{
|
|
453
523
|
wallet: 'XLM',
|
|
454
524
|
symbol: 'XLM',
|
|
455
525
|
chain: Chains.StellarMainnet,
|
|
@@ -457,7 +527,16 @@ export const initializeCoins = (protonChain: string): {
|
|
|
457
527
|
precision: 7,
|
|
458
528
|
contract: undefined,
|
|
459
529
|
hasWithdrawMemo: false
|
|
460
|
-
}
|
|
530
|
+
}]: []),
|
|
531
|
+
...(IS_TESTNET ? [{
|
|
532
|
+
wallet: 'XLM',
|
|
533
|
+
symbol: 'XLM',
|
|
534
|
+
chain: Chains.StellarTestnet,
|
|
535
|
+
network: Networks.Testnet,
|
|
536
|
+
precision: 7,
|
|
537
|
+
contract: undefined,
|
|
538
|
+
hasWithdrawMemo: false
|
|
539
|
+
}]: [])
|
|
461
540
|
],
|
|
462
541
|
image: '/img/tokens/xxlm.png'
|
|
463
542
|
},
|
|
@@ -485,7 +564,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
485
564
|
xtokenPrecision: 8,
|
|
486
565
|
xtokenContract: 'xtokens',
|
|
487
566
|
wallets: [
|
|
488
|
-
{
|
|
567
|
+
...(IS_MAINNET ? [{
|
|
489
568
|
wallet: 'DOT',
|
|
490
569
|
symbol: 'DOT',
|
|
491
570
|
chain: Chains.PolkadotMainnet,
|
|
@@ -493,13 +572,13 @@ export const initializeCoins = (protonChain: string): {
|
|
|
493
572
|
precision: 10,
|
|
494
573
|
contract: undefined,
|
|
495
574
|
hasWithdrawMemo: false
|
|
496
|
-
}
|
|
575
|
+
}]: [])
|
|
497
576
|
],
|
|
498
577
|
image: '/img/tokens/xdot.png'
|
|
499
578
|
},
|
|
500
579
|
{
|
|
501
580
|
allowSwap: true,
|
|
502
|
-
allowBridge:
|
|
581
|
+
allowBridge: IS_MAINNET,
|
|
503
582
|
allowLend: false,
|
|
504
583
|
allowBorrow: false,
|
|
505
584
|
name: 'Binance Coin',
|
|
@@ -508,7 +587,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
508
587
|
xtokenPrecision: 8,
|
|
509
588
|
xtokenContract: 'xtokens',
|
|
510
589
|
wallets: [
|
|
511
|
-
{
|
|
590
|
+
...(IS_MAINNET ? [{
|
|
512
591
|
wallet: 'BNB',
|
|
513
592
|
symbol: 'BNB',
|
|
514
593
|
chain: Chains.BinanceBEP20,
|
|
@@ -516,7 +595,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
516
595
|
precision: 18,
|
|
517
596
|
contract: undefined,
|
|
518
597
|
hasWithdrawMemo: false
|
|
519
|
-
}
|
|
598
|
+
}]: [])
|
|
520
599
|
],
|
|
521
600
|
image: '/img/tokens/xbnb.png'
|
|
522
601
|
},
|
|
@@ -531,7 +610,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
531
610
|
xtokenPrecision: 4,
|
|
532
611
|
xtokenContract: 'xtokens',
|
|
533
612
|
wallets: [
|
|
534
|
-
{
|
|
613
|
+
...(IS_MAINNET ? [{
|
|
535
614
|
wallet: 'EOS',
|
|
536
615
|
symbol: 'EOS',
|
|
537
616
|
chain: Chains.EosMainnet,
|
|
@@ -539,10 +618,42 @@ export const initializeCoins = (protonChain: string): {
|
|
|
539
618
|
precision: 4,
|
|
540
619
|
contract: undefined,
|
|
541
620
|
hasWithdrawMemo: true
|
|
542
|
-
}
|
|
621
|
+
}]: []),
|
|
622
|
+
...(IS_TESTNET ? [{
|
|
623
|
+
wallet: 'EOS',
|
|
624
|
+
symbol: 'EOS',
|
|
625
|
+
chain: Chains.EosTestnet,
|
|
626
|
+
network: Networks.Testnet,
|
|
627
|
+
precision: 4,
|
|
628
|
+
contract: undefined,
|
|
629
|
+
hasWithdrawMemo: true
|
|
630
|
+
}]: [])
|
|
543
631
|
],
|
|
544
632
|
image: '/img/tokens/xeos.png'
|
|
545
633
|
},
|
|
634
|
+
{
|
|
635
|
+
allowSwap: false,
|
|
636
|
+
allowBridge: false,
|
|
637
|
+
allowLend: false,
|
|
638
|
+
allowBorrow: false,
|
|
639
|
+
name: 'HBAR',
|
|
640
|
+
coin: 'HBAR',
|
|
641
|
+
xtokenSymbol: 'XHBAR',
|
|
642
|
+
xtokenPrecision: 8, // TODO
|
|
643
|
+
xtokenContract: 'xtokens',
|
|
644
|
+
wallets: [
|
|
645
|
+
...(IS_TESTNET ? [{
|
|
646
|
+
wallet: 'HBAR',
|
|
647
|
+
symbol: 'HBAR',
|
|
648
|
+
chain: Chains.HederaTestnet,
|
|
649
|
+
network: Networks.Testnet,
|
|
650
|
+
precision: 8,
|
|
651
|
+
contract: undefined,
|
|
652
|
+
hasWithdrawMemo: true
|
|
653
|
+
}]: [])
|
|
654
|
+
],
|
|
655
|
+
image: '/img/tokens/xhbar.png'
|
|
656
|
+
},
|
|
546
657
|
|
|
547
658
|
// Synthethic
|
|
548
659
|
{
|
package/src/parsers.ts
CHANGED
|
@@ -91,7 +91,8 @@ export const withdrawBodyParser = z.object({
|
|
|
91
91
|
authorization: z.array(authorizationParser).min(1)
|
|
92
92
|
})).min(1)
|
|
93
93
|
})),
|
|
94
|
-
quoteId: z.string()
|
|
94
|
+
quoteId: z.string(),
|
|
95
|
+
provider: z.string().optional()
|
|
95
96
|
})
|
|
96
97
|
export type WithdrawBody = z.infer<typeof withdrawBodyParser>
|
|
97
98
|
|