@kimafinance/kima-transaction-widget 1.1.18 → 1.1.20-beta.1
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/README.md +18 -15
- package/dist/assets/icons/Arbitrium.d.ts +7 -0
- package/dist/assets/icons/Optimism.d.ts +7 -0
- package/dist/assets/icons/index.d.ts +2 -0
- package/dist/index.js +117 -20
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +123 -7
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/config.d.ts +3 -0
- package/dist/utils/constants.d.ts +8 -2
- package/package.json +3 -3
- package/dist/components/reusable/HelpPopup.d.ts +0 -3
- package/dist/components/reusable/Tooltip.d.ts +0 -11
- package/dist/components/reusable/WalletConnectModal.d.ts +0 -3
- package/dist/helpers/xplorisk.d.ts +0 -17
- package/dist/styles/hooks/index.d.ts +0 -1
- package/dist/styles/hooks/useWidth.d.ts +0 -2
- package/dist/utils/ethereum/common.d.ts +0 -21
- package/dist/utils/ethereum/erc20Token.d.ts +0 -171
- package/dist/utils/parseError.d.ts +0 -2
package/README.md
CHANGED
|
@@ -18,12 +18,12 @@ import React from 'react'
|
|
|
18
18
|
import {
|
|
19
19
|
KimaTransactionWidget,
|
|
20
20
|
KimaProvider,
|
|
21
|
-
ThemeOptions,
|
|
22
21
|
FontSizeOptions,
|
|
23
22
|
ModeOptions,
|
|
24
|
-
SupportNetworks
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
SupportNetworks,
|
|
24
|
+
ColorModeOptions
|
|
25
|
+
} from 'kima-transaction-widget'
|
|
26
|
+
import 'kima-transaction-widget/dist/index.css'
|
|
27
27
|
|
|
28
28
|
const App = () => {
|
|
29
29
|
return (
|
|
@@ -35,9 +35,11 @@ const App = () => {
|
|
|
35
35
|
>
|
|
36
36
|
<div className='container'>
|
|
37
37
|
<KimaTransactionWidget
|
|
38
|
-
theme={
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
theme={{
|
|
39
|
+
colorMode: ColorModeOptions.light,
|
|
40
|
+
fontSize: FontSizeOptions.medium
|
|
41
|
+
}}
|
|
42
|
+
mode={ModeOptions.payment}
|
|
41
43
|
kimaBackendUrl='https://trasnaction_backend.kima.finance'
|
|
42
44
|
kimaNodeProviderQuery='https://api_staging_testnet.kima.finance'
|
|
43
45
|
titleOption={{
|
|
@@ -85,11 +87,11 @@ import React from 'react'
|
|
|
85
87
|
import {
|
|
86
88
|
KimaTransactionWidget,
|
|
87
89
|
KimaProvider,
|
|
88
|
-
ThemeOptions,
|
|
89
90
|
FontSizeOptions,
|
|
90
|
-
ModeOptions
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
ModeOptions,
|
|
92
|
+
ColorModeOptions
|
|
93
|
+
} from 'kima-transaction-widget'
|
|
94
|
+
import 'kima-transaction-widget/dist/index.css'
|
|
93
95
|
|
|
94
96
|
const App = () => {
|
|
95
97
|
return (
|
|
@@ -101,8 +103,10 @@ const App = () => {
|
|
|
101
103
|
>
|
|
102
104
|
<div className='container'>
|
|
103
105
|
<KimaTransactionWidget
|
|
104
|
-
theme={
|
|
105
|
-
|
|
106
|
+
theme={{
|
|
107
|
+
colorMode: ColorModeOptions.light,
|
|
108
|
+
fontSize: FontSizeOptions.medium
|
|
109
|
+
}}
|
|
106
110
|
mode={ModeOptions.bridge}
|
|
107
111
|
kimaBackendUrl='https://trasnaction_backend.kima.finance'
|
|
108
112
|
kimaNodeProviderQuery='https://api_staging_testnet.kima.finance'
|
|
@@ -130,8 +134,7 @@ export default App
|
|
|
130
134
|
|
|
131
135
|
| Prop Name | Type | Description | Values | Default Value |
|
|
132
136
|
| ------------------------------ | ------------------ | ------------------------ | ----------------| ------------- |
|
|
133
|
-
| theme `(
|
|
134
|
-
| fontSize `(optional)` | FontSizeOptions | font size of widget | `small`, `medium`, `large` | `medium` |
|
|
137
|
+
| theme `(required)` | ThemeOptions | colorMode, fontSize, fontFamily, backgroundColor | | |
|
|
135
138
|
| mode `(required)` | ModeOptions | scenario of the widget | `payment`, `bridge` | |
|
|
136
139
|
| transactionOption `(optional)` | TransactionOption | target chain, address and currency | | |
|
|
137
140
|
| titleOption `(optional)` | TitleOption | titles of widget for every steps | | |
|
|
@@ -9,6 +9,8 @@ export { default as EthereumIcon } from './Ethereum';
|
|
|
9
9
|
export { default as SolanaIcon } from './Solana';
|
|
10
10
|
export { default as PolygonIcon } from './Polygon';
|
|
11
11
|
export { default as AvalancheIcon } from './Avalanche';
|
|
12
|
+
export { default as ArbitriumIcon } from './Arbitrium';
|
|
13
|
+
export { default as OptimismIcon } from './Optimism';
|
|
12
14
|
export { default as USDCIcon } from './USDC';
|
|
13
15
|
export { default as USDTIcon } from './USDT';
|
|
14
16
|
export { default as FuseIcon } from './Fuse';
|
package/dist/index.js
CHANGED
|
@@ -392,12 +392,85 @@ var Avalanche = function Avalanche(_ref) {
|
|
|
392
392
|
};
|
|
393
393
|
|
|
394
394
|
var _excluded$b = ["width", "height"];
|
|
395
|
+
var Arbitrium = function Arbitrium(_ref) {
|
|
396
|
+
var rest = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
397
|
+
return React__default.createElement("svg", {
|
|
398
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
399
|
+
width: "124.983",
|
|
400
|
+
height: "140.32",
|
|
401
|
+
viewBox: "0 0 124.983 140.32"
|
|
402
|
+
}, React__default.createElement("g", Object.assign({
|
|
403
|
+
id: "symbol",
|
|
404
|
+
transform: "translate(-177.491 -53.193)"
|
|
405
|
+
}, rest), React__default.createElement("path", {
|
|
406
|
+
id: "Path_153",
|
|
407
|
+
"data-name": "Path 153",
|
|
408
|
+
d: "M266.978,128.665l10.305-17.485,27.776,43.262.013,8.3-.091-57.131a4.3,4.3,0,0,0-1.99-3.428L252.984,73.42a4.408,4.408,0,0,0-3.821.018,4.352,4.352,0,0,0-.448.259l-.174.11L200,101.935l-.189.085a4.417,4.417,0,0,0-.717.418,4.29,4.29,0,0,0-1.729,2.731,4.419,4.419,0,0,0-.062.505l.076,46.556,25.872-40.1c3.257-5.317,10.354-7.03,16.942-6.937l7.732.2-45.56,73.064,5.371,3.092,46.106-76.083,20.379-.074-45.987,78L247.4,194.422l2.29,1.317a4.4,4.4,0,0,0,3.087.061l50.71-29.387-9.7,5.618Zm3.932,56.627-19.356-30.379,11.815-20.049,25.42,40.066Z",
|
|
409
|
+
transform: "translate(-11.186 -11.178)",
|
|
410
|
+
fill: "#2d374b"
|
|
411
|
+
}), React__default.createElement("path", {
|
|
412
|
+
id: "Path_154",
|
|
413
|
+
"data-name": "Path 154",
|
|
414
|
+
d: "M321.883,235.122,341.239,265.5l17.88-10.362L333.7,215.073Z",
|
|
415
|
+
transform: "translate(-81.515 -91.387)",
|
|
416
|
+
fill: "#28a0f0"
|
|
417
|
+
}), React__default.createElement("path", {
|
|
418
|
+
id: "Path_155",
|
|
419
|
+
"data-name": "Path 155",
|
|
420
|
+
d: "M395.4,212.248l-.013-8.3-27.776-43.262L357.3,178.169l26.814,43.366,9.7-5.618a4.3,4.3,0,0,0,1.587-3.129Z",
|
|
421
|
+
transform: "translate(-101.511 -60.683)",
|
|
422
|
+
fill: "#28a0f0"
|
|
423
|
+
}), React__default.createElement("path", {
|
|
424
|
+
id: "Path_156",
|
|
425
|
+
"data-name": "Path 156",
|
|
426
|
+
d: "M177.491,212.312l13.691,7.889,45.56-73.064-7.732-.2c-6.588-.093-13.685,1.619-16.942,6.937l-25.872,40.1-8.7,13.373v4.969Z",
|
|
427
|
+
transform: "translate(0 -52.917)",
|
|
428
|
+
fill: "#fff"
|
|
429
|
+
}), React__default.createElement("path", {
|
|
430
|
+
id: "Path_157",
|
|
431
|
+
"data-name": "Path 157",
|
|
432
|
+
d: "M287.75,147.406l-20.378.074-46.106,76.083,16.115,9.279,4.382-7.433Z",
|
|
433
|
+
transform: "translate(-24.713 -53.187)",
|
|
434
|
+
fill: "#fff"
|
|
435
|
+
}), React__default.createElement("path", {
|
|
436
|
+
id: "Path_158",
|
|
437
|
+
"data-name": "Path 158",
|
|
438
|
+
d: "M302.474,94.114a12.98,12.98,0,0,0-6.093-10.435L245.719,54.545a13.178,13.178,0,0,0-11.624,0c-.423.213-49.268,28.542-49.268,28.542a13.016,13.016,0,0,0-1.94,1.148,12.881,12.881,0,0,0-5.4,9.854v60.338l8.7-13.373L186.12,94.5a4.325,4.325,0,0,1,1.791-3.236c.23-.165,49.909-28.921,50.067-29a4.408,4.408,0,0,1,3.821-.018l50.007,28.765a4.3,4.3,0,0,1,1.99,3.428v57.672a4.2,4.2,0,0,1-1.495,3.129l-9.7,5.618-5,2.9-17.88,10.362-18.133,10.509a4.395,4.395,0,0,1-3.087-.061l-21.453-12.339-4.382,7.432,19.28,11.1c.638.362,1.206.684,1.672.946.722.4,1.214.675,1.387.759a12.528,12.528,0,0,0,5.118,1.053,12.89,12.89,0,0,0,4.72-.888l52.667-30.5a12.876,12.876,0,0,0,4.962-9.7Z",
|
|
439
|
+
transform: "translate(-0.001)",
|
|
440
|
+
fill: "#96bedc"
|
|
441
|
+
})));
|
|
442
|
+
};
|
|
443
|
+
|
|
444
|
+
var _excluded$c = ["width", "height"];
|
|
445
|
+
var Optimism = function Optimism(_ref) {
|
|
446
|
+
var rest = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
447
|
+
return React__default.createElement("svg", Object.assign({
|
|
448
|
+
version: "1.0",
|
|
449
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
450
|
+
width: "40.000000pt",
|
|
451
|
+
height: "40.000000pt",
|
|
452
|
+
viewBox: "0 0 40.000000 40.000000",
|
|
453
|
+
preserveAspectRatio: "xMidYMid meet"
|
|
454
|
+
}, rest), React__default.createElement("g", {
|
|
455
|
+
transform: "translate(0.000000,40.000000) scale(0.100000,-0.100000)",
|
|
456
|
+
fill: "#000000",
|
|
457
|
+
stroke: "none"
|
|
458
|
+
}, React__default.createElement("path", {
|
|
459
|
+
d: "M109 372 c-43 -22 -59 -38 -81 -81 -36 -68 -36 -114 0 -182 22 -43\r\n 38 -59 81 -81 68 -36 114 -36 182 0 43 22 59 38 81 81 36 68 36 114 0 182 -22\r\n 43 -38 59 -81 81 -31 16 -69 28 -91 28 -22 0 -60 -12 -91 -28z m79 -124 c16\r\n -16 15 -60 -1 -82 -9 -12 -23 -17 -42 -14 -26 3 -30 8 -33 36 -5 54 44 92 76\r\n 60z m96 -1 c26 -19 13 -54 -24 -62 -17 -4 -30 -13 -30 -21 0 -8 -6 -14 -14\r\n -14 -10 0 -12 9 -5 43 4 23 8 48 9 55 0 16 41 16 64 -1z"
|
|
460
|
+
}), React__default.createElement("path", {
|
|
461
|
+
d: "M140 219 c-14 -24 -7 -49 14 -49 15 0 28 34 19 56 -7 20 -21 17 -33\r\n -7z"
|
|
462
|
+
}), React__default.createElement("path", {
|
|
463
|
+
d: "M247 233 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"
|
|
464
|
+
})));
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
var _excluded$d = ["width", "height"];
|
|
395
468
|
var USDT = function USDT(_ref) {
|
|
396
469
|
var _ref$width = _ref.width,
|
|
397
470
|
width = _ref$width === void 0 ? 37 : _ref$width,
|
|
398
471
|
_ref$height = _ref.height,
|
|
399
472
|
height = _ref$height === void 0 ? 37 : _ref$height,
|
|
400
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
473
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
401
474
|
return React__default.createElement("svg", Object.assign({
|
|
402
475
|
width: width,
|
|
403
476
|
height: height,
|
|
@@ -423,13 +496,13 @@ var USDT = function USDT(_ref) {
|
|
|
423
496
|
})));
|
|
424
497
|
};
|
|
425
498
|
|
|
426
|
-
var _excluded$
|
|
499
|
+
var _excluded$e = ["width", "height"];
|
|
427
500
|
var Fuse = function Fuse(_ref) {
|
|
428
501
|
var _ref$width = _ref.width,
|
|
429
502
|
width = _ref$width === void 0 ? 37 : _ref$width,
|
|
430
503
|
_ref$height = _ref.height,
|
|
431
504
|
height = _ref$height === void 0 ? 37 : _ref$height,
|
|
432
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
505
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
433
506
|
return React__default.createElement("svg", Object.assign({
|
|
434
507
|
width: width,
|
|
435
508
|
height: height,
|
|
@@ -455,13 +528,13 @@ var Fuse = function Fuse(_ref) {
|
|
|
455
528
|
})));
|
|
456
529
|
};
|
|
457
530
|
|
|
458
|
-
var _excluded$
|
|
531
|
+
var _excluded$f = ["width", "height"];
|
|
459
532
|
var Celo = function Celo(_ref) {
|
|
460
533
|
var _ref$width = _ref.width,
|
|
461
534
|
width = _ref$width === void 0 ? 37 : _ref$width,
|
|
462
535
|
_ref$height = _ref.height,
|
|
463
536
|
height = _ref$height === void 0 ? 37 : _ref$height,
|
|
464
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
537
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
465
538
|
return React__default.createElement("svg", Object.assign({
|
|
466
539
|
width: width,
|
|
467
540
|
height: height,
|
|
@@ -487,13 +560,13 @@ var Celo = function Celo(_ref) {
|
|
|
487
560
|
})));
|
|
488
561
|
};
|
|
489
562
|
|
|
490
|
-
var _excluded$
|
|
563
|
+
var _excluded$g = ["width", "height"];
|
|
491
564
|
var GoodDollar = function GoodDollar(_ref) {
|
|
492
565
|
var _ref$width = _ref.width,
|
|
493
566
|
width = _ref$width === void 0 ? 37 : _ref$width,
|
|
494
567
|
_ref$height = _ref.height,
|
|
495
568
|
height = _ref$height === void 0 ? 37 : _ref$height,
|
|
496
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
569
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
497
570
|
return React__default.createElement("svg", Object.assign({
|
|
498
571
|
width: width,
|
|
499
572
|
height: height,
|
|
@@ -519,7 +592,7 @@ var GoodDollar = function GoodDollar(_ref) {
|
|
|
519
592
|
})));
|
|
520
593
|
};
|
|
521
594
|
|
|
522
|
-
var _excluded$
|
|
595
|
+
var _excluded$h = ["width", "height", "fill"];
|
|
523
596
|
var Copy = function Copy(_ref) {
|
|
524
597
|
var _ref$width = _ref.width,
|
|
525
598
|
width = _ref$width === void 0 ? 20 : _ref$width,
|
|
@@ -527,7 +600,7 @@ var Copy = function Copy(_ref) {
|
|
|
527
600
|
height = _ref$height === void 0 ? 20 : _ref$height,
|
|
528
601
|
_ref$fill = _ref.fill,
|
|
529
602
|
fill = _ref$fill === void 0 ? '#979797' : _ref$fill,
|
|
530
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
603
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
531
604
|
return React__default.createElement("svg", Object.assign({
|
|
532
605
|
width: width,
|
|
533
606
|
height: height,
|
|
@@ -546,13 +619,13 @@ var Copy = function Copy(_ref) {
|
|
|
546
619
|
})));
|
|
547
620
|
};
|
|
548
621
|
|
|
549
|
-
var _excluded$
|
|
622
|
+
var _excluded$i = ["width", "height"];
|
|
550
623
|
var Bank = function Bank(_ref) {
|
|
551
624
|
var _ref$width = _ref.width,
|
|
552
625
|
width = _ref$width === void 0 ? 32 : _ref$width,
|
|
553
626
|
_ref$height = _ref.height,
|
|
554
627
|
height = _ref$height === void 0 ? 32 : _ref$height,
|
|
555
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
628
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
556
629
|
return React__default.createElement("svg", Object.assign({
|
|
557
630
|
width: width,
|
|
558
631
|
height: height,
|
|
@@ -589,13 +662,13 @@ var Bank = function Bank(_ref) {
|
|
|
589
662
|
})));
|
|
590
663
|
};
|
|
591
664
|
|
|
592
|
-
var _excluded$
|
|
665
|
+
var _excluded$j = ["width", "height"];
|
|
593
666
|
var BNB = function BNB(_ref) {
|
|
594
667
|
var _ref$width = _ref.width,
|
|
595
668
|
width = _ref$width === void 0 ? 59 : _ref$width,
|
|
596
669
|
_ref$height = _ref.height,
|
|
597
670
|
height = _ref$height === void 0 ? 58 : _ref$height,
|
|
598
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
671
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
599
672
|
return React__default.createElement("svg", Object.assign({
|
|
600
673
|
width: width,
|
|
601
674
|
height: height,
|
|
@@ -696,6 +769,9 @@ var AVAX_USDK_ADDRESS = '0x7C043d4D2b505740742dF6Fdb79C5caEe08728a5';
|
|
|
696
769
|
var BSC_USDK_ADDRESS = '0x824B0e195d4C6bfdaE9D52b3fE7079a238306572';
|
|
697
770
|
var FUSE_GDOLLAR_ADDRESS = '0x79BeecC4b165Ccf547662cB4f7C0e83b3796E5b3';
|
|
698
771
|
var CELO_GDOLLAR_ADDRESS = '0xAB89A70d1Af04ED8badf915Ba1f5b28E9F322624';
|
|
772
|
+
var OPTIMISM_USDK_ADDRESS = '0xb57D22Fb3aF7A5FCb675df09D2BBE74048462838';
|
|
773
|
+
var ARBITRIUM_USDK_ADDRESS = '0xb57D22Fb3aF7A5FCb675df09D2BBE74048462838';
|
|
774
|
+
var POLYGON_ZKEVM_ADDRESS = '0xb57D22Fb3aF7A5FCb675df09D2BBE74048462838';
|
|
699
775
|
|
|
700
776
|
var _CHAIN_NAMES_TO_IDS, _CHAIN_NAMES_TO_STRIN, _CHAIN_NAMES_TO_EXPLO, _CHAIN_NAMES_TO_GECKO, _CHAIN_IDS_TO_NAMES;
|
|
701
777
|
(function (ChainName) {
|
|
@@ -706,6 +782,9 @@ var _CHAIN_NAMES_TO_IDS, _CHAIN_NAMES_TO_STRIN, _CHAIN_NAMES_TO_EXPLO, _CHAIN_NA
|
|
|
706
782
|
ChainName["FUSE"] = "FUS";
|
|
707
783
|
ChainName["CELO"] = "CEL";
|
|
708
784
|
ChainName["BSC"] = "BSC";
|
|
785
|
+
ChainName["ARBITRIUM"] = "ARB";
|
|
786
|
+
ChainName["OPTIMISM"] = "OPT";
|
|
787
|
+
ChainName["POLYGON_ZKEVM"] = "ZKE";
|
|
709
788
|
})(exports.SupportNetworks || (exports.SupportNetworks = {}));
|
|
710
789
|
var SupportedChainId;
|
|
711
790
|
(function (SupportedChainId) {
|
|
@@ -715,12 +794,15 @@ var SupportedChainId;
|
|
|
715
794
|
SupportedChainId[SupportedChainId["FUSE"] = 122] = "FUSE";
|
|
716
795
|
SupportedChainId[SupportedChainId["CELO"] = 42220] = "CELO";
|
|
717
796
|
SupportedChainId[SupportedChainId["BSC"] = 97] = "BSC";
|
|
797
|
+
SupportedChainId[SupportedChainId["ARBITRIUM"] = 421613] = "ARBITRIUM";
|
|
798
|
+
SupportedChainId[SupportedChainId["OPTIMISM"] = 420] = "OPTIMISM";
|
|
799
|
+
SupportedChainId[SupportedChainId["POLYGON_ZKEM"] = 1442] = "POLYGON_ZKEM";
|
|
718
800
|
})(SupportedChainId || (SupportedChainId = {}));
|
|
719
|
-
var CHAIN_NAMES_TO_IDS = (_CHAIN_NAMES_TO_IDS = {}, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.ETHEREUM] = SupportedChainId.ETHEREUM, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.POLYGON] = SupportedChainId.POLYGON, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.AVALANCHE] = SupportedChainId.AVALANCHE, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.FUSE] = SupportedChainId.FUSE, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.CELO] = SupportedChainId.CELO, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.BSC] = SupportedChainId.BSC, _CHAIN_NAMES_TO_IDS);
|
|
720
|
-
var CHAIN_NAMES_TO_STRING = (_CHAIN_NAMES_TO_STRIN = {}, _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.ETHEREUM] = 'Ethereum', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.POLYGON] = 'Polygon', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.AVALANCHE] = 'Avalanche', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.FUSE] = 'Fuse', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.CELO] = 'Celo', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.SOLANA] = 'Solana', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.BSC] = 'Binance', _CHAIN_NAMES_TO_STRIN);
|
|
721
|
-
var CHAIN_NAMES_TO_EXPLORER = (_CHAIN_NAMES_TO_EXPLO = {}, _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.ETHEREUM] = 'sepolia.etherscan.io', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.POLYGON] = 'mumbai.polygonscan.com', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.AVALANCHE] = 'testnet.snowtrace.io', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.FUSE] = 'explorer.fuse.io', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.CELO] = 'explorer.celo.org', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.SOLANA] = 'solscan.io', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.BSC] = 'testnet.bscscan.com', _CHAIN_NAMES_TO_EXPLO);
|
|
722
|
-
var CHAIN_NAMES_TO_GECKO_ID = (_CHAIN_NAMES_TO_GECKO = {}, _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.ETHEREUM] = 'ethereum', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.POLYGON] = 'matic-network', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.AVALANCHE] = 'avalanche-2', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.FUSE] = 'fuse-network-token', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.CELO] = 'celo', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.SOLANA] = 'solana', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.BSC] = 'binancecoin', _CHAIN_NAMES_TO_GECKO);
|
|
723
|
-
var CHAIN_IDS_TO_NAMES = (_CHAIN_IDS_TO_NAMES = {}, _CHAIN_IDS_TO_NAMES[SupportedChainId.ETHEREUM] = exports.SupportNetworks.ETHEREUM, _CHAIN_IDS_TO_NAMES[SupportedChainId.POLYGON] = exports.SupportNetworks.POLYGON, _CHAIN_IDS_TO_NAMES[SupportedChainId.AVALANCHE] = exports.SupportNetworks.AVALANCHE, _CHAIN_IDS_TO_NAMES[SupportedChainId.FUSE] = exports.SupportNetworks.FUSE, _CHAIN_IDS_TO_NAMES[SupportedChainId.CELO] = exports.SupportNetworks.CELO, _CHAIN_IDS_TO_NAMES[SupportedChainId.BSC] = exports.SupportNetworks.BSC, _CHAIN_IDS_TO_NAMES);
|
|
801
|
+
var CHAIN_NAMES_TO_IDS = (_CHAIN_NAMES_TO_IDS = {}, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.ETHEREUM] = SupportedChainId.ETHEREUM, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.POLYGON] = SupportedChainId.POLYGON, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.AVALANCHE] = SupportedChainId.AVALANCHE, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.FUSE] = SupportedChainId.FUSE, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.CELO] = SupportedChainId.CELO, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.BSC] = SupportedChainId.BSC, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.OPTIMISM] = SupportedChainId.OPTIMISM, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.ARBITRIUM] = SupportedChainId.ARBITRIUM, _CHAIN_NAMES_TO_IDS[exports.SupportNetworks.POLYGON_ZKEVM] = SupportedChainId.POLYGON_ZKEM, _CHAIN_NAMES_TO_IDS);
|
|
802
|
+
var CHAIN_NAMES_TO_STRING = (_CHAIN_NAMES_TO_STRIN = {}, _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.ETHEREUM] = 'Ethereum', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.POLYGON] = 'Polygon', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.AVALANCHE] = 'Avalanche', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.FUSE] = 'Fuse', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.CELO] = 'Celo', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.SOLANA] = 'Solana', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.BSC] = 'Binance', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.OPTIMISM] = 'Optimism', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.ARBITRIUM] = 'Arbitrium', _CHAIN_NAMES_TO_STRIN[exports.SupportNetworks.POLYGON_ZKEVM] = 'Polygon zkEVM', _CHAIN_NAMES_TO_STRIN);
|
|
803
|
+
var CHAIN_NAMES_TO_EXPLORER = (_CHAIN_NAMES_TO_EXPLO = {}, _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.ETHEREUM] = 'sepolia.etherscan.io', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.POLYGON] = 'mumbai.polygonscan.com', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.AVALANCHE] = 'testnet.snowtrace.io', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.FUSE] = 'explorer.fuse.io', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.CELO] = 'explorer.celo.org', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.SOLANA] = 'solscan.io', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.BSC] = 'testnet.bscscan.com', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.OPTIMISM] = 'goerli-optimism.etherscan.io', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.ARBITRIUM] = 'goerli.arbiscan.io', _CHAIN_NAMES_TO_EXPLO[exports.SupportNetworks.POLYGON_ZKEVM] = 'explorer.public.zkevm-test.net', _CHAIN_NAMES_TO_EXPLO);
|
|
804
|
+
var CHAIN_NAMES_TO_GECKO_ID = (_CHAIN_NAMES_TO_GECKO = {}, _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.ETHEREUM] = 'ethereum', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.POLYGON] = 'matic-network', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.AVALANCHE] = 'avalanche-2', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.FUSE] = 'fuse-network-token', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.CELO] = 'celo', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.SOLANA] = 'solana', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.BSC] = 'binancecoin', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.OPTIMISM] = 'ethereum', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.ARBITRIUM] = 'ethereum', _CHAIN_NAMES_TO_GECKO[exports.SupportNetworks.POLYGON_ZKEVM] = 'matic-network', _CHAIN_NAMES_TO_GECKO);
|
|
805
|
+
var CHAIN_IDS_TO_NAMES = (_CHAIN_IDS_TO_NAMES = {}, _CHAIN_IDS_TO_NAMES[SupportedChainId.ETHEREUM] = exports.SupportNetworks.ETHEREUM, _CHAIN_IDS_TO_NAMES[SupportedChainId.POLYGON] = exports.SupportNetworks.POLYGON, _CHAIN_IDS_TO_NAMES[SupportedChainId.AVALANCHE] = exports.SupportNetworks.AVALANCHE, _CHAIN_IDS_TO_NAMES[SupportedChainId.FUSE] = exports.SupportNetworks.FUSE, _CHAIN_IDS_TO_NAMES[SupportedChainId.CELO] = exports.SupportNetworks.CELO, _CHAIN_IDS_TO_NAMES[SupportedChainId.BSC] = exports.SupportNetworks.BSC, _CHAIN_IDS_TO_NAMES[SupportedChainId.OPTIMISM] = exports.SupportNetworks.OPTIMISM, _CHAIN_IDS_TO_NAMES[SupportedChainId.ARBITRIUM] = exports.SupportNetworks.ARBITRIUM, _CHAIN_IDS_TO_NAMES[SupportedChainId.POLYGON_ZKEM] = exports.SupportNetworks.POLYGON_ZKEVM, _CHAIN_IDS_TO_NAMES);
|
|
724
806
|
var networkOptions = [{
|
|
725
807
|
id: exports.SupportNetworks.ETHEREUM,
|
|
726
808
|
label: 'Ethereum',
|
|
@@ -749,6 +831,18 @@ var networkOptions = [{
|
|
|
749
831
|
id: exports.SupportNetworks.SOLANA,
|
|
750
832
|
label: 'Solana',
|
|
751
833
|
icon: Solana
|
|
834
|
+
}, {
|
|
835
|
+
id: exports.SupportNetworks.ARBITRIUM,
|
|
836
|
+
label: 'Arbitrium',
|
|
837
|
+
icon: Arbitrium
|
|
838
|
+
}, {
|
|
839
|
+
id: exports.SupportNetworks.OPTIMISM,
|
|
840
|
+
label: 'Optimism',
|
|
841
|
+
icon: Optimism
|
|
842
|
+
}, {
|
|
843
|
+
id: exports.SupportNetworks.POLYGON_ZKEVM,
|
|
844
|
+
label: 'Polygon zkEVM',
|
|
845
|
+
icon: Ethereum$1
|
|
752
846
|
}];
|
|
753
847
|
var getNetworkOption = function getNetworkOption(id) {
|
|
754
848
|
var index = networkOptions.findIndex(function (item) {
|
|
@@ -760,7 +854,7 @@ var getNetworkOption = function getNetworkOption(id) {
|
|
|
760
854
|
var CLUSTER = 'devnet';
|
|
761
855
|
var SOLANA_HOST = web3_js.clusterApiUrl(CLUSTER);
|
|
762
856
|
var isEVMChain = function isEVMChain(chainId) {
|
|
763
|
-
return chainId === exports.SupportNetworks.ETHEREUM || chainId === exports.SupportNetworks.POLYGON || chainId === exports.SupportNetworks.AVALANCHE || chainId === exports.SupportNetworks.FUSE || chainId === exports.SupportNetworks.CELO || chainId === exports.SupportNetworks.BSC;
|
|
857
|
+
return chainId === exports.SupportNetworks.ETHEREUM || chainId === exports.SupportNetworks.POLYGON || chainId === exports.SupportNetworks.AVALANCHE || chainId === exports.SupportNetworks.FUSE || chainId === exports.SupportNetworks.CELO || chainId === exports.SupportNetworks.BSC || chainId === exports.SupportNetworks.OPTIMISM || chainId === exports.SupportNetworks.ARBITRIUM || chainId === exports.SupportNetworks.POLYGON_ZKEVM;
|
|
764
858
|
};
|
|
765
859
|
var COIN_LIST = {
|
|
766
860
|
USDK: {
|
|
@@ -772,7 +866,10 @@ var COIN_LIST = {
|
|
|
772
866
|
ETH: ETHEREUM_USDK_ADDRESS,
|
|
773
867
|
POL: POLYGON_USDK_ADDRESS,
|
|
774
868
|
AVX: AVAX_USDK_ADDRESS,
|
|
775
|
-
BSC: BSC_USDK_ADDRESS
|
|
869
|
+
BSC: BSC_USDK_ADDRESS,
|
|
870
|
+
OPT: OPTIMISM_USDK_ADDRESS,
|
|
871
|
+
ARB: ARBITRIUM_USDK_ADDRESS,
|
|
872
|
+
ZKE: POLYGON_ZKEVM_ADDRESS
|
|
776
873
|
},
|
|
777
874
|
decimals: 6
|
|
778
875
|
},
|