@rango-dev/ui 0.1.10-next.91 → 0.1.10
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 +1 -181
- package/dist/components/Alert/Alert.d.ts +3 -2
- package/dist/components/Alert/LoadingFailedAlert.d.ts +2 -0
- package/dist/components/Alert/NotFoundAlert.d.ts +7 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/BlockchainSelector/BlockchainSelector.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +3 -3
- package/dist/components/Divider/Divider.d.ts +6 -0
- package/dist/components/Divider/index.d.ts +1 -0
- package/dist/components/Header/Header.d.ts +9 -0
- package/dist/components/Header/index.d.ts +1 -0
- package/dist/components/Icon/ArrowRightIcon.d.ts +3 -0
- package/dist/components/Icon/ChevronRightIcon.d.ts +3 -0
- package/dist/components/Icon/DisconnectIcon.d.ts +3 -0
- package/dist/components/Icon/index.d.ts +3 -0
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/LiquiditySourceList/LiquiditySourceList.d.ts +3 -1
- package/dist/components/LiquiditySourcesSelector/LiquiditySourcesSelector.d.ts +2 -1
- package/dist/components/SelectableWalletList/mock.d.ts +1 -1
- package/dist/components/Settings/Settings.d.ts +2 -1
- package/dist/components/Spacer/Spacer.d.ts +1 -1
- package/dist/components/SwapContainer/SwapContainer.d.ts +1 -0
- package/dist/components/SwapDetail/Token.d.ts +16 -0
- package/dist/components/TextField/TextField.stories.d.ts +1 -1
- package/dist/components/TokenSelector/TokenSelector.d.ts +3 -0
- package/dist/components/Typography/Typography.d.ts +3 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/containers/ConfirmSwap/ConfirmSwap.d.ts +10 -17
- package/dist/containers/ConfirmSwap/ConfirmSwap.stories.d.ts +1 -0
- package/dist/containers/ConfirmSwap/mock.d.ts +3 -0
- package/dist/containers/History/History.d.ts +6 -1
- package/dist/containers/History/index.d.ts +1 -1
- package/dist/containers/History/types.d.ts +3 -24
- package/dist/containers/SwapHistory/SwapHistory.d.ts +16 -3
- package/dist/containers/SwapHistory/SwapMessages.d.ts +17 -0
- package/dist/containers/index.d.ts +0 -1
- package/dist/helper/index.d.ts +1 -0
- package/dist/types/meta.d.ts +1 -0
- package/dist/ui.cjs.development.js +1455 -1033
- package/dist/ui.cjs.development.js.map +1 -1
- package/dist/ui.cjs.production.min.js +1 -1
- package/dist/ui.cjs.production.min.js.map +1 -1
- package/dist/ui.esm.js +1463 -1046
- package/dist/ui.esm.js.map +1 -1
- package/package.json +3 -2
- package/src/components/Alert/Alert.tsx +63 -39
- package/src/components/Alert/LoadingFailedAlert.tsx +11 -0
- package/src/components/Alert/NotFoundAlert.tsx +19 -0
- package/src/components/Alert/index.ts +1 -0
- package/src/components/BestRoute/BestRoute.tsx +28 -19
- package/src/components/BestRoute/mock.ts +10 -0
- package/src/components/BlockchainSelector/BlockchainSelector.tsx +13 -21
- package/src/components/Button/Button.stories.tsx +1 -1
- package/src/components/Button/Button.tsx +36 -23
- package/src/components/Chip/Chip.tsx +7 -4
- package/src/components/ConnectWalletsModal/mockData.ts +16 -0
- package/src/components/Divider/Divider.tsx +41 -0
- package/src/components/Divider/index.ts +1 -0
- package/src/components/Header/Header.tsx +39 -0
- package/src/components/Header/index.ts +1 -0
- package/src/components/Icon/ArrowRightIcon.tsx +31 -0
- package/src/components/Icon/ChevronRightIcon.tsx +29 -0
- package/src/components/Icon/DisconnectIcon.tsx +31 -0
- package/src/components/Icon/HistoryIcon.tsx +12 -18
- package/src/components/Icon/RetryIcon.tsx +13 -13
- package/src/components/Icon/SettingIcon.tsx +6 -14
- package/src/components/Icon/index.ts +3 -0
- package/src/components/Icon/types.tsx +1 -1
- package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +104 -30
- package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.tsx +16 -11
- package/src/components/Radio/Radio.tsx +5 -4
- package/src/components/SecondaryPage/SecondaryPage.tsx +26 -52
- package/src/components/SelectableWalletList/SelectableWalletList.tsx +5 -1
- package/src/components/SelectableWalletList/mock.ts +4 -3
- package/src/components/Settings/Settings.tsx +47 -12
- package/src/components/Spacer/Spacer.tsx +31 -1
- package/src/components/StatusDrawer/StatusDrawer.tsx +1 -0
- package/src/components/StepDetail/StepDetail.tsx +19 -7
- package/src/components/SwapContainer/SwapContainer.tsx +22 -17
- package/src/components/SwapDetail/SwapDetail.tsx +77 -115
- package/src/components/SwapDetail/Token.tsx +68 -0
- package/src/components/SwapDetail/mock.ts +1 -0
- package/src/components/Switch/Switch.tsx +7 -5
- package/src/components/TextField/TextField.tsx +3 -1
- package/src/components/TokenList/TokenItem.tsx +4 -1
- package/src/components/TokenList/TokenList.tsx +16 -18
- package/src/components/TokenSelector/TokenSelector.tsx +47 -10
- package/src/components/Typography/Typography.stories.tsx +4 -0
- package/src/components/Typography/Typography.tsx +20 -9
- package/src/components/Wallet/State.tsx +2 -3
- package/src/components/Wallet/Wallet.tsx +33 -6
- package/src/components/index.ts +2 -0
- package/src/containers/ConfirmSwap/ConfirmSwap.stories.tsx +11 -2
- package/src/containers/ConfirmSwap/ConfirmSwap.tsx +103 -119
- package/src/containers/ConfirmSwap/mock.ts +79 -2
- package/src/containers/History/History.tsx +57 -38
- package/src/containers/History/index.ts +1 -1
- package/src/containers/History/mock.ts +1 -0
- package/src/containers/History/types.tsx +2 -30
- package/src/containers/SwapHistory/SwapHistory.tsx +309 -165
- package/src/containers/SwapHistory/SwapMessages.tsx +116 -0
- package/src/containers/SwapHistory/mock.ts +1 -0
- package/src/containers/index.ts +0 -1
- package/src/helper/index.ts +14 -0
- package/src/theme.ts +4 -2
- package/src/types/meta.ts +2 -0
- package/dist/containers/ConfirmWallets/ConfirmWallets.d.ts +0 -18
- package/dist/containers/ConfirmWallets/ConfirmWallets.stories.d.ts +0 -6
- package/dist/containers/ConfirmWallets/index.d.ts +0 -1
- package/dist/containers/ConfirmWallets/mock.d.ts +0 -5
- package/dist/helper/swaps.d.ts +0 -5
- package/src/containers/ConfirmWallets/ConfirmWallets.stories.tsx +0 -26
- package/src/containers/ConfirmWallets/ConfirmWallets.tsx +0 -118
- package/src/containers/ConfirmWallets/index.ts +0 -1
- package/src/containers/ConfirmWallets/mock.ts +0 -222
- package/src/helper/swaps.ts +0 -23
|
@@ -6,15 +6,15 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
6
6
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var React__default = _interopDefault(React);
|
|
9
|
+
var RadixTooltip = require('@radix-ui/react-tooltip');
|
|
10
|
+
var reactWindow = require('react-window');
|
|
11
|
+
var InfiniteLoader = _interopDefault(require('react-window-infinite-loader'));
|
|
12
|
+
var AutoSizer = _interopDefault(require('react-virtualized-auto-sizer'));
|
|
9
13
|
var RadixCheckbox = require('@radix-ui/react-checkbox');
|
|
10
14
|
var reactDom = require('react-dom');
|
|
11
15
|
var walletsShared = require('@rango-dev/wallets-shared');
|
|
12
16
|
var RadixSwitch = require('@radix-ui/react-switch');
|
|
13
17
|
var RadioGroup = require('@radix-ui/react-radio-group');
|
|
14
|
-
var reactWindow = require('react-window');
|
|
15
|
-
var InfiniteLoader = _interopDefault(require('react-window-infinite-loader'));
|
|
16
|
-
var AutoSizer = _interopDefault(require('react-virtualized-auto-sizer'));
|
|
17
|
-
var RadixTooltip = require('@radix-ui/react-tooltip');
|
|
18
18
|
var reactColor = require('react-color');
|
|
19
19
|
|
|
20
20
|
function _extends() {
|
|
@@ -85,7 +85,9 @@ var theme = {
|
|
|
85
85
|
error100: '#F7D4D6',
|
|
86
86
|
error300: '#FF3333',
|
|
87
87
|
error500: '#FF0000',
|
|
88
|
-
error700: '#E60000'
|
|
88
|
+
error700: '#E60000',
|
|
89
|
+
// Only use this color when you are going to use white for both dark and light theme.
|
|
90
|
+
white: '#fff'
|
|
89
91
|
},
|
|
90
92
|
space: {
|
|
91
93
|
2: '2px',
|
|
@@ -140,8 +142,8 @@ var theme = {
|
|
|
140
142
|
borderWidths: {},
|
|
141
143
|
borderStyles: {},
|
|
142
144
|
radii: {
|
|
143
|
-
5: '
|
|
144
|
-
10: '
|
|
145
|
+
5: '8px',
|
|
146
|
+
10: '12px'
|
|
145
147
|
},
|
|
146
148
|
shadows: {
|
|
147
149
|
s: '0px 3px 5px 3px #f0f2f5, 0px 6px 10px 3px #f0f2f5, 0px 1px 18px 3px #f0f2f5'
|
|
@@ -536,26 +538,34 @@ var HistoryIcon = function HistoryIcon(_ref) {
|
|
|
536
538
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
537
539
|
color = _ref.color,
|
|
538
540
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
539
|
-
return React.createElement(
|
|
541
|
+
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
540
542
|
width: size,
|
|
541
543
|
height: size,
|
|
542
544
|
viewBox: "0 0 24 24",
|
|
543
545
|
color: color,
|
|
544
546
|
fill: "none",
|
|
547
|
+
stroke: "currentColor",
|
|
548
|
+
"stroke-width": "2",
|
|
549
|
+
"stroke-linecap": "round",
|
|
550
|
+
"stroke-linejoin": "round",
|
|
545
551
|
xmlns: "http://www.w3.org/2000/svg",
|
|
546
552
|
className: "_icon"
|
|
547
553
|
}, props), React.createElement("path", {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
}), React.createElement("
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
554
|
+
d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"
|
|
555
|
+
}), React.createElement("polyline", {
|
|
556
|
+
points: "14 2 14 8 20 8"
|
|
557
|
+
}), React.createElement("line", {
|
|
558
|
+
x1: "16",
|
|
559
|
+
y1: "13",
|
|
560
|
+
x2: "8",
|
|
561
|
+
y2: "13"
|
|
562
|
+
}), React.createElement("line", {
|
|
563
|
+
x1: "16",
|
|
564
|
+
y1: "17",
|
|
565
|
+
x2: "8",
|
|
566
|
+
y2: "17"
|
|
567
|
+
}), React.createElement("polyline", {
|
|
568
|
+
points: "10 9 9 9 8 9"
|
|
559
569
|
}));
|
|
560
570
|
};
|
|
561
571
|
HistoryIcon.toString = function () {
|
|
@@ -603,21 +613,19 @@ var SettingsIcon = function SettingsIcon(_ref) {
|
|
|
603
613
|
height: size,
|
|
604
614
|
viewBox: "0 0 24 24",
|
|
605
615
|
color: color,
|
|
616
|
+
stroke: "currentColor",
|
|
617
|
+
"stroke-width": "2",
|
|
618
|
+
"stroke-linecap": "round",
|
|
619
|
+
"stroke-linejoin": "round",
|
|
606
620
|
fill: "none",
|
|
607
621
|
xmlns: "http://www.w3.org/2000/svg",
|
|
608
622
|
className: "_icon"
|
|
609
|
-
}, props), React.createElement("
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
strokeLinecap: "round",
|
|
614
|
-
strokeLinejoin: "round"
|
|
623
|
+
}, props), React.createElement("circle", {
|
|
624
|
+
cx: "12",
|
|
625
|
+
cy: "12",
|
|
626
|
+
r: "3"
|
|
615
627
|
}), React.createElement("path", {
|
|
616
|
-
d: "
|
|
617
|
-
strokeWidth: 1.5,
|
|
618
|
-
strokeMiterlimit: 10,
|
|
619
|
-
strokeLinecap: "round",
|
|
620
|
-
strokeLinejoin: "round"
|
|
628
|
+
d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"
|
|
621
629
|
}));
|
|
622
630
|
};
|
|
623
631
|
SettingsIcon.toString = function () {
|
|
@@ -833,12 +841,72 @@ DownloadIcon.toString = function () {
|
|
|
833
841
|
return '._icon';
|
|
834
842
|
};
|
|
835
843
|
|
|
836
|
-
var _excluded$l = ["
|
|
844
|
+
var _excluded$l = ["color", "size"];
|
|
845
|
+
var ChevronRightIcon = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
846
|
+
var _ref$color = _ref.color,
|
|
847
|
+
color = _ref$color === void 0 ? 'black' : _ref$color,
|
|
848
|
+
_ref$size = _ref.size,
|
|
849
|
+
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
850
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
|
|
851
|
+
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
852
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
853
|
+
width: size,
|
|
854
|
+
height: size,
|
|
855
|
+
color: color,
|
|
856
|
+
viewBox: "0 0 24 24",
|
|
857
|
+
fill: "none",
|
|
858
|
+
stroke: "currentColor",
|
|
859
|
+
"stroke-width": "2",
|
|
860
|
+
"stroke-linecap": "round",
|
|
861
|
+
"stroke-linejoin": "round",
|
|
862
|
+
className: "_icon"
|
|
863
|
+
}, props, {
|
|
864
|
+
ref: forwardedRef
|
|
865
|
+
}), React.createElement("polyline", {
|
|
866
|
+
points: "9 18 15 12 9 6"
|
|
867
|
+
}));
|
|
868
|
+
});
|
|
869
|
+
ChevronRightIcon.toString = function () {
|
|
870
|
+
return '._icon';
|
|
871
|
+
};
|
|
872
|
+
|
|
873
|
+
var _excluded$m = ["size", "color"];
|
|
874
|
+
var ArrowRightIcon = function ArrowRightIcon(_ref) {
|
|
875
|
+
var _ref$size = _ref.size,
|
|
876
|
+
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
877
|
+
color = _ref.color,
|
|
878
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
|
|
879
|
+
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
880
|
+
width: size,
|
|
881
|
+
height: size,
|
|
882
|
+
viewBox: "0 0 24 24",
|
|
883
|
+
color: color,
|
|
884
|
+
fill: "none",
|
|
885
|
+
stroke: "currentColor",
|
|
886
|
+
"stroke-width": "2",
|
|
887
|
+
"stroke-linecap": "round",
|
|
888
|
+
"stroke-linejoin": "round",
|
|
889
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
890
|
+
className: "_icon"
|
|
891
|
+
}, props), React.createElement("line", {
|
|
892
|
+
x1: "5",
|
|
893
|
+
y1: "12",
|
|
894
|
+
x2: "19",
|
|
895
|
+
y2: "12"
|
|
896
|
+
}), React.createElement("polyline", {
|
|
897
|
+
points: "12 5 19 12 12 19"
|
|
898
|
+
}));
|
|
899
|
+
};
|
|
900
|
+
ArrowRightIcon.toString = function () {
|
|
901
|
+
return '._icon';
|
|
902
|
+
};
|
|
903
|
+
|
|
904
|
+
var _excluded$n = ["size", "color"];
|
|
837
905
|
var RetryRightIcon = function RetryRightIcon(_ref) {
|
|
838
906
|
var _ref$size = _ref.size,
|
|
839
907
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
840
908
|
color = _ref.color,
|
|
841
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
909
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
|
|
842
910
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
843
911
|
width: size,
|
|
844
912
|
height: size,
|
|
@@ -858,12 +926,12 @@ RetryRightIcon.toString = function () {
|
|
|
858
926
|
return '._icon';
|
|
859
927
|
};
|
|
860
928
|
|
|
861
|
-
var _excluded$
|
|
929
|
+
var _excluded$o = ["size", "color"];
|
|
862
930
|
var RetryLeftIcon = function RetryLeftIcon(_ref) {
|
|
863
931
|
var _ref$size = _ref.size,
|
|
864
932
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
865
933
|
color = _ref.color,
|
|
866
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
934
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
|
|
867
935
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
868
936
|
width: size,
|
|
869
937
|
height: size,
|
|
@@ -883,12 +951,12 @@ RetryLeftIcon.toString = function () {
|
|
|
883
951
|
return '._icon';
|
|
884
952
|
};
|
|
885
953
|
|
|
886
|
-
var _excluded$
|
|
954
|
+
var _excluded$p = ["size", "color"];
|
|
887
955
|
var TryAgainIcon = function TryAgainIcon(_ref) {
|
|
888
956
|
var _ref$size = _ref.size,
|
|
889
957
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
890
958
|
color = _ref.color,
|
|
891
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
959
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
|
|
892
960
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
893
961
|
width: size,
|
|
894
962
|
height: size,
|
|
@@ -908,12 +976,12 @@ TryAgainIcon.toString = function () {
|
|
|
908
976
|
return '._icon';
|
|
909
977
|
};
|
|
910
978
|
|
|
911
|
-
var _excluded$
|
|
979
|
+
var _excluded$q = ["size", "color"];
|
|
912
980
|
var VerticalSwapIcon = function VerticalSwapIcon(_ref) {
|
|
913
981
|
var _ref$size = _ref.size,
|
|
914
982
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
915
983
|
color = _ref.color,
|
|
916
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
984
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
|
|
917
985
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
918
986
|
width: size,
|
|
919
987
|
height: size,
|
|
@@ -939,12 +1007,12 @@ VerticalSwapIcon.toString = function () {
|
|
|
939
1007
|
return '._icon';
|
|
940
1008
|
};
|
|
941
1009
|
|
|
942
|
-
var _excluded$
|
|
1010
|
+
var _excluded$r = ["size", "color"];
|
|
943
1011
|
var HorizontalSwapIcon = function HorizontalSwapIcon(_ref) {
|
|
944
1012
|
var _ref$size = _ref.size,
|
|
945
1013
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
946
1014
|
color = _ref.color,
|
|
947
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1015
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$r);
|
|
948
1016
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
949
1017
|
width: size,
|
|
950
1018
|
height: size,
|
|
@@ -970,39 +1038,43 @@ HorizontalSwapIcon.toString = function () {
|
|
|
970
1038
|
return '._icon';
|
|
971
1039
|
};
|
|
972
1040
|
|
|
973
|
-
var _excluded$
|
|
1041
|
+
var _excluded$s = ["color", "size"];
|
|
974
1042
|
var RetryIcon = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
975
|
-
var color = _ref.color,
|
|
1043
|
+
var _ref$color = _ref.color,
|
|
1044
|
+
color = _ref$color === void 0 ? 'black' : _ref$color,
|
|
976
1045
|
_ref$size = _ref.size,
|
|
977
1046
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
978
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
979
|
-
return React.createElement(
|
|
1047
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
1048
|
+
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
1049
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
980
1050
|
width: size,
|
|
981
1051
|
height: size,
|
|
982
|
-
fill: "none",
|
|
983
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
984
|
-
viewBox: "0 0 24 24",
|
|
985
1052
|
color: color,
|
|
1053
|
+
viewBox: "0 0 24 24",
|
|
1054
|
+
fill: "none",
|
|
1055
|
+
stroke: "currentColor",
|
|
1056
|
+
"stroke-width": "2",
|
|
1057
|
+
"stroke-linecap": "round",
|
|
1058
|
+
"stroke-linejoin": "round",
|
|
986
1059
|
className: "_icon"
|
|
987
1060
|
}, props, {
|
|
988
1061
|
ref: forwardedRef
|
|
1062
|
+
}), React.createElement("polyline", {
|
|
1063
|
+
points: "23 4 23 10 17 10"
|
|
989
1064
|
}), React.createElement("path", {
|
|
990
|
-
|
|
991
|
-
clipRule: "evenodd",
|
|
992
|
-
d: "M17.016 13.45c.199-.384.002-.842-.397-1.005-.406-.166-.864.033-1.077.416A6.17 6.17 0 0 1 13 15.345a6.051 6.051 0 0 1-4.244.513 6.127 6.127 0 0 1-3.543-2.425 6.286 6.286 0 0 1 .73-8.095A6.089 6.089 0 0 1 9.86 3.604a6.07 6.07 0 0 1 4.083 1.286 6.196 6.196 0 0 1 1.65 1.97l-1.053.363a.302.302 0 0 0-.073.534l2.607 1.758a.3.3 0 0 0 .45-.155l1.01-3.007a.298.298 0 0 0-.38-.378l-1.057.365a7.79 7.79 0 0 0-2.194-2.713 7.627 7.627 0 0 0-5.13-1.615A7.65 7.65 0 0 0 4.852 4.19a7.898 7.898 0 0 0-.917 10.17 7.7 7.7 0 0 0 4.452 3.048 7.604 7.604 0 0 0 5.333-.644 7.757 7.757 0 0 0 3.297-3.315Z",
|
|
993
|
-
fill: color
|
|
1065
|
+
d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10"
|
|
994
1066
|
}));
|
|
995
1067
|
});
|
|
996
1068
|
RetryIcon.toString = function () {
|
|
997
1069
|
return '._icon';
|
|
998
1070
|
};
|
|
999
1071
|
|
|
1000
|
-
var _excluded$
|
|
1072
|
+
var _excluded$t = ["size", "color"];
|
|
1001
1073
|
var WalletIcon = function WalletIcon(_ref) {
|
|
1002
1074
|
var _ref$size = _ref.size,
|
|
1003
1075
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1004
1076
|
color = _ref.color,
|
|
1005
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1077
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
1006
1078
|
return React.createElement(SvgWithFillColor, Object.assign({
|
|
1007
1079
|
width: size,
|
|
1008
1080
|
height: size,
|
|
@@ -1029,12 +1101,12 @@ WalletIcon.toString = function () {
|
|
|
1029
1101
|
return '._icon';
|
|
1030
1102
|
};
|
|
1031
1103
|
|
|
1032
|
-
var _excluded$
|
|
1104
|
+
var _excluded$u = ["size", "color"];
|
|
1033
1105
|
var AddWalletIcon = function AddWalletIcon(_ref) {
|
|
1034
1106
|
var _ref$size = _ref.size,
|
|
1035
1107
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1036
1108
|
color = _ref.color,
|
|
1037
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1109
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
1038
1110
|
return React.createElement(SvgWithFillColor, Object.assign({
|
|
1039
1111
|
width: size,
|
|
1040
1112
|
height: size,
|
|
@@ -1069,12 +1141,12 @@ AddWalletIcon.toString = function () {
|
|
|
1069
1141
|
return '._icon';
|
|
1070
1142
|
};
|
|
1071
1143
|
|
|
1072
|
-
var _excluded$
|
|
1144
|
+
var _excluded$v = ["size", "color"];
|
|
1073
1145
|
var DeleteWalletIcon = function DeleteWalletIcon(_ref) {
|
|
1074
1146
|
var _ref$size = _ref.size,
|
|
1075
1147
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1076
1148
|
color = _ref.color,
|
|
1077
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1149
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
1078
1150
|
return React.createElement(SvgWithFillColor, Object.assign({
|
|
1079
1151
|
width: size,
|
|
1080
1152
|
height: size,
|
|
@@ -1109,12 +1181,12 @@ DeleteWalletIcon.toString = function () {
|
|
|
1109
1181
|
return '._icon';
|
|
1110
1182
|
};
|
|
1111
1183
|
|
|
1112
|
-
var _excluded$
|
|
1184
|
+
var _excluded$w = ["size", "color"];
|
|
1113
1185
|
var CheckWalletIcon = function CheckWalletIcon(_ref) {
|
|
1114
1186
|
var _ref$size = _ref.size,
|
|
1115
1187
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1116
1188
|
color = _ref.color,
|
|
1117
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1189
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
1118
1190
|
return React.createElement(SvgWithFillColor, Object.assign({
|
|
1119
1191
|
width: size,
|
|
1120
1192
|
height: size,
|
|
@@ -1145,12 +1217,12 @@ CheckWalletIcon.toString = function () {
|
|
|
1145
1217
|
return '._icon';
|
|
1146
1218
|
};
|
|
1147
1219
|
|
|
1148
|
-
var _excluded$
|
|
1220
|
+
var _excluded$x = ["size", "color"];
|
|
1149
1221
|
var SwapWalletIcon = function SwapWalletIcon(_ref) {
|
|
1150
1222
|
var _ref$size = _ref.size,
|
|
1151
1223
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1152
1224
|
color = _ref.color,
|
|
1153
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1225
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
1154
1226
|
return React.createElement(SvgWithFillColor, Object.assign({
|
|
1155
1227
|
width: size,
|
|
1156
1228
|
height: size,
|
|
@@ -1185,12 +1257,48 @@ SwapWalletIcon.toString = function () {
|
|
|
1185
1257
|
return '._icon';
|
|
1186
1258
|
};
|
|
1187
1259
|
|
|
1188
|
-
var _excluded$
|
|
1260
|
+
var _excluded$y = ["color", "size"];
|
|
1261
|
+
var DisconnectIcon = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
1262
|
+
var _ref$color = _ref.color,
|
|
1263
|
+
color = _ref$color === void 0 ? 'black' : _ref$color,
|
|
1264
|
+
_ref$size = _ref.size,
|
|
1265
|
+
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1266
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
1267
|
+
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
1268
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1269
|
+
width: size,
|
|
1270
|
+
height: size,
|
|
1271
|
+
color: color,
|
|
1272
|
+
viewBox: "0 0 24 24",
|
|
1273
|
+
fill: "none",
|
|
1274
|
+
stroke: "currentColor",
|
|
1275
|
+
"stroke-width": "2",
|
|
1276
|
+
"stroke-linecap": "round",
|
|
1277
|
+
"stroke-linejoin": "round",
|
|
1278
|
+
className: "_icon"
|
|
1279
|
+
}, props, {
|
|
1280
|
+
ref: forwardedRef
|
|
1281
|
+
}), React.createElement("path", {
|
|
1282
|
+
d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"
|
|
1283
|
+
}), React.createElement("polyline", {
|
|
1284
|
+
points: "16 17 21 12 16 7"
|
|
1285
|
+
}), React.createElement("line", {
|
|
1286
|
+
x1: "21",
|
|
1287
|
+
y1: "12",
|
|
1288
|
+
x2: "9",
|
|
1289
|
+
y2: "12"
|
|
1290
|
+
}));
|
|
1291
|
+
});
|
|
1292
|
+
DisconnectIcon.toString = function () {
|
|
1293
|
+
return '._icon';
|
|
1294
|
+
};
|
|
1295
|
+
|
|
1296
|
+
var _excluded$z = ["size", "color"];
|
|
1189
1297
|
var BagIcon = function BagIcon(_ref) {
|
|
1190
1298
|
var _ref$size = _ref.size,
|
|
1191
1299
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1192
1300
|
color = _ref.color,
|
|
1193
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1301
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
1194
1302
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
1195
1303
|
width: size,
|
|
1196
1304
|
height: size,
|
|
@@ -1220,11 +1328,11 @@ BagIcon.toString = function () {
|
|
|
1220
1328
|
return '._icon';
|
|
1221
1329
|
};
|
|
1222
1330
|
|
|
1223
|
-
var _excluded$
|
|
1331
|
+
var _excluded$A = ["size"];
|
|
1224
1332
|
var TimeIcon = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
1225
1333
|
var _ref$size = _ref.size,
|
|
1226
1334
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1227
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1335
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
1228
1336
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
1229
1337
|
width: size,
|
|
1230
1338
|
height: size,
|
|
@@ -1257,12 +1365,12 @@ CloseIcon.toString = function () {
|
|
|
1257
1365
|
return '._icon';
|
|
1258
1366
|
};
|
|
1259
1367
|
|
|
1260
|
-
var _excluded$
|
|
1368
|
+
var _excluded$B = ["size", "color"];
|
|
1261
1369
|
var SignatureIcon = function SignatureIcon(_ref) {
|
|
1262
1370
|
var _ref$size = _ref.size,
|
|
1263
1371
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1264
1372
|
color = _ref.color,
|
|
1265
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1373
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
1266
1374
|
return React.createElement(SvgWithFillColor, Object.assign({
|
|
1267
1375
|
width: size,
|
|
1268
1376
|
height: size,
|
|
@@ -1283,12 +1391,12 @@ SignatureIcon.toString = function () {
|
|
|
1283
1391
|
return '._icon';
|
|
1284
1392
|
};
|
|
1285
1393
|
|
|
1286
|
-
var _excluded$
|
|
1394
|
+
var _excluded$C = ["size", "color"];
|
|
1287
1395
|
var CopyIcon = function CopyIcon(_ref) {
|
|
1288
1396
|
var _ref$size = _ref.size,
|
|
1289
1397
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1290
1398
|
color = _ref.color,
|
|
1291
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1399
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
|
|
1292
1400
|
return React.createElement(SvgWithFillColor, Object.assign({
|
|
1293
1401
|
width: size,
|
|
1294
1402
|
height: size,
|
|
@@ -1314,10 +1422,9 @@ CopyIcon.toString = function () {
|
|
|
1314
1422
|
return '._icon';
|
|
1315
1423
|
};
|
|
1316
1424
|
|
|
1317
|
-
var _excluded$
|
|
1425
|
+
var _excluded$D = ["children", "className", "color"];
|
|
1318
1426
|
var TypographyContainer = /*#__PURE__*/styled('span', {
|
|
1319
1427
|
margin: 0,
|
|
1320
|
-
color: '$foreground',
|
|
1321
1428
|
display: 'inline-block',
|
|
1322
1429
|
variants: {
|
|
1323
1430
|
variant: {
|
|
@@ -1363,13 +1470,7 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
|
|
|
1363
1470
|
},
|
|
1364
1471
|
h5: {
|
|
1365
1472
|
fontSize: '$16',
|
|
1366
|
-
fontWeight: '$600'
|
|
1367
|
-
'@md': {
|
|
1368
|
-
fontSize: '$18'
|
|
1369
|
-
},
|
|
1370
|
-
'@lg': {
|
|
1371
|
-
fontSize: '$20'
|
|
1372
|
-
}
|
|
1473
|
+
fontWeight: '$600'
|
|
1373
1474
|
},
|
|
1374
1475
|
h6: {
|
|
1375
1476
|
fontSize: '$14',
|
|
@@ -1398,6 +1499,10 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
|
|
|
1398
1499
|
fontSize: '$16'
|
|
1399
1500
|
}
|
|
1400
1501
|
},
|
|
1502
|
+
body3: {
|
|
1503
|
+
fontSize: '$12',
|
|
1504
|
+
fontWeight: '$400'
|
|
1505
|
+
},
|
|
1401
1506
|
caption: {
|
|
1402
1507
|
fontSize: '$10',
|
|
1403
1508
|
fontWeight: '$400',
|
|
@@ -1483,9 +1588,16 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
|
|
|
1483
1588
|
function Typography(_ref) {
|
|
1484
1589
|
var children = _ref.children,
|
|
1485
1590
|
className = _ref.className,
|
|
1486
|
-
|
|
1591
|
+
color = _ref.color,
|
|
1592
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
|
|
1593
|
+
var customCss = color ? {
|
|
1594
|
+
color: color.startsWith('$') ? color : "$" + color
|
|
1595
|
+
} : {
|
|
1596
|
+
color: '$foreground'
|
|
1597
|
+
};
|
|
1487
1598
|
return React__default.createElement(TypographyContainer, Object.assign({
|
|
1488
|
-
className: "_typography _text " + className
|
|
1599
|
+
className: "_typography _text " + (className || ''),
|
|
1600
|
+
css: customCss
|
|
1489
1601
|
}, props), children);
|
|
1490
1602
|
}
|
|
1491
1603
|
Typography.toString = function () {
|
|
@@ -1510,12 +1622,20 @@ var Logo = /*#__PURE__*/styled('img', {
|
|
|
1510
1622
|
height: '$28',
|
|
1511
1623
|
borderRadius: '50%'
|
|
1512
1624
|
});
|
|
1513
|
-
var ChainLogo = /*#__PURE__*/styled('
|
|
1625
|
+
var ChainLogo = /*#__PURE__*/styled('div', {
|
|
1514
1626
|
position: 'absolute',
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1627
|
+
right: -4,
|
|
1628
|
+
bottom: -4,
|
|
1629
|
+
width: '$16',
|
|
1630
|
+
height: '$16',
|
|
1631
|
+
padding: '$2',
|
|
1632
|
+
borderRadius: '50%',
|
|
1633
|
+
backgroundColor: '$background',
|
|
1634
|
+
border: '1px solid $neutrals400',
|
|
1635
|
+
img: {
|
|
1636
|
+
width: '100%',
|
|
1637
|
+
display: 'block'
|
|
1638
|
+
}
|
|
1519
1639
|
});
|
|
1520
1640
|
var StepContainer = /*#__PURE__*/styled('div', {
|
|
1521
1641
|
display: 'flex',
|
|
@@ -1548,7 +1668,8 @@ var Detail = /*#__PURE__*/styled('div', {
|
|
|
1548
1668
|
}
|
|
1549
1669
|
});
|
|
1550
1670
|
var SubTitle = /*#__PURE__*/styled(Typography, {
|
|
1551
|
-
color: '$neutrals600'
|
|
1671
|
+
color: '$neutrals600',
|
|
1672
|
+
display: 'block'
|
|
1552
1673
|
});
|
|
1553
1674
|
function StepDetail(_ref) {
|
|
1554
1675
|
var logo = _ref.logo,
|
|
@@ -1565,17 +1686,18 @@ function StepDetail(_ref) {
|
|
|
1565
1686
|
}, React__default.createElement(Logo, {
|
|
1566
1687
|
src: logo,
|
|
1567
1688
|
alt: symbol
|
|
1568
|
-
}), React__default.createElement(ChainLogo, {
|
|
1689
|
+
}), React__default.createElement(ChainLogo, null, React__default.createElement("img", {
|
|
1569
1690
|
src: chainLogo,
|
|
1570
1691
|
alt: blockchain
|
|
1571
|
-
})), React__default.createElement(Detail, {
|
|
1692
|
+
}))), React__default.createElement(Detail, {
|
|
1572
1693
|
pl: direction === 'horizontal'
|
|
1573
1694
|
}, React__default.createElement(Typography, {
|
|
1574
1695
|
noWrap: true,
|
|
1575
1696
|
variant: direction === 'vertical' ? 'body2' : 'h6'
|
|
1576
1697
|
}, amount ? parseFloat(amount).toFixed(2) : '?', " ", symbol), React__default.createElement(SubTitle, {
|
|
1577
1698
|
noWrap: true,
|
|
1578
|
-
variant: "caption"
|
|
1699
|
+
variant: "caption",
|
|
1700
|
+
color: "neutrals800"
|
|
1579
1701
|
}, "on ", blockchain)));
|
|
1580
1702
|
}
|
|
1581
1703
|
|
|
@@ -1704,6 +1826,99 @@ function Spinner(_ref) {
|
|
|
1704
1826
|
});
|
|
1705
1827
|
}
|
|
1706
1828
|
|
|
1829
|
+
var TooltipTrigger = /*#__PURE__*/styled(RadixTooltip.Trigger, {
|
|
1830
|
+
border: 0,
|
|
1831
|
+
padding: 0,
|
|
1832
|
+
backgroundColor: 'transparent'
|
|
1833
|
+
});
|
|
1834
|
+
var TooltipContent = /*#__PURE__*/styled(RadixTooltip.Content, {
|
|
1835
|
+
borderRadius: '$5',
|
|
1836
|
+
padding: '$4 $8',
|
|
1837
|
+
fontSize: '$14',
|
|
1838
|
+
animationDuration: '400ms',
|
|
1839
|
+
animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
|
|
1840
|
+
willChange: 'transform, opacity',
|
|
1841
|
+
variants: {
|
|
1842
|
+
color: {
|
|
1843
|
+
primary: {
|
|
1844
|
+
backgroundColor: '$primary',
|
|
1845
|
+
color: '$white'
|
|
1846
|
+
},
|
|
1847
|
+
error: {
|
|
1848
|
+
backgroundColor: '$error',
|
|
1849
|
+
color: '$white'
|
|
1850
|
+
},
|
|
1851
|
+
warning: {
|
|
1852
|
+
backgroundColor: '$warning',
|
|
1853
|
+
color: '$white'
|
|
1854
|
+
},
|
|
1855
|
+
success: {
|
|
1856
|
+
backgroundColor: '$success',
|
|
1857
|
+
color: '$white'
|
|
1858
|
+
},
|
|
1859
|
+
gray: {
|
|
1860
|
+
backgroundColor: '$neutrals300',
|
|
1861
|
+
color: '$black'
|
|
1862
|
+
},
|
|
1863
|
+
black: {
|
|
1864
|
+
backgroundColor: '$black',
|
|
1865
|
+
color: '$white'
|
|
1866
|
+
},
|
|
1867
|
+
white: {
|
|
1868
|
+
backgroundColor: '$white',
|
|
1869
|
+
color: '$black'
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
});
|
|
1874
|
+
var TooltipArrow = /*#__PURE__*/styled(RadixTooltip.Arrow, {
|
|
1875
|
+
variants: {
|
|
1876
|
+
color: {
|
|
1877
|
+
primary: {
|
|
1878
|
+
fill: '$primary'
|
|
1879
|
+
},
|
|
1880
|
+
error: {
|
|
1881
|
+
fill: '$error'
|
|
1882
|
+
},
|
|
1883
|
+
warning: {
|
|
1884
|
+
fill: '$warning'
|
|
1885
|
+
},
|
|
1886
|
+
success: {
|
|
1887
|
+
fill: '$success'
|
|
1888
|
+
},
|
|
1889
|
+
gray: {
|
|
1890
|
+
fill: '$neutrals300'
|
|
1891
|
+
},
|
|
1892
|
+
black: {
|
|
1893
|
+
fill: '$black'
|
|
1894
|
+
},
|
|
1895
|
+
white: {
|
|
1896
|
+
fill: '$white'
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
});
|
|
1901
|
+
var ChildrenWrapper = /*#__PURE__*/styled('div', {
|
|
1902
|
+
display: 'inline-block'
|
|
1903
|
+
});
|
|
1904
|
+
function Tooltip(_ref) {
|
|
1905
|
+
var children = _ref.children,
|
|
1906
|
+
content = _ref.content,
|
|
1907
|
+
_ref$side = _ref.side,
|
|
1908
|
+
side = _ref$side === void 0 ? 'top' : _ref$side,
|
|
1909
|
+
_ref$color = _ref.color,
|
|
1910
|
+
color = _ref$color === void 0 ? 'gray' : _ref$color;
|
|
1911
|
+
return React__default.createElement(RadixTooltip.Provider, null, React__default.createElement(RadixTooltip.Root, null, React__default.createElement(TooltipTrigger, {
|
|
1912
|
+
asChild: true
|
|
1913
|
+
}, React__default.createElement(ChildrenWrapper, null, children)), React__default.createElement(RadixTooltip.Portal, null, React__default.createElement(TooltipContent, {
|
|
1914
|
+
color: color,
|
|
1915
|
+
side: side,
|
|
1916
|
+
sideOffset: 5
|
|
1917
|
+
}, content, React__default.createElement(TooltipArrow, {
|
|
1918
|
+
color: color
|
|
1919
|
+
})))));
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1707
1922
|
var Container = /*#__PURE__*/styled('div', {
|
|
1708
1923
|
borderRadius: '$5',
|
|
1709
1924
|
border: '1px solid $neutrals300',
|
|
@@ -1738,7 +1953,7 @@ var Line = /*#__PURE__*/styled('div', {
|
|
|
1738
1953
|
});
|
|
1739
1954
|
var HR = /*#__PURE__*/styled('hr', {
|
|
1740
1955
|
width: '100%',
|
|
1741
|
-
|
|
1956
|
+
border: '1px solid $neutrals400',
|
|
1742
1957
|
margin: '$8 0'
|
|
1743
1958
|
});
|
|
1744
1959
|
var SwapperLogo = /*#__PURE__*/styled('img', {
|
|
@@ -1796,7 +2011,7 @@ var GasContainer = /*#__PURE__*/styled('div', {
|
|
|
1796
2011
|
margin: '$8'
|
|
1797
2012
|
}
|
|
1798
2013
|
});
|
|
1799
|
-
var
|
|
2014
|
+
var CostContainer = /*#__PURE__*/styled('div', {
|
|
1800
2015
|
display: 'flex',
|
|
1801
2016
|
flexDirection: 'column',
|
|
1802
2017
|
alignItems: 'center',
|
|
@@ -1839,7 +2054,9 @@ function BestRoute(props) {
|
|
|
1839
2054
|
return React__default.createElement(Container, null, loading ? React__default.createElement(SkeletonContainer$1, null, React__default.createElement(Skeleton, {
|
|
1840
2055
|
width: 48,
|
|
1841
2056
|
height: 94
|
|
1842
|
-
})) : React__default.createElement(GasContainer, null, React__default.createElement(
|
|
2057
|
+
})) : React__default.createElement(GasContainer, null, React__default.createElement(Tooltip, {
|
|
2058
|
+
content: "Transaction cost (fee)"
|
|
2059
|
+
}, React__default.createElement(CostContainer, {
|
|
1843
2060
|
warning: feeWarning
|
|
1844
2061
|
}, React__default.createElement(GasIcon, {
|
|
1845
2062
|
size: 20,
|
|
@@ -1849,13 +2066,17 @@ function BestRoute(props) {
|
|
|
1849
2066
|
align: "center",
|
|
1850
2067
|
variant: "caption",
|
|
1851
2068
|
warning: feeWarning
|
|
1852
|
-
}, error && '-', !!data && "$" + totalFee)), React__default.createElement(HR, null), React__default.createElement(
|
|
2069
|
+
}, error && '-', !!data && "$" + totalFee))), React__default.createElement(HR, null), React__default.createElement(Tooltip, {
|
|
2070
|
+
content: "Time estimate"
|
|
2071
|
+
}, React__default.createElement(CostContainer, {
|
|
2072
|
+
warning: feeWarning
|
|
2073
|
+
}, React__default.createElement(TimeIcon, {
|
|
1853
2074
|
size: 20
|
|
1854
2075
|
}), React__default.createElement(Typography, {
|
|
1855
2076
|
mt: 4,
|
|
1856
2077
|
align: "center",
|
|
1857
2078
|
variant: "caption"
|
|
1858
|
-
}, error && '-', !!data && "~" + totalTime + "m")), React__default.createElement(BestRouteContainer, null, loading && React__default.createElement(Spinner, {
|
|
2079
|
+
}, error && '-', !!data && "~" + totalTime + "m")))), React__default.createElement(BestRouteContainer, null, loading && React__default.createElement(Spinner, {
|
|
1859
2080
|
color: "primary"
|
|
1860
2081
|
}), error && React__default.createElement(ErrorMsg, {
|
|
1861
2082
|
variant: "caption"
|
|
@@ -1886,8 +2107,8 @@ function BestRoute(props) {
|
|
|
1886
2107
|
}, "No routes found")));
|
|
1887
2108
|
}
|
|
1888
2109
|
|
|
1889
|
-
var _excluded$
|
|
1890
|
-
var _ghost, _css, _css2, _css3
|
|
2110
|
+
var _excluded$E = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
|
|
2111
|
+
var _ghost, _css, _css2, _css3;
|
|
1891
2112
|
var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
1892
2113
|
borderRadius: '$5',
|
|
1893
2114
|
fontSize: '$16',
|
|
@@ -1897,6 +2118,11 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
|
1897
2118
|
display: 'flex',
|
|
1898
2119
|
alignItems: 'center',
|
|
1899
2120
|
justifyContent: 'center',
|
|
2121
|
+
transition: 'all 0.35s',
|
|
2122
|
+
border: '0',
|
|
2123
|
+
'&:active': {
|
|
2124
|
+
transform: 'scale(0.95)'
|
|
2125
|
+
},
|
|
1900
2126
|
variants: {
|
|
1901
2127
|
align: {
|
|
1902
2128
|
start: {
|
|
@@ -1909,6 +2135,8 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
|
1909
2135
|
}
|
|
1910
2136
|
},
|
|
1911
2137
|
size: {
|
|
2138
|
+
compact: {},
|
|
2139
|
+
free: {},
|
|
1912
2140
|
small: {
|
|
1913
2141
|
height: '$32'
|
|
1914
2142
|
},
|
|
@@ -1925,28 +2153,29 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
|
1925
2153
|
color: '$foreground',
|
|
1926
2154
|
border: 0,
|
|
1927
2155
|
'&:hover': {
|
|
1928
|
-
backgroundColor: '$neutrals200'
|
|
1929
|
-
color: '$foreground'
|
|
2156
|
+
backgroundColor: '$neutrals200'
|
|
1930
2157
|
},
|
|
1931
2158
|
'&:disabled': {
|
|
1932
|
-
background: '$neutrals400
|
|
2159
|
+
background: '$neutrals400'
|
|
2160
|
+
},
|
|
2161
|
+
'&:disabled:hover': {
|
|
2162
|
+
background: '$neutrals400',
|
|
2163
|
+
transform: 'unset'
|
|
1933
2164
|
}
|
|
1934
2165
|
},
|
|
1935
2166
|
outlined: {
|
|
1936
|
-
backgroundColor: '$background
|
|
1937
|
-
|
|
2167
|
+
backgroundColor: '$background',
|
|
2168
|
+
border: 1,
|
|
2169
|
+
borderStyle: 'solid',
|
|
2170
|
+
borderColor: '$neutrals400',
|
|
1938
2171
|
color: '$foreground',
|
|
1939
2172
|
'&:hover': {
|
|
1940
|
-
borderColor: '$neutrals600
|
|
1941
|
-
color: '$neutrals500 !important'
|
|
2173
|
+
borderColor: '$neutrals600'
|
|
1942
2174
|
},
|
|
1943
2175
|
'&:disabled': {
|
|
1944
|
-
borderColor: '$neutrals300
|
|
1945
|
-
color: '$neutrals400
|
|
1946
|
-
}
|
|
1947
|
-
background: 'transparent',
|
|
1948
|
-
border: 1,
|
|
1949
|
-
borderStyle: 'solid'
|
|
2176
|
+
borderColor: '$neutrals300',
|
|
2177
|
+
color: '$neutrals400'
|
|
2178
|
+
}
|
|
1950
2179
|
},
|
|
1951
2180
|
ghost: (_ghost = {
|
|
1952
2181
|
color: '$foreground',
|
|
@@ -1980,24 +2209,25 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
|
1980
2209
|
compoundVariants: [{
|
|
1981
2210
|
type: 'primary',
|
|
1982
2211
|
variant: 'contained',
|
|
1983
|
-
css:
|
|
2212
|
+
css: {
|
|
1984
2213
|
background: '$primary',
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
2214
|
+
color: '$white',
|
|
2215
|
+
'&:hover': {
|
|
2216
|
+
background: '$primary700'
|
|
2217
|
+
},
|
|
2218
|
+
'&:visited': {
|
|
2219
|
+
background: '$primary900'
|
|
2220
|
+
},
|
|
2221
|
+
'&:focus': {
|
|
2222
|
+
background: '$primary600'
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
1995
2225
|
}, {
|
|
1996
2226
|
type: 'primary',
|
|
1997
2227
|
variant: 'outlined',
|
|
1998
2228
|
css: {
|
|
1999
2229
|
color: '$primary !important',
|
|
2000
|
-
borderColor: '$primary
|
|
2230
|
+
borderColor: '$primary',
|
|
2001
2231
|
'&:hover': {
|
|
2002
2232
|
color: '$primary700 !important',
|
|
2003
2233
|
borderColor: '$primary700 !important'
|
|
@@ -2029,24 +2259,24 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
|
2029
2259
|
}, {
|
|
2030
2260
|
type: 'error',
|
|
2031
2261
|
variant: 'contained',
|
|
2032
|
-
css: (
|
|
2262
|
+
css: (_css = {
|
|
2033
2263
|
background: '$error',
|
|
2034
2264
|
$$color: '$colors$background'
|
|
2035
|
-
},
|
|
2265
|
+
}, _css["." + darkTheme + " &"] = {
|
|
2036
2266
|
$$color: '$colors$foreground'
|
|
2037
|
-
},
|
|
2267
|
+
}, _css.color = '$$color !important', _css['&:hover'] = {
|
|
2038
2268
|
background: '$error300'
|
|
2039
|
-
},
|
|
2269
|
+
}, _css['&:visited'] = {
|
|
2040
2270
|
background: '$error700'
|
|
2041
|
-
},
|
|
2271
|
+
}, _css['&:focus'] = {
|
|
2042
2272
|
background: '$error700'
|
|
2043
|
-
},
|
|
2273
|
+
}, _css)
|
|
2044
2274
|
}, {
|
|
2045
2275
|
type: 'error',
|
|
2046
2276
|
variant: 'outlined',
|
|
2047
2277
|
css: {
|
|
2048
2278
|
color: '$error !important',
|
|
2049
|
-
borderColor: '$error
|
|
2279
|
+
borderColor: '$error',
|
|
2050
2280
|
'&:hover': {
|
|
2051
2281
|
color: '$error300 !important',
|
|
2052
2282
|
borderColor: '$error300 !important'
|
|
@@ -2078,24 +2308,24 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
|
2078
2308
|
}, {
|
|
2079
2309
|
type: 'warning',
|
|
2080
2310
|
variant: 'contained',
|
|
2081
|
-
css: (
|
|
2311
|
+
css: (_css2 = {
|
|
2082
2312
|
background: '$warning',
|
|
2083
2313
|
$$color: '$colors$background'
|
|
2084
|
-
},
|
|
2314
|
+
}, _css2["." + darkTheme + " &"] = {
|
|
2085
2315
|
$$color: '$colors$foreground'
|
|
2086
|
-
},
|
|
2316
|
+
}, _css2.color = '$$color !important', _css2['&:hover'] = {
|
|
2087
2317
|
background: '$warning300'
|
|
2088
|
-
},
|
|
2318
|
+
}, _css2['&:visited'] = {
|
|
2089
2319
|
background: '$warning700'
|
|
2090
|
-
},
|
|
2320
|
+
}, _css2['&:focus'] = {
|
|
2091
2321
|
background: '$warning700'
|
|
2092
|
-
},
|
|
2322
|
+
}, _css2)
|
|
2093
2323
|
}, {
|
|
2094
2324
|
type: 'warning',
|
|
2095
2325
|
variant: 'outlined',
|
|
2096
2326
|
css: {
|
|
2097
2327
|
color: '$warning !important',
|
|
2098
|
-
borderColor: '$warning
|
|
2328
|
+
borderColor: '$warning',
|
|
2099
2329
|
'&:hover': {
|
|
2100
2330
|
color: '$warning300 !important',
|
|
2101
2331
|
borderColor: '$warning300 !important'
|
|
@@ -2127,24 +2357,24 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
|
2127
2357
|
}, {
|
|
2128
2358
|
type: 'success',
|
|
2129
2359
|
variant: 'contained',
|
|
2130
|
-
css: (
|
|
2360
|
+
css: (_css3 = {
|
|
2131
2361
|
background: '$success',
|
|
2132
2362
|
$$color: '$colors$background'
|
|
2133
|
-
},
|
|
2363
|
+
}, _css3["." + darkTheme + " &"] = {
|
|
2134
2364
|
$$color: '$colors$foreground'
|
|
2135
|
-
},
|
|
2365
|
+
}, _css3.color = '$$color !important', _css3['&:hover'] = {
|
|
2136
2366
|
background: '$success300'
|
|
2137
|
-
},
|
|
2367
|
+
}, _css3['&:visited'] = {
|
|
2138
2368
|
background: '$success700'
|
|
2139
|
-
},
|
|
2369
|
+
}, _css3['&:focus'] = {
|
|
2140
2370
|
background: '$success700'
|
|
2141
|
-
},
|
|
2371
|
+
}, _css3)
|
|
2142
2372
|
}, {
|
|
2143
2373
|
type: 'success',
|
|
2144
2374
|
variant: 'outlined',
|
|
2145
2375
|
css: {
|
|
2146
2376
|
color: '$success !important',
|
|
2147
|
-
borderColor: '$success
|
|
2377
|
+
borderColor: '$success',
|
|
2148
2378
|
'&:hover': {
|
|
2149
2379
|
color: '$success300 !important',
|
|
2150
2380
|
borderColor: '$success300 !important'
|
|
@@ -2173,6 +2403,12 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
|
2173
2403
|
color: '$success700'
|
|
2174
2404
|
}
|
|
2175
2405
|
}
|
|
2406
|
+
}, {
|
|
2407
|
+
size: 'compact',
|
|
2408
|
+
css: {
|
|
2409
|
+
padding: '$2 $4',
|
|
2410
|
+
fontSize: '$12'
|
|
2411
|
+
}
|
|
2176
2412
|
}],
|
|
2177
2413
|
defaultVariants: {
|
|
2178
2414
|
size: 'medium',
|
|
@@ -2216,7 +2452,7 @@ function Button(_ref) {
|
|
|
2216
2452
|
suffix = _ref.suffix,
|
|
2217
2453
|
align = _ref.align,
|
|
2218
2454
|
flexContent = _ref.flexContent,
|
|
2219
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2455
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
2220
2456
|
var isDisabled = loading || disabled;
|
|
2221
2457
|
return React__default.createElement(ButtonContainer, Object.assign({
|
|
2222
2458
|
disabled: isDisabled
|
|
@@ -2292,9 +2528,70 @@ function BlockchainsList(props) {
|
|
|
2292
2528
|
}));
|
|
2293
2529
|
}
|
|
2294
2530
|
|
|
2295
|
-
var
|
|
2531
|
+
var DividerContainer = /*#__PURE__*/styled('div', {
|
|
2532
|
+
variants: {
|
|
2533
|
+
size: {
|
|
2534
|
+
4: {
|
|
2535
|
+
height: '$4'
|
|
2536
|
+
},
|
|
2537
|
+
8: {
|
|
2538
|
+
height: '$8'
|
|
2539
|
+
},
|
|
2540
|
+
12: {
|
|
2541
|
+
height: '$12'
|
|
2542
|
+
},
|
|
2543
|
+
16: {
|
|
2544
|
+
height: '$16'
|
|
2545
|
+
},
|
|
2546
|
+
18: {
|
|
2547
|
+
height: '$18'
|
|
2548
|
+
},
|
|
2549
|
+
20: {
|
|
2550
|
+
height: '$20'
|
|
2551
|
+
},
|
|
2552
|
+
24: {
|
|
2553
|
+
height: '$24'
|
|
2554
|
+
},
|
|
2555
|
+
32: {
|
|
2556
|
+
height: '$32'
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
});
|
|
2561
|
+
function Divider(_ref) {
|
|
2562
|
+
var _ref$size = _ref.size,
|
|
2563
|
+
size = _ref$size === void 0 ? 12 : _ref$size;
|
|
2564
|
+
return React__default.createElement(DividerContainer, {
|
|
2565
|
+
size: size
|
|
2566
|
+
});
|
|
2567
|
+
}
|
|
2568
|
+
|
|
2569
|
+
var HeaderContainer = /*#__PURE__*/styled('div', {
|
|
2570
|
+
display: 'flex',
|
|
2571
|
+
justifyContent: 'space-between',
|
|
2572
|
+
alignItems: 'center',
|
|
2573
|
+
padding: '$8 0',
|
|
2574
|
+
position: 'relative'
|
|
2575
|
+
});
|
|
2576
|
+
var BackButton = /*#__PURE__*/styled(Button, {
|
|
2577
|
+
padding: '$8'
|
|
2578
|
+
});
|
|
2579
|
+
function Header(props) {
|
|
2580
|
+
return React__default.createElement(HeaderContainer, null, props.onBack ? React__default.createElement(BackButton, {
|
|
2581
|
+
variant: "ghost",
|
|
2582
|
+
size: "small",
|
|
2583
|
+
onClick: props.onBack
|
|
2584
|
+
}, React__default.createElement(AngleLeftIcon, {
|
|
2585
|
+
size: 24
|
|
2586
|
+
})) : null, props.prefix, React__default.createElement(Typography, {
|
|
2587
|
+
variant: "h4"
|
|
2588
|
+
}, props.title), props.suffix || React__default.createElement("div", null));
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
var _excluded$F = ["label", "prefix", "suffix", "children", "size", "style"];
|
|
2296
2592
|
var InputContainer = /*#__PURE__*/styled('div', {
|
|
2297
2593
|
backgroundColor: '$background',
|
|
2594
|
+
padding: '1px',
|
|
2298
2595
|
boxSizing: 'border-box',
|
|
2299
2596
|
border: '1px solid $neutrals400',
|
|
2300
2597
|
borderRadius: '$5',
|
|
@@ -2306,7 +2603,8 @@ var InputContainer = /*#__PURE__*/styled('div', {
|
|
|
2306
2603
|
color: '$foreground',
|
|
2307
2604
|
transition: 'border-color ease .3s',
|
|
2308
2605
|
'&:focus-within': {
|
|
2309
|
-
borderColor: '$
|
|
2606
|
+
borderColor: '$success',
|
|
2607
|
+
outline: '1px solid $success'
|
|
2310
2608
|
},
|
|
2311
2609
|
variants: {
|
|
2312
2610
|
size: {
|
|
@@ -2377,7 +2675,7 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
2377
2675
|
suffix = props.suffix,
|
|
2378
2676
|
size = props.size,
|
|
2379
2677
|
style = props.style,
|
|
2380
|
-
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$
|
|
2678
|
+
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$F);
|
|
2381
2679
|
return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({
|
|
2382
2680
|
className: "_text"
|
|
2383
2681
|
}, inputAttributes.id && {
|
|
@@ -2397,36 +2695,15 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
2397
2695
|
})), suffix || null));
|
|
2398
2696
|
});
|
|
2399
2697
|
|
|
2400
|
-
var
|
|
2698
|
+
var ContentContainer = /*#__PURE__*/styled('div', {
|
|
2699
|
+
overflow: 'hidden',
|
|
2401
2700
|
display: 'flex',
|
|
2402
2701
|
flexDirection: 'column',
|
|
2403
|
-
height: '100%',
|
|
2404
|
-
width: '100%',
|
|
2405
|
-
padding: '$12 0',
|
|
2406
|
-
position: 'relative',
|
|
2407
|
-
'@lg': {
|
|
2408
|
-
padding: '$16 0'
|
|
2409
|
-
}
|
|
2410
|
-
});
|
|
2411
|
-
var HeaderContainer = /*#__PURE__*/styled('div', {
|
|
2412
|
-
display: 'flex',
|
|
2413
|
-
justifyContent: 'center',
|
|
2414
|
-
alignItems: 'center',
|
|
2415
|
-
marginBottom: '$16',
|
|
2416
|
-
position: 'relative'
|
|
2417
|
-
});
|
|
2418
|
-
var BackIcon = /*#__PURE__*/styled(AngleLeftIcon, {
|
|
2419
|
-
position: 'absolute',
|
|
2420
|
-
left: '0'
|
|
2421
|
-
});
|
|
2422
|
-
var StyledBackIcon = /*#__PURE__*/styled(BackIcon, {
|
|
2423
|
-
cursor: 'pointer'
|
|
2424
|
-
});
|
|
2425
|
-
var ContentContainer = /*#__PURE__*/styled('div', {
|
|
2426
2702
|
flex: '1',
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2703
|
+
padding: '0 $4'
|
|
2704
|
+
});
|
|
2705
|
+
var TextFieldContainer = /*#__PURE__*/styled('div', {
|
|
2706
|
+
padding: '1px'
|
|
2430
2707
|
});
|
|
2431
2708
|
function SecondaryPage(props) {
|
|
2432
2709
|
var title = props.title,
|
|
@@ -2438,12 +2715,11 @@ function SecondaryPage(props) {
|
|
|
2438
2715
|
var _useState = React.useState(''),
|
|
2439
2716
|
searchedFor = _useState[0],
|
|
2440
2717
|
setSearchedFor = _useState[1];
|
|
2441
|
-
return React__default.createElement(
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
}, title), TopButton), props.textField && React__default.createElement("div", null, React__default.createElement(TextField, {
|
|
2718
|
+
return React__default.createElement(React__default.Fragment, null, hasHeader && React__default.createElement(Header, {
|
|
2719
|
+
onBack: onBack,
|
|
2720
|
+
title: title || '',
|
|
2721
|
+
suffix: TopButton
|
|
2722
|
+
}), React__default.createElement(ContentContainer, null, props.textField && React__default.createElement(TextFieldContainer, null, React__default.createElement(TextField, {
|
|
2447
2723
|
size: "large",
|
|
2448
2724
|
prefix: React__default.createElement(SearchIcon, {
|
|
2449
2725
|
size: 24
|
|
@@ -2454,75 +2730,455 @@ function SecondaryPage(props) {
|
|
|
2454
2730
|
},
|
|
2455
2731
|
value: searchedFor,
|
|
2456
2732
|
autoFocus: true
|
|
2457
|
-
})
|
|
2733
|
+
}), React__default.createElement(Divider, {
|
|
2734
|
+
size: 16
|
|
2735
|
+
})), props.textField && (props.children == null ? void 0 : props.children(searchedFor)), !props.textField && props.children), Footer);
|
|
2736
|
+
}
|
|
2737
|
+
|
|
2738
|
+
var containsText = function containsText(text, searchText) {
|
|
2739
|
+
return text.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
|
|
2740
|
+
};
|
|
2741
|
+
var getConciseAddress = function getConciseAddress(address, maxChars, ellipsisLength) {
|
|
2742
|
+
if (maxChars === void 0) {
|
|
2743
|
+
maxChars = 8;
|
|
2744
|
+
}
|
|
2745
|
+
if (ellipsisLength === void 0) {
|
|
2746
|
+
ellipsisLength = 3;
|
|
2747
|
+
}
|
|
2748
|
+
if (!address) return null;
|
|
2749
|
+
if (address.length < 2 * maxChars + ellipsisLength) return address;
|
|
2750
|
+
var start = Math.ceil((address.length - maxChars) / 2);
|
|
2751
|
+
var end = address.length - maxChars;
|
|
2752
|
+
return "" + address.substr(start, maxChars) + '.'.repeat(ellipsisLength) + address.substr(end);
|
|
2753
|
+
};
|
|
2754
|
+
|
|
2755
|
+
var SpacerContainer = /*#__PURE__*/styled('div', {
|
|
2756
|
+
variants: {
|
|
2757
|
+
size: {
|
|
2758
|
+
4: {},
|
|
2759
|
+
8: {},
|
|
2760
|
+
12: {},
|
|
2761
|
+
16: {},
|
|
2762
|
+
18: {},
|
|
2763
|
+
20: {},
|
|
2764
|
+
24: {}
|
|
2765
|
+
},
|
|
2766
|
+
direction: {
|
|
2767
|
+
vertical: {},
|
|
2768
|
+
horizontal: {}
|
|
2769
|
+
}
|
|
2770
|
+
},
|
|
2771
|
+
compoundVariants: [{
|
|
2772
|
+
size: 4,
|
|
2773
|
+
direction: 'horizontal',
|
|
2774
|
+
css: {
|
|
2775
|
+
width: '$4'
|
|
2776
|
+
}
|
|
2777
|
+
}, {
|
|
2778
|
+
size: 4,
|
|
2779
|
+
direction: 'vertical',
|
|
2780
|
+
css: {
|
|
2781
|
+
height: '$4'
|
|
2782
|
+
}
|
|
2783
|
+
}, {
|
|
2784
|
+
size: 8,
|
|
2785
|
+
direction: 'horizontal',
|
|
2786
|
+
css: {
|
|
2787
|
+
width: '$8'
|
|
2788
|
+
}
|
|
2789
|
+
}, {
|
|
2790
|
+
size: 8,
|
|
2791
|
+
direction: 'vertical',
|
|
2792
|
+
css: {
|
|
2793
|
+
height: '$8'
|
|
2794
|
+
}
|
|
2795
|
+
}, {
|
|
2796
|
+
size: 12,
|
|
2797
|
+
direction: 'horizontal',
|
|
2798
|
+
css: {
|
|
2799
|
+
width: '$12'
|
|
2800
|
+
}
|
|
2801
|
+
}, {
|
|
2802
|
+
size: 12,
|
|
2803
|
+
direction: 'vertical',
|
|
2804
|
+
css: {
|
|
2805
|
+
height: '$12'
|
|
2806
|
+
}
|
|
2807
|
+
}, {
|
|
2808
|
+
size: 16,
|
|
2809
|
+
direction: 'horizontal',
|
|
2810
|
+
css: {
|
|
2811
|
+
width: '$16'
|
|
2812
|
+
}
|
|
2813
|
+
}, {
|
|
2814
|
+
size: 16,
|
|
2815
|
+
direction: 'vertical',
|
|
2816
|
+
css: {
|
|
2817
|
+
height: '$16'
|
|
2818
|
+
}
|
|
2819
|
+
}, {
|
|
2820
|
+
size: 18,
|
|
2821
|
+
direction: 'horizontal',
|
|
2822
|
+
css: {
|
|
2823
|
+
width: '$18'
|
|
2824
|
+
}
|
|
2825
|
+
}, {
|
|
2826
|
+
size: 18,
|
|
2827
|
+
direction: 'vertical',
|
|
2828
|
+
css: {
|
|
2829
|
+
height: '$18'
|
|
2830
|
+
}
|
|
2831
|
+
}, {
|
|
2832
|
+
size: 20,
|
|
2833
|
+
direction: 'horizontal',
|
|
2834
|
+
css: {
|
|
2835
|
+
width: '$20'
|
|
2836
|
+
}
|
|
2837
|
+
}, {
|
|
2838
|
+
size: 20,
|
|
2839
|
+
direction: 'vertical',
|
|
2840
|
+
css: {
|
|
2841
|
+
height: '$20'
|
|
2842
|
+
}
|
|
2843
|
+
}, {
|
|
2844
|
+
size: 24,
|
|
2845
|
+
direction: 'horizontal',
|
|
2846
|
+
css: {
|
|
2847
|
+
width: '$24'
|
|
2848
|
+
}
|
|
2849
|
+
}, {
|
|
2850
|
+
size: 24,
|
|
2851
|
+
direction: 'vertical',
|
|
2852
|
+
css: {
|
|
2853
|
+
height: '$24'
|
|
2854
|
+
}
|
|
2855
|
+
}]
|
|
2856
|
+
});
|
|
2857
|
+
function Spacer(_ref) {
|
|
2858
|
+
var _ref$size = _ref.size,
|
|
2859
|
+
size = _ref$size === void 0 ? 12 : _ref$size,
|
|
2860
|
+
_ref$direction = _ref.direction,
|
|
2861
|
+
direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction;
|
|
2862
|
+
return React__default.createElement(SpacerContainer, {
|
|
2863
|
+
size: size,
|
|
2864
|
+
direction: direction
|
|
2865
|
+
});
|
|
2458
2866
|
}
|
|
2459
2867
|
|
|
2460
2868
|
var MainContainer = /*#__PURE__*/styled('div', {
|
|
2461
|
-
display: 'flex',
|
|
2462
2869
|
width: '100%',
|
|
2463
|
-
alignItems: 'center',
|
|
2464
2870
|
padding: '$16',
|
|
2465
2871
|
borderRadius: '$5',
|
|
2872
|
+
backgroundColor: '$neutrals300',
|
|
2873
|
+
color: '$neutrals800',
|
|
2874
|
+
'.main': {
|
|
2875
|
+
display: 'flex',
|
|
2876
|
+
alignItems: 'center'
|
|
2877
|
+
},
|
|
2878
|
+
'.footer': {
|
|
2879
|
+
paddingTop: '$8'
|
|
2880
|
+
},
|
|
2881
|
+
'&.hasIcon .footer': {
|
|
2882
|
+
paddingLeft: '$32'
|
|
2883
|
+
},
|
|
2466
2884
|
variants: {
|
|
2467
2885
|
type: {
|
|
2468
2886
|
primary: {
|
|
2469
|
-
|
|
2887
|
+
color: '$primary200'
|
|
2470
2888
|
},
|
|
2471
2889
|
secondary: {
|
|
2472
|
-
|
|
2890
|
+
color: '$foreground'
|
|
2473
2891
|
},
|
|
2474
2892
|
success: {
|
|
2475
|
-
|
|
2893
|
+
color: '$success300'
|
|
2476
2894
|
},
|
|
2477
2895
|
warning: {
|
|
2478
|
-
|
|
2896
|
+
color: '$warning500'
|
|
2479
2897
|
},
|
|
2480
2898
|
error: {
|
|
2481
|
-
|
|
2899
|
+
color: '$error300'
|
|
2482
2900
|
}
|
|
2483
2901
|
}
|
|
2484
2902
|
}
|
|
2485
2903
|
});
|
|
2486
|
-
var ContentContainer$1 = /*#__PURE__*/styled('div', {});
|
|
2487
|
-
var TitleContainer = /*#__PURE__*/styled('div', {
|
|
2488
|
-
marginBottom: '$8'
|
|
2489
|
-
});
|
|
2490
|
-
var IconContainer = /*#__PURE__*/styled('div', {
|
|
2491
|
-
marginRight: '$24'
|
|
2492
|
-
});
|
|
2493
|
-
var StyledTypography = /*#__PURE__*/styled(Typography, {
|
|
2494
|
-
color: darkTheme.colors.foreground.value
|
|
2495
|
-
});
|
|
2496
2904
|
function Alert(props) {
|
|
2497
2905
|
var type = props.type,
|
|
2498
2906
|
children = props.children,
|
|
2499
2907
|
title = props.title;
|
|
2500
2908
|
var showIcon = ['error', 'success', 'warning'].includes(type);
|
|
2501
2909
|
return React__default.createElement(MainContainer, {
|
|
2502
|
-
type: type
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2910
|
+
type: type,
|
|
2911
|
+
className: showIcon ? 'hasIcon' : ''
|
|
2912
|
+
}, React__default.createElement("div", {
|
|
2913
|
+
className: "main"
|
|
2914
|
+
}, showIcon && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
2915
|
+
style: {
|
|
2916
|
+
width: '32px',
|
|
2917
|
+
display: 'flex',
|
|
2918
|
+
justifyContent: 'center',
|
|
2919
|
+
alignItems: 'center'
|
|
2920
|
+
}
|
|
2921
|
+
}, type === 'success' && React__default.createElement(CheckCircleIcon, {
|
|
2922
|
+
color: type,
|
|
2923
|
+
size: 24
|
|
2506
2924
|
}), type === 'warning' && React__default.createElement(WarningIcon, {
|
|
2507
|
-
color:
|
|
2508
|
-
size:
|
|
2925
|
+
color: type,
|
|
2926
|
+
size: 24
|
|
2509
2927
|
}), type === 'error' && React__default.createElement(InfoCircleIcon, {
|
|
2510
|
-
color:
|
|
2511
|
-
size:
|
|
2512
|
-
})
|
|
2513
|
-
|
|
2514
|
-
}
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2928
|
+
color: type,
|
|
2929
|
+
size: 24
|
|
2930
|
+
}), React__default.createElement(Spacer, {
|
|
2931
|
+
size: 8
|
|
2932
|
+
}))), React__default.createElement("div", {
|
|
2933
|
+
style: {
|
|
2934
|
+
display: 'flex',
|
|
2935
|
+
justifyContent: 'center',
|
|
2936
|
+
alignItems: 'start',
|
|
2937
|
+
flexDirection: 'column',
|
|
2938
|
+
width: '100%'
|
|
2939
|
+
}
|
|
2940
|
+
}, title && React__default.createElement(React__default.Fragment, null, React__default.createElement(Typography, {
|
|
2941
|
+
className: "title",
|
|
2942
|
+
variant: "h6",
|
|
2943
|
+
color: type
|
|
2944
|
+
}, title), !!children && React__default.createElement(Spacer, {
|
|
2945
|
+
size: 8,
|
|
2946
|
+
direction: "vertical"
|
|
2947
|
+
})), children)), props.footer ? React__default.createElement("div", {
|
|
2948
|
+
className: "footer"
|
|
2949
|
+
}, props.footer) : null);
|
|
2950
|
+
}
|
|
2520
2951
|
|
|
2521
|
-
|
|
2522
|
-
|
|
2952
|
+
function LoadingFailedAlert() {
|
|
2953
|
+
return React__default.createElement(Alert, {
|
|
2954
|
+
type: "error",
|
|
2955
|
+
title: " Error connecting server, please reload the app and try again."
|
|
2956
|
+
});
|
|
2957
|
+
}
|
|
2958
|
+
|
|
2959
|
+
function NotFoundAlert(props) {
|
|
2960
|
+
var catergory = props.catergory,
|
|
2961
|
+
searchedFor = props.searchedFor;
|
|
2962
|
+
return React__default.createElement(Alert, {
|
|
2963
|
+
type: "secondary",
|
|
2964
|
+
title: catergory + " " + (searchedFor ? "'" + searchedFor + "'" : '') + " not found."
|
|
2965
|
+
});
|
|
2966
|
+
}
|
|
2967
|
+
|
|
2968
|
+
function VirtualizedList(props) {
|
|
2969
|
+
var itemCount = props.itemCount,
|
|
2970
|
+
hasNextPage = props.hasNextPage,
|
|
2971
|
+
loadNextPage = props.loadNextPage,
|
|
2972
|
+
Item = props.Item,
|
|
2973
|
+
innerElementType = props.innerElementType,
|
|
2974
|
+
size = props.size;
|
|
2975
|
+
var isItemLoaded = function isItemLoaded(index) {
|
|
2976
|
+
return !hasNextPage || index < itemCount;
|
|
2977
|
+
};
|
|
2978
|
+
return React__default.createElement(AutoSizer, null, function (_ref) {
|
|
2979
|
+
var width = _ref.width,
|
|
2980
|
+
height = _ref.height;
|
|
2981
|
+
return React__default.createElement(InfiniteLoader, {
|
|
2982
|
+
isItemLoaded: isItemLoaded,
|
|
2983
|
+
itemCount: hasNextPage ? itemCount + 1 : itemCount,
|
|
2984
|
+
loadMoreItems: loadNextPage,
|
|
2985
|
+
threshold: 1
|
|
2986
|
+
}, function (_ref2) {
|
|
2987
|
+
var onItemsRendered = _ref2.onItemsRendered,
|
|
2988
|
+
ref = _ref2.ref;
|
|
2989
|
+
return React__default.createElement(reactWindow.VariableSizeList, {
|
|
2990
|
+
innerElementType: innerElementType,
|
|
2991
|
+
ref: ref,
|
|
2992
|
+
itemSize: function itemSize() {
|
|
2993
|
+
return size;
|
|
2994
|
+
},
|
|
2995
|
+
itemCount: itemCount,
|
|
2996
|
+
height: height || 0,
|
|
2997
|
+
width: width || 0,
|
|
2998
|
+
onItemsRendered: onItemsRendered
|
|
2999
|
+
}, function (_ref3) {
|
|
3000
|
+
var index = _ref3.index,
|
|
3001
|
+
style = _ref3.style;
|
|
3002
|
+
return isItemLoaded(index) ? React__default.createElement(Item, {
|
|
3003
|
+
index: index,
|
|
3004
|
+
style: style
|
|
3005
|
+
}) : null;
|
|
3006
|
+
});
|
|
3007
|
+
});
|
|
3008
|
+
});
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3011
|
+
var TokenImage = /*#__PURE__*/styled('img', {
|
|
3012
|
+
width: '$32',
|
|
3013
|
+
maxHeight: '$32',
|
|
3014
|
+
marginRight: '$16'
|
|
3015
|
+
});
|
|
3016
|
+
var TokenNameContainer = /*#__PURE__*/styled('div', {
|
|
3017
|
+
display: 'flex',
|
|
3018
|
+
flexDirection: 'column'
|
|
3019
|
+
});
|
|
3020
|
+
var TokenAmountContainer = /*#__PURE__*/styled('div', {
|
|
3021
|
+
display: 'flex',
|
|
3022
|
+
flexDirection: 'column',
|
|
3023
|
+
alignItems: 'flex-end'
|
|
3024
|
+
});
|
|
3025
|
+
function TokenItem(props) {
|
|
3026
|
+
var _token$balance;
|
|
3027
|
+
var token = props.token,
|
|
3028
|
+
style = props.style,
|
|
3029
|
+
onClick = props.onClick,
|
|
3030
|
+
selected = props.selected;
|
|
3031
|
+
return React__default.createElement("div", {
|
|
3032
|
+
style: _extends({
|
|
3033
|
+
display: 'flex',
|
|
3034
|
+
alignItems: 'center',
|
|
3035
|
+
width: '100%'
|
|
3036
|
+
}, style, {
|
|
3037
|
+
height: '48px',
|
|
3038
|
+
top: parseFloat(style == null ? void 0 : style.top) + 0 + "px",
|
|
3039
|
+
padding: '0 4px'
|
|
3040
|
+
})
|
|
3041
|
+
}, React__default.createElement(Button, {
|
|
3042
|
+
variant: "outlined",
|
|
3043
|
+
size: "large",
|
|
3044
|
+
align: "start",
|
|
3045
|
+
onClick: onClick.bind(null, token),
|
|
3046
|
+
type: selected ? 'primary' : undefined,
|
|
3047
|
+
prefix: React__default.createElement(TokenImage, {
|
|
3048
|
+
src: token.image
|
|
3049
|
+
}),
|
|
3050
|
+
suffix: ((_token$balance = token.balance) == null ? void 0 : _token$balance.amount) && React__default.createElement(TokenAmountContainer, null, React__default.createElement(Typography, {
|
|
3051
|
+
variant: "body2"
|
|
3052
|
+
}, token.balance.amount), React__default.createElement(Typography, {
|
|
3053
|
+
variant: "caption"
|
|
3054
|
+
}, token.balance.usdValue + "$"))
|
|
3055
|
+
}, React__default.createElement(TokenNameContainer, null, React__default.createElement(Typography, {
|
|
3056
|
+
variant: "body1"
|
|
3057
|
+
}, token.symbol), React__default.createElement(Typography, {
|
|
3058
|
+
variant: "caption",
|
|
3059
|
+
color: "neutrals600"
|
|
3060
|
+
}, token.name))));
|
|
3061
|
+
}
|
|
3062
|
+
|
|
3063
|
+
var _excluded$G = ["style"];
|
|
3064
|
+
var PAGE_SIZE = 20;
|
|
3065
|
+
function TokenList(props) {
|
|
3066
|
+
var list = props.list,
|
|
3067
|
+
searchedText = props.searchedText,
|
|
3068
|
+
onChange = props.onChange,
|
|
3069
|
+
multiSelect = props.multiSelect,
|
|
3070
|
+
selectedList = props.selectedList;
|
|
3071
|
+
var _useState = React.useState(props.selected),
|
|
3072
|
+
selected = _useState[0],
|
|
3073
|
+
setSelected = _useState[1];
|
|
3074
|
+
var changeSelected = function changeSelected(token) {
|
|
3075
|
+
setSelected(token);
|
|
3076
|
+
onChange(token);
|
|
3077
|
+
};
|
|
3078
|
+
var isSelected = function isSelected(token) {
|
|
3079
|
+
if (multiSelect && selectedList) {
|
|
3080
|
+
return selectedList === 'all' || selectedList.map(function (item) {
|
|
3081
|
+
return item.symbol + item.address;
|
|
3082
|
+
}).indexOf(token.symbol + token.address) > -1;
|
|
3083
|
+
}
|
|
3084
|
+
return (selected == null ? void 0 : selected.symbol) === token.symbol && (selected == null ? void 0 : selected.address) === token.address;
|
|
3085
|
+
};
|
|
3086
|
+
var _useState2 = React.useState(true),
|
|
3087
|
+
hasNextPage = _useState2[0],
|
|
3088
|
+
setHasNextPage = _useState2[1];
|
|
3089
|
+
var _useState3 = React.useState(list),
|
|
3090
|
+
tokens = _useState3[0],
|
|
3091
|
+
setTokens = _useState3[1];
|
|
3092
|
+
var loadNextPage = function loadNextPage() {
|
|
3093
|
+
setTokens(list.slice(0, tokens.length + PAGE_SIZE));
|
|
3094
|
+
};
|
|
3095
|
+
React.useEffect(function () {
|
|
3096
|
+
setTokens(list.slice(0, PAGE_SIZE));
|
|
3097
|
+
}, [searchedText, list]);
|
|
3098
|
+
React.useEffect(function () {
|
|
3099
|
+
setHasNextPage(list.length > tokens.length);
|
|
3100
|
+
}, [tokens.length]);
|
|
3101
|
+
var innerElementType = React.forwardRef(function (_ref, ref) {
|
|
3102
|
+
var style = _ref.style,
|
|
3103
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
3104
|
+
return React__default.createElement("div", Object.assign({
|
|
3105
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3106
|
+
ref: ref,
|
|
3107
|
+
style: _extends({}, style, {
|
|
3108
|
+
height: parseFloat(style == null ? void 0 : style.height) + 8 * 2 + "px"
|
|
3109
|
+
})
|
|
3110
|
+
}, rest));
|
|
3111
|
+
});
|
|
3112
|
+
return React__default.createElement(VirtualizedList, {
|
|
3113
|
+
Item: function Item(_ref2) {
|
|
3114
|
+
var index = _ref2.index,
|
|
3115
|
+
style = _ref2.style;
|
|
3116
|
+
return React__default.createElement(TokenItem, {
|
|
3117
|
+
token: tokens[index],
|
|
3118
|
+
style: style,
|
|
3119
|
+
onClick: changeSelected,
|
|
3120
|
+
selected: isSelected(tokens[index])
|
|
3121
|
+
});
|
|
3122
|
+
},
|
|
3123
|
+
hasNextPage: hasNextPage,
|
|
3124
|
+
itemCount: tokens.length,
|
|
3125
|
+
loadNextPage: loadNextPage,
|
|
3126
|
+
innerElementType: innerElementType,
|
|
3127
|
+
size: 56
|
|
3128
|
+
});
|
|
3129
|
+
}
|
|
3130
|
+
|
|
3131
|
+
var Container$1 = /*#__PURE__*/styled('div', {
|
|
3132
|
+
flex: '1'
|
|
3133
|
+
});
|
|
3134
|
+
var LoaderContainer = /*#__PURE__*/styled('div', {
|
|
2523
3135
|
display: 'flex',
|
|
2524
3136
|
justifyContent: 'center',
|
|
2525
|
-
|
|
3137
|
+
width: '100%',
|
|
3138
|
+
position: 'absolute',
|
|
3139
|
+
top: '50%'
|
|
3140
|
+
});
|
|
3141
|
+
var filterTokens = function filterTokens(list, searchedFor) {
|
|
3142
|
+
return list.filter(function (token) {
|
|
3143
|
+
return containsText(token.symbol, searchedFor) || containsText(token.address || '', searchedFor) || containsText(token.name || '', searchedFor);
|
|
3144
|
+
});
|
|
3145
|
+
};
|
|
3146
|
+
function TokenSelector(props) {
|
|
3147
|
+
var list = props.list,
|
|
3148
|
+
type = props.type,
|
|
3149
|
+
selected = props.selected,
|
|
3150
|
+
onChange = props.onChange,
|
|
3151
|
+
hasHeader = props.hasHeader,
|
|
3152
|
+
multiSelect = props.multiSelect,
|
|
3153
|
+
selectedList = props.selectedList,
|
|
3154
|
+
onBack = props.onBack,
|
|
3155
|
+
loadingStatus = props.loadingStatus;
|
|
3156
|
+
return React__default.createElement(SecondaryPage, {
|
|
3157
|
+
textField: true,
|
|
3158
|
+
textFieldPlaceholder: "Search Blockchain By Name",
|
|
3159
|
+
title: "Select " + type + " Token",
|
|
3160
|
+
hasHeader: hasHeader,
|
|
3161
|
+
onBack: onBack
|
|
3162
|
+
}, function (searchedFor) {
|
|
3163
|
+
var filteredTokens = filterTokens(list, searchedFor);
|
|
3164
|
+
return React__default.createElement(Container$1, null, loadingStatus === 'loading' && React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
|
|
3165
|
+
size: 24
|
|
3166
|
+
})), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredTokens.length ? React__default.createElement(TokenList, {
|
|
3167
|
+
searchedText: searchedFor,
|
|
3168
|
+
list: filteredTokens,
|
|
3169
|
+
selected: selected,
|
|
3170
|
+
selectedList: selectedList,
|
|
3171
|
+
multiSelect: multiSelect,
|
|
3172
|
+
onChange: onChange
|
|
3173
|
+
}) : React__default.createElement(NotFoundAlert, {
|
|
3174
|
+
catergory: "Token",
|
|
3175
|
+
searchedFor: searchedFor
|
|
3176
|
+
})));
|
|
3177
|
+
});
|
|
3178
|
+
}
|
|
3179
|
+
|
|
3180
|
+
var ListContainer$1 = /*#__PURE__*/styled('div', {
|
|
3181
|
+
overflowY: 'auto'
|
|
2526
3182
|
});
|
|
2527
3183
|
var filterBlockchains = function filterBlockchains(list, searchedFor) {
|
|
2528
3184
|
return list.filter(function (blockchain) {
|
|
@@ -2551,27 +3207,22 @@ function BlockchainSelector(props) {
|
|
|
2551
3207
|
return React__default.createElement(ListContainer$1, {
|
|
2552
3208
|
style: listContainerStyle,
|
|
2553
3209
|
key: "1"
|
|
2554
|
-
}, loadingStatus === 'loading' && React__default.createElement(
|
|
3210
|
+
}, loadingStatus === 'loading' && React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
|
|
2555
3211
|
size: 24
|
|
2556
|
-
})), loadingStatus === 'failed' && React__default.createElement(
|
|
2557
|
-
type: "error"
|
|
2558
|
-
}, React__default.createElement(Typography, {
|
|
2559
|
-
variant: "body2"
|
|
2560
|
-
}, "Error connecting server, please reload the app and try again")), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredBlockchains.length > 0 ? React__default.createElement(BlockchainsList, {
|
|
3212
|
+
})), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredBlockchains.length ? React__default.createElement(BlockchainsList, {
|
|
2561
3213
|
list: filteredBlockchains,
|
|
2562
3214
|
selected: selected,
|
|
2563
3215
|
multiSelect: multiSelect,
|
|
2564
3216
|
selectedList: selectedList,
|
|
2565
3217
|
onChange: onChange
|
|
2566
|
-
}) : React__default.createElement(
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
}, searchedFor + " not found"))));
|
|
3218
|
+
}) : React__default.createElement(NotFoundAlert, {
|
|
3219
|
+
catergory: "Blockchain",
|
|
3220
|
+
searchedFor: searchedFor
|
|
3221
|
+
})));
|
|
2571
3222
|
});
|
|
2572
3223
|
}
|
|
2573
3224
|
|
|
2574
|
-
var _excluded$
|
|
3225
|
+
var _excluded$H = ["label", "id"];
|
|
2575
3226
|
var CheckboxContainer = /*#__PURE__*/styled('div', {
|
|
2576
3227
|
display: 'flex',
|
|
2577
3228
|
alignItems: 'center'
|
|
@@ -2596,7 +3247,7 @@ var Label$1 = /*#__PURE__*/styled('label', {
|
|
|
2596
3247
|
function Checkbox(_ref) {
|
|
2597
3248
|
var label = _ref.label,
|
|
2598
3249
|
id = _ref.id,
|
|
2599
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3250
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
2600
3251
|
return React__default.createElement(CheckboxContainer, null, React__default.createElement(CheckboxRoot, Object.assign({
|
|
2601
3252
|
id: id
|
|
2602
3253
|
}, props), React__default.createElement(RadixCheckbox.Indicator, null, React__default.createElement(CheckIcon, {
|
|
@@ -2616,13 +3267,17 @@ var ChipCointainer = /*#__PURE__*/styled('div', {
|
|
|
2616
3267
|
height: '32',
|
|
2617
3268
|
fontSize: '$14',
|
|
2618
3269
|
cursor: 'pointer',
|
|
3270
|
+
transition: 'all 0.35s',
|
|
3271
|
+
color: '$foreground',
|
|
2619
3272
|
'&:hover': {
|
|
2620
|
-
backgroundColor: '$
|
|
3273
|
+
backgroundColor: '$success700',
|
|
3274
|
+
color: '$background'
|
|
2621
3275
|
},
|
|
2622
3276
|
variants: {
|
|
2623
3277
|
selected: {
|
|
2624
3278
|
"true": {
|
|
2625
|
-
backgroundColor: '$
|
|
3279
|
+
backgroundColor: '$success',
|
|
3280
|
+
color: '$background'
|
|
2626
3281
|
},
|
|
2627
3282
|
"false": {
|
|
2628
3283
|
backgroundColor: '$background'
|
|
@@ -2641,9 +3296,7 @@ function Chip(props) {
|
|
|
2641
3296
|
selected: selected,
|
|
2642
3297
|
onClick: onClick,
|
|
2643
3298
|
style: style
|
|
2644
|
-
}, prefix || null,
|
|
2645
|
-
variant: "body2"
|
|
2646
|
-
}, label), suffix || null);
|
|
3299
|
+
}, prefix || null, label, suffix || null);
|
|
2647
3300
|
}
|
|
2648
3301
|
|
|
2649
3302
|
var BackDrop = /*#__PURE__*/styled('div', {
|
|
@@ -2677,7 +3330,7 @@ var ModalHeader = /*#__PURE__*/styled('div', {
|
|
|
2677
3330
|
position: 'relative',
|
|
2678
3331
|
marginBottom: '$16'
|
|
2679
3332
|
});
|
|
2680
|
-
var ContentContainer$
|
|
3333
|
+
var ContentContainer$1 = /*#__PURE__*/styled('div', {});
|
|
2681
3334
|
function Modal(props) {
|
|
2682
3335
|
var title = props.title,
|
|
2683
3336
|
content = props.content,
|
|
@@ -2701,7 +3354,7 @@ function Modal(props) {
|
|
|
2701
3354
|
}, title), React__default.createElement(Row, null, action, React__default.createElement(CloseIcon, {
|
|
2702
3355
|
size: 24,
|
|
2703
3356
|
onClick: onClose
|
|
2704
|
-
}))), React__default.createElement(ContentContainer$
|
|
3357
|
+
}))), React__default.createElement(ContentContainer$1, {
|
|
2705
3358
|
style: contentStyle
|
|
2706
3359
|
}, content))), document.body));
|
|
2707
3360
|
}
|
|
@@ -2727,7 +3380,7 @@ var State = function State(_ref) {
|
|
|
2727
3380
|
}, React__default.createElement(DownloadIcon, {
|
|
2728
3381
|
size: 24,
|
|
2729
3382
|
color: "success"
|
|
2730
|
-
})), walletState === exports.WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === exports.WalletState.CONNECTED && React__default.createElement(
|
|
3383
|
+
})), walletState === exports.WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === exports.WalletState.CONNECTED && React__default.createElement(DisconnectIcon, null)));
|
|
2731
3384
|
};
|
|
2732
3385
|
|
|
2733
3386
|
var WalletImage = /*#__PURE__*/styled('img', {
|
|
@@ -2735,6 +3388,23 @@ var WalletImage = /*#__PURE__*/styled('img', {
|
|
|
2735
3388
|
height: '$24',
|
|
2736
3389
|
marginRight: '$12'
|
|
2737
3390
|
});
|
|
3391
|
+
var Text = /*#__PURE__*/styled('div', {
|
|
3392
|
+
display: 'flex',
|
|
3393
|
+
flexDirection: 'column'
|
|
3394
|
+
});
|
|
3395
|
+
var ExtendedButton = /*#__PURE__*/styled(Button, {
|
|
3396
|
+
variants: {
|
|
3397
|
+
type: {
|
|
3398
|
+
primary: {
|
|
3399
|
+
outline: '1px solid $primary',
|
|
3400
|
+
borderColor: '$primary',
|
|
3401
|
+
'&:hover': {
|
|
3402
|
+
borderColor: '$primary'
|
|
3403
|
+
}
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
}
|
|
3407
|
+
});
|
|
2738
3408
|
function Wallet(props) {
|
|
2739
3409
|
var name = props.name,
|
|
2740
3410
|
type = props.type,
|
|
@@ -2742,9 +3412,9 @@ function Wallet(props) {
|
|
|
2742
3412
|
state = props.state,
|
|
2743
3413
|
_onClick = props.onClick,
|
|
2744
3414
|
installLink = props.installLink;
|
|
2745
|
-
return React__default.createElement(
|
|
3415
|
+
return React__default.createElement(ExtendedButton, {
|
|
2746
3416
|
type: state === exports.WalletState.CONNECTED ? 'primary' : undefined,
|
|
2747
|
-
disabled:
|
|
3417
|
+
disabled: state == exports.WalletState.CONNECTING,
|
|
2748
3418
|
onClick: function onClick() {
|
|
2749
3419
|
if (state === exports.WalletState.NOT_INSTALLED) {
|
|
2750
3420
|
window.open(walletsShared.detectInstallLink(installLink), '_blank');
|
|
@@ -2760,10 +3430,14 @@ function Wallet(props) {
|
|
|
2760
3430
|
walletState: state,
|
|
2761
3431
|
installLink: installLink
|
|
2762
3432
|
})
|
|
2763
|
-
}, React__default.createElement(Typography, {
|
|
3433
|
+
}, React__default.createElement(Text, null, React__default.createElement(Typography, {
|
|
2764
3434
|
variant: "h5",
|
|
2765
3435
|
noWrap: false
|
|
2766
|
-
}, name)
|
|
3436
|
+
}, name), state === exports.WalletState.CONNECTED ? React__default.createElement(Typography, {
|
|
3437
|
+
variant: "caption",
|
|
3438
|
+
noWrap: false,
|
|
3439
|
+
color: "primary"
|
|
3440
|
+
}, "Connected") : null));
|
|
2767
3441
|
}
|
|
2768
3442
|
|
|
2769
3443
|
var ModalContent = /*#__PURE__*/styled('div', {
|
|
@@ -2795,107 +3469,21 @@ function ConnectWalletsModal(props) {
|
|
|
2795
3469
|
});
|
|
2796
3470
|
}
|
|
2797
3471
|
|
|
2798
|
-
var SpacerContainer = /*#__PURE__*/styled('div', {
|
|
2799
|
-
variants: {
|
|
2800
|
-
size: {
|
|
2801
|
-
12: {},
|
|
2802
|
-
16: {},
|
|
2803
|
-
18: {},
|
|
2804
|
-
20: {},
|
|
2805
|
-
24: {}
|
|
2806
|
-
},
|
|
2807
|
-
direction: {
|
|
2808
|
-
vertical: {},
|
|
2809
|
-
horizontal: {}
|
|
2810
|
-
}
|
|
2811
|
-
},
|
|
2812
|
-
compoundVariants: [{
|
|
2813
|
-
size: 12,
|
|
2814
|
-
direction: 'horizontal',
|
|
2815
|
-
css: {
|
|
2816
|
-
width: '$12'
|
|
2817
|
-
}
|
|
2818
|
-
}, {
|
|
2819
|
-
size: 12,
|
|
2820
|
-
direction: 'vertical',
|
|
2821
|
-
css: {
|
|
2822
|
-
height: '$12'
|
|
2823
|
-
}
|
|
2824
|
-
}, {
|
|
2825
|
-
size: 16,
|
|
2826
|
-
direction: 'horizontal',
|
|
2827
|
-
css: {
|
|
2828
|
-
width: '$16'
|
|
2829
|
-
}
|
|
2830
|
-
}, {
|
|
2831
|
-
size: 16,
|
|
2832
|
-
direction: 'vertical',
|
|
2833
|
-
css: {
|
|
2834
|
-
height: '$16'
|
|
2835
|
-
}
|
|
2836
|
-
}, {
|
|
2837
|
-
size: 18,
|
|
2838
|
-
direction: 'horizontal',
|
|
2839
|
-
css: {
|
|
2840
|
-
width: '$18'
|
|
2841
|
-
}
|
|
2842
|
-
}, {
|
|
2843
|
-
size: 18,
|
|
2844
|
-
direction: 'vertical',
|
|
2845
|
-
css: {
|
|
2846
|
-
height: '$18'
|
|
2847
|
-
}
|
|
2848
|
-
}, {
|
|
2849
|
-
size: 20,
|
|
2850
|
-
direction: 'horizontal',
|
|
2851
|
-
css: {
|
|
2852
|
-
width: '$20'
|
|
2853
|
-
}
|
|
2854
|
-
}, {
|
|
2855
|
-
size: 20,
|
|
2856
|
-
direction: 'vertical',
|
|
2857
|
-
css: {
|
|
2858
|
-
height: '$20'
|
|
2859
|
-
}
|
|
2860
|
-
}, {
|
|
2861
|
-
size: 24,
|
|
2862
|
-
direction: 'horizontal',
|
|
2863
|
-
css: {
|
|
2864
|
-
width: '$24'
|
|
2865
|
-
}
|
|
2866
|
-
}, {
|
|
2867
|
-
size: 24,
|
|
2868
|
-
direction: 'vertical',
|
|
2869
|
-
css: {
|
|
2870
|
-
height: '$24'
|
|
2871
|
-
}
|
|
2872
|
-
}]
|
|
2873
|
-
});
|
|
2874
|
-
function Spacer(_ref) {
|
|
2875
|
-
var _ref$size = _ref.size,
|
|
2876
|
-
size = _ref$size === void 0 ? 12 : _ref$size,
|
|
2877
|
-
_ref$direction = _ref.direction,
|
|
2878
|
-
direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction;
|
|
2879
|
-
return React__default.createElement(SpacerContainer, {
|
|
2880
|
-
size: size,
|
|
2881
|
-
direction: direction
|
|
2882
|
-
});
|
|
2883
|
-
}
|
|
2884
|
-
|
|
2885
3472
|
var StyledSwitchRoot = /*#__PURE__*/styled(RadixSwitch.Root, {
|
|
2886
3473
|
boxSizing: 'border-box',
|
|
2887
3474
|
boxShadow: 'none',
|
|
2888
3475
|
borderStyle: 'solid',
|
|
2889
3476
|
width: '42px',
|
|
2890
3477
|
height: '22px',
|
|
2891
|
-
backgroundColor: '$
|
|
2892
|
-
borderColor: '$
|
|
3478
|
+
backgroundColor: '$neutrals600',
|
|
3479
|
+
borderColor: '$neutrals600',
|
|
2893
3480
|
borderRadius: '99999px',
|
|
2894
3481
|
position: 'relative',
|
|
2895
3482
|
padding: '0',
|
|
2896
3483
|
cursor: 'pointer',
|
|
2897
3484
|
'&[data-state="checked"]': {
|
|
2898
|
-
backgroundColor: '$
|
|
3485
|
+
backgroundColor: '$success',
|
|
3486
|
+
borderColor: '$success'
|
|
2899
3487
|
},
|
|
2900
3488
|
'-webkit-tap-highlight-color': 'rgba(0, 0, 0, 0)'
|
|
2901
3489
|
});
|
|
@@ -2906,13 +3494,12 @@ var StyledSwitchThumb = /*#__PURE__*/styled(RadixSwitch.Thumb, {
|
|
|
2906
3494
|
display: 'block',
|
|
2907
3495
|
width: '18px',
|
|
2908
3496
|
height: '18px',
|
|
2909
|
-
backgroundColor: '$
|
|
3497
|
+
backgroundColor: '$white',
|
|
2910
3498
|
transition: ' transform 300ms',
|
|
2911
3499
|
borderRadius: '999999px',
|
|
2912
3500
|
willChange: 'transform',
|
|
2913
3501
|
'&[data-state="checked"]': {
|
|
2914
|
-
transform: 'translateX(20px)'
|
|
2915
|
-
backgroundColor: '$primary'
|
|
3502
|
+
transform: 'translateX(20px)'
|
|
2916
3503
|
}
|
|
2917
3504
|
});
|
|
2918
3505
|
function Switch(props) {
|
|
@@ -2934,12 +3521,21 @@ var groupLiquiditySources = function groupLiquiditySources(liquiditySources) {
|
|
|
2934
3521
|
})
|
|
2935
3522
|
};
|
|
2936
3523
|
};
|
|
2937
|
-
var
|
|
3524
|
+
var MainContainer$1 = /*#__PURE__*/styled('div', {
|
|
3525
|
+
variants: {
|
|
3526
|
+
loaded: {
|
|
3527
|
+
"true": {
|
|
3528
|
+
overflowY: 'auto'
|
|
3529
|
+
}
|
|
3530
|
+
}
|
|
3531
|
+
}
|
|
3532
|
+
});
|
|
3533
|
+
var LiquiditySourceType = /*#__PURE__*/styled('div', {
|
|
2938
3534
|
position: 'sticky',
|
|
2939
|
-
display: '
|
|
3535
|
+
display: 'flex',
|
|
3536
|
+
justifyContent: 'space-between',
|
|
3537
|
+
alignItems: 'center',
|
|
2940
3538
|
top: '0',
|
|
2941
|
-
marginTop: '$8',
|
|
2942
|
-
marginBottom: '$8',
|
|
2943
3539
|
backgroundColor: '$background',
|
|
2944
3540
|
zIndex: '9999',
|
|
2945
3541
|
paddingTop: '$8',
|
|
@@ -2950,10 +3546,16 @@ var LiquidityImage = /*#__PURE__*/styled('img', {
|
|
|
2950
3546
|
maxHeight: '$20',
|
|
2951
3547
|
marginRight: '$16'
|
|
2952
3548
|
});
|
|
3549
|
+
var LoaderContainer$1 = /*#__PURE__*/styled('div', {
|
|
3550
|
+
display: 'flex',
|
|
3551
|
+
justifyContent: 'center'
|
|
3552
|
+
});
|
|
2953
3553
|
function LiquiditySourceList(props) {
|
|
2954
3554
|
var list = props.list,
|
|
2955
3555
|
onChange = props.onChange,
|
|
2956
|
-
listContainerStyle = props.listContainerStyle
|
|
3556
|
+
listContainerStyle = props.listContainerStyle,
|
|
3557
|
+
loadingStatus = props.loadingStatus,
|
|
3558
|
+
searchedFor = props.searchedFor;
|
|
2957
3559
|
var _useState = React.useState(list.filter(function (item) {
|
|
2958
3560
|
return item.selected;
|
|
2959
3561
|
})),
|
|
@@ -2979,35 +3581,58 @@ function LiquiditySourceList(props) {
|
|
|
2979
3581
|
return item.selected;
|
|
2980
3582
|
}));
|
|
2981
3583
|
}, [list]);
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
3584
|
+
var sections = groupLiquiditySources(list);
|
|
3585
|
+
var bridges = sections.bridge;
|
|
3586
|
+
var exchanges = sections.exchange;
|
|
3587
|
+
var totalBridges = bridges.length;
|
|
3588
|
+
var totalExchanges = exchanges.length;
|
|
3589
|
+
// TODO: This is not performant
|
|
3590
|
+
var totalSelectedBridges = bridges.filter(isSelected).length;
|
|
3591
|
+
var totalSelectedExchanges = exchanges.filter(isSelected).length;
|
|
3592
|
+
return React__default.createElement(MainContainer$1, {
|
|
3593
|
+
style: listContainerStyle,
|
|
3594
|
+
loaded: loadingStatus === 'success'
|
|
3595
|
+
}, React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, null, React__default.createElement(Typography, {
|
|
2987
3596
|
variant: "h5"
|
|
2988
|
-
}, "Bridges"), React__default.createElement(
|
|
2989
|
-
|
|
3597
|
+
}, "Bridges"), React__default.createElement(Typography, {
|
|
3598
|
+
variant: "body1",
|
|
3599
|
+
color: "neutrals800"
|
|
3600
|
+
}, totalSelectedBridges === totalBridges ? totalBridges : totalSelectedBridges + " / " + totalBridges)), React__default.createElement(Spacer, {
|
|
3601
|
+
size: 12,
|
|
2990
3602
|
direction: "vertical"
|
|
2991
|
-
}),
|
|
3603
|
+
}), loadingStatus === 'loading' && React__default.createElement(LoaderContainer$1, null, React__default.createElement(Spinner, {
|
|
3604
|
+
size: 24
|
|
3605
|
+
})), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, totalBridges ? bridges.map(function (liquiditySource, index) {
|
|
2992
3606
|
return React__default.createElement(LiquiditySourceItem, {
|
|
2993
3607
|
liquiditySource: liquiditySource,
|
|
2994
3608
|
key: index,
|
|
2995
3609
|
selected: isSelected(liquiditySource),
|
|
2996
3610
|
onChange: changeLiquiditySources
|
|
2997
3611
|
});
|
|
2998
|
-
})
|
|
3612
|
+
}) : React__default.createElement(NotFoundAlert, {
|
|
3613
|
+
catergory: "Bridge",
|
|
3614
|
+
searchedFor: searchedFor
|
|
3615
|
+
}))), React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, null, React__default.createElement(Typography, {
|
|
2999
3616
|
variant: "h5"
|
|
3000
|
-
}, "Exchanges"), React__default.createElement(
|
|
3001
|
-
|
|
3617
|
+
}, "Exchanges"), React__default.createElement(Typography, {
|
|
3618
|
+
variant: "body1",
|
|
3619
|
+
color: "neutrals800"
|
|
3620
|
+
}, totalSelectedExchanges === totalExchanges ? totalExchanges : totalSelectedExchanges + " / " + totalExchanges)), React__default.createElement(Spacer, {
|
|
3621
|
+
size: 12,
|
|
3002
3622
|
direction: "vertical"
|
|
3003
|
-
}),
|
|
3623
|
+
}), loadingStatus === 'loading' && React__default.createElement(LoaderContainer$1, null, React__default.createElement(Spinner, {
|
|
3624
|
+
size: 24
|
|
3625
|
+
})), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus == 'success' && React__default.createElement(React__default.Fragment, null, totalExchanges ? exchanges.map(function (liquiditySource, index) {
|
|
3004
3626
|
return React__default.createElement(LiquiditySourceItem, {
|
|
3005
3627
|
liquiditySource: liquiditySource,
|
|
3006
3628
|
key: index,
|
|
3007
3629
|
selected: isSelected(liquiditySource),
|
|
3008
3630
|
onChange: changeLiquiditySources
|
|
3009
3631
|
});
|
|
3010
|
-
})
|
|
3632
|
+
}) : React__default.createElement(NotFoundAlert, {
|
|
3633
|
+
catergory: "Exchange",
|
|
3634
|
+
searchedFor: searchedFor
|
|
3635
|
+
}))));
|
|
3011
3636
|
}
|
|
3012
3637
|
var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
|
|
3013
3638
|
var liquiditySource = _ref.liquiditySource,
|
|
@@ -3026,7 +3651,6 @@ var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
|
|
|
3026
3651
|
style: {
|
|
3027
3652
|
marginBottom: '12px'
|
|
3028
3653
|
},
|
|
3029
|
-
type: selected ? 'primary' : undefined,
|
|
3030
3654
|
onClick: onChange.bind(null, liquiditySource)
|
|
3031
3655
|
}, React__default.createElement(Typography, {
|
|
3032
3656
|
variant: "body1"
|
|
@@ -3038,43 +3662,41 @@ var filterLiquiditySources = function filterLiquiditySources(liquiditySources, s
|
|
|
3038
3662
|
return containsText(liquiditySource.title, searchedFor || '');
|
|
3039
3663
|
});
|
|
3040
3664
|
};
|
|
3041
|
-
var ActionButton = /*#__PURE__*/styled(Button, {
|
|
3042
|
-
position: 'absolute',
|
|
3043
|
-
right: 0
|
|
3044
|
-
});
|
|
3045
3665
|
function LiquiditySourcesSelector(props) {
|
|
3046
3666
|
var list = props.list,
|
|
3047
3667
|
onChange = props.onChange,
|
|
3048
3668
|
onBack = props.onBack,
|
|
3049
3669
|
hasHeader = props.hasHeader,
|
|
3050
3670
|
listContainerStyle = props.listContainerStyle,
|
|
3051
|
-
toggleAll = props.toggleAll
|
|
3671
|
+
toggleAll = props.toggleAll,
|
|
3672
|
+
loadingStatus = props.loadingStatus;
|
|
3052
3673
|
return React__default.createElement(SecondaryPage, {
|
|
3053
3674
|
textField: true,
|
|
3054
3675
|
textFieldPlaceholder: "Search By Name",
|
|
3055
3676
|
title: "Liquidity Sources",
|
|
3056
|
-
TopButton: React__default.createElement(
|
|
3677
|
+
TopButton: React__default.createElement(Button, {
|
|
3057
3678
|
variant: "ghost",
|
|
3058
3679
|
type: "primary",
|
|
3059
3680
|
onClick: toggleAll
|
|
3060
3681
|
}, list.find(function (item) {
|
|
3061
3682
|
return item.selected;
|
|
3062
|
-
}) ? '
|
|
3683
|
+
}) ? 'Deselect all' : 'Select all'),
|
|
3063
3684
|
hasHeader: hasHeader,
|
|
3064
3685
|
onBack: onBack
|
|
3065
3686
|
}, function (searchedFor) {
|
|
3066
3687
|
return React__default.createElement(LiquiditySourceList, {
|
|
3067
3688
|
listContainerStyle: listContainerStyle,
|
|
3068
3689
|
list: filterLiquiditySources(list, searchedFor),
|
|
3069
|
-
onChange: onChange
|
|
3690
|
+
onChange: onChange,
|
|
3691
|
+
loadingStatus: loadingStatus,
|
|
3692
|
+
searchedFor: searchedFor
|
|
3070
3693
|
});
|
|
3071
3694
|
});
|
|
3072
3695
|
}
|
|
3073
3696
|
|
|
3074
3697
|
var Row$1 = /*#__PURE__*/styled('div', {
|
|
3075
3698
|
display: 'flex',
|
|
3076
|
-
flexWrap: 'wrap'
|
|
3077
|
-
justifyContent: 'center'
|
|
3699
|
+
flexWrap: 'wrap'
|
|
3078
3700
|
});
|
|
3079
3701
|
var Circle = /*#__PURE__*/styled('div', {
|
|
3080
3702
|
width: 12,
|
|
@@ -3169,7 +3791,9 @@ function SelectableWalletList(_ref) {
|
|
|
3169
3791
|
height: 24
|
|
3170
3792
|
}), React__default.createElement(Typography, {
|
|
3171
3793
|
variant: "body2"
|
|
3172
|
-
}, w.name), React__default.createElement(
|
|
3794
|
+
}, w.name), React__default.createElement(Typography, {
|
|
3795
|
+
variant: "caption"
|
|
3796
|
+
}, getConciseAddress(w.address)), React__default.createElement(Circle, {
|
|
3173
3797
|
checked: checked
|
|
3174
3798
|
}, React__default.createElement(SolidCircle, {
|
|
3175
3799
|
checked: checked
|
|
@@ -3199,14 +3823,14 @@ var ItemContainer = /*#__PURE__*/styled('div', {
|
|
|
3199
3823
|
});
|
|
3200
3824
|
var StyledItem = /*#__PURE__*/styled(RadioGroup.Item, {
|
|
3201
3825
|
padding: '0',
|
|
3202
|
-
backgroundColor: '$neutrals300',
|
|
3203
3826
|
width: '20px',
|
|
3204
3827
|
height: '20px',
|
|
3205
3828
|
borderRadius: '100%',
|
|
3206
|
-
border: 'none',
|
|
3207
3829
|
cursor: 'pointer',
|
|
3830
|
+
backgroundColor: '$background',
|
|
3831
|
+
border: '1px solid $neutrals400',
|
|
3208
3832
|
'&:hover': {
|
|
3209
|
-
|
|
3833
|
+
borderColor: '$neutrals600'
|
|
3210
3834
|
}
|
|
3211
3835
|
});
|
|
3212
3836
|
var Container$3 = /*#__PURE__*/styled('div', {
|
|
@@ -3225,7 +3849,7 @@ var StyledIndicator = /*#__PURE__*/styled(RadioGroup.Indicator, {
|
|
|
3225
3849
|
width: '10px',
|
|
3226
3850
|
height: '10px',
|
|
3227
3851
|
borderRadius: '50%',
|
|
3228
|
-
backgroundColor: '$
|
|
3852
|
+
backgroundColor: '$success'
|
|
3229
3853
|
}
|
|
3230
3854
|
});
|
|
3231
3855
|
var Label$2 = /*#__PURE__*/styled('label', {
|
|
@@ -3261,7 +3885,7 @@ function Radio(props) {
|
|
|
3261
3885
|
|
|
3262
3886
|
var BaseContainer = /*#__PURE__*/styled('div', {
|
|
3263
3887
|
borderRadius: '$5',
|
|
3264
|
-
backgroundColor: '$
|
|
3888
|
+
backgroundColor: '$neutrals300',
|
|
3265
3889
|
padding: '$16'
|
|
3266
3890
|
});
|
|
3267
3891
|
var Title = /*#__PURE__*/styled(Typography, {
|
|
@@ -3294,6 +3918,12 @@ var LiquiditySourceNumber = /*#__PURE__*/styled('div', {
|
|
|
3294
3918
|
var ThemesContainer = /*#__PURE__*/styled(BaseContainer, {
|
|
3295
3919
|
marginTop: '$32'
|
|
3296
3920
|
});
|
|
3921
|
+
var Head = /*#__PURE__*/styled('div', {
|
|
3922
|
+
display: 'flex',
|
|
3923
|
+
justifyContent: 'space-between',
|
|
3924
|
+
alignItems: 'center',
|
|
3925
|
+
paddingBottom: '$16'
|
|
3926
|
+
});
|
|
3297
3927
|
function Settings(props) {
|
|
3298
3928
|
var slippages = props.slippages,
|
|
3299
3929
|
selectedLiquiditySources = props.selectedLiquiditySources,
|
|
@@ -3308,7 +3938,8 @@ function Settings(props) {
|
|
|
3308
3938
|
selectedTheme = props.selectedTheme,
|
|
3309
3939
|
onThemeChange = props.onThemeChange,
|
|
3310
3940
|
toggleInfiniteApprove = props.toggleInfiniteApprove,
|
|
3311
|
-
infiniteApprove = props.infiniteApprove
|
|
3941
|
+
infiniteApprove = props.infiniteApprove,
|
|
3942
|
+
loadingStatus = props.loadingStatus;
|
|
3312
3943
|
var _useState = React.useState(props.selectedSlippage),
|
|
3313
3944
|
selectedSlippage = _useState[0],
|
|
3314
3945
|
setSelectedSlippage = _useState[1];
|
|
@@ -3316,9 +3947,12 @@ function Settings(props) {
|
|
|
3316
3947
|
setSelectedSlippage(slippage);
|
|
3317
3948
|
onSlippageChange(slippage);
|
|
3318
3949
|
};
|
|
3319
|
-
var PageContent = React__default.createElement(React__default.Fragment, null, React__default.createElement(BaseContainer, null, React__default.createElement(
|
|
3950
|
+
var PageContent = React__default.createElement(React__default.Fragment, null, React__default.createElement(BaseContainer, null, React__default.createElement(Head, null, React__default.createElement(Typography, {
|
|
3320
3951
|
variant: "body1"
|
|
3321
|
-
}, "Slippage tolerance per swap"), React__default.createElement(
|
|
3952
|
+
}, "Slippage tolerance per swap"), customSlippage ? React__default.createElement(Typography, {
|
|
3953
|
+
variant: "caption",
|
|
3954
|
+
color: "error"
|
|
3955
|
+
}, customSlippage, "% Custom") : undefined), React__default.createElement(SlippageChipsContainer, null, slippages.map(function (slippage, index) {
|
|
3322
3956
|
return React__default.createElement(Chip, {
|
|
3323
3957
|
key: index,
|
|
3324
3958
|
onClick: function onClick() {
|
|
@@ -3326,7 +3960,7 @@ function Settings(props) {
|
|
|
3326
3960
|
changeSlippage(slippage);
|
|
3327
3961
|
},
|
|
3328
3962
|
selected: !customSlippage && slippage === selectedSlippage,
|
|
3329
|
-
label: slippage.toString() + "
|
|
3963
|
+
label: slippage.toString() + "%",
|
|
3330
3964
|
style: {
|
|
3331
3965
|
marginRight: '8px'
|
|
3332
3966
|
}
|
|
@@ -3342,11 +3976,10 @@ function Settings(props) {
|
|
|
3342
3976
|
variant: "body2"
|
|
3343
3977
|
}, "%"),
|
|
3344
3978
|
size: "small",
|
|
3345
|
-
placeholder: "Custom",
|
|
3979
|
+
placeholder: "Custom %",
|
|
3346
3980
|
style: {
|
|
3347
3981
|
width: '128px',
|
|
3348
|
-
flexGrow: 'initial'
|
|
3349
|
-
borderColor: customSlippage ? '$success' : 'initial'
|
|
3982
|
+
flexGrow: 'initial'
|
|
3350
3983
|
}
|
|
3351
3984
|
}))), React__default.createElement(ThemesContainer, null, React__default.createElement(Title, {
|
|
3352
3985
|
variant: "body2"
|
|
@@ -3374,13 +4007,21 @@ function Settings(props) {
|
|
|
3374
4007
|
}, "Infinite Approval"), React__default.createElement(Switch, {
|
|
3375
4008
|
checked: infiniteApprove,
|
|
3376
4009
|
onChange: toggleInfiniteApprove
|
|
3377
|
-
})), React__default.createElement(LiquiditySourceContainer, {
|
|
3378
|
-
onClick: onLiquiditySourcesClick
|
|
4010
|
+
})), React__default.createElement(LiquiditySourceContainer, null, React__default.createElement(Button, {
|
|
4011
|
+
onClick: onLiquiditySourcesClick,
|
|
4012
|
+
align: "start",
|
|
4013
|
+
variant: "ghost",
|
|
4014
|
+
loading: loadingStatus === 'loading',
|
|
4015
|
+
suffix: React__default.createElement(LiquiditySourceNumber, null, loadingStatus === 'success' && React__default.createElement(Typography, {
|
|
4016
|
+
variant: "body2",
|
|
4017
|
+
color: "neutrals800"
|
|
4018
|
+
}, liquiditySources.length !== selectedLiquiditySources.length ? selectedLiquiditySources.length + " / " + liquiditySources.length : liquiditySources.length), loadingStatus === 'failed' && React__default.createElement(Typography, {
|
|
4019
|
+
variant: "body2",
|
|
4020
|
+
color: "$error500"
|
|
4021
|
+
}, "Loading failed"), React__default.createElement(StyledAngleRight, null))
|
|
3379
4022
|
}, React__default.createElement(Typography, {
|
|
3380
4023
|
variant: "body1"
|
|
3381
|
-
}, "Liquidity Sources")
|
|
3382
|
-
variant: "body2"
|
|
3383
|
-
}, "( " + selectedLiquiditySources.length + " / " + liquiditySources.length + " )"), React__default.createElement(StyledAngleRight, null))));
|
|
4024
|
+
}, "Liquidity Sources"))));
|
|
3384
4025
|
return React__default.createElement(SecondaryPage, {
|
|
3385
4026
|
title: "Settings",
|
|
3386
4027
|
textField: false,
|
|
@@ -3388,433 +4029,169 @@ function Settings(props) {
|
|
|
3388
4029
|
}, PageContent);
|
|
3389
4030
|
}
|
|
3390
4031
|
|
|
3391
|
-
var MainContainer$
|
|
4032
|
+
var MainContainer$2 = /*#__PURE__*/styled('div', {
|
|
4033
|
+
position: 'relative',
|
|
4034
|
+
display: 'flex',
|
|
4035
|
+
flexDirection: 'column',
|
|
3392
4036
|
borderRadius: '$10',
|
|
3393
|
-
maxWidth: '512px',
|
|
3394
4037
|
boxShadow: '$s',
|
|
3395
|
-
minWidth: '375px',
|
|
3396
4038
|
width: '100%',
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
alignItems: 'end',
|
|
3402
|
-
padding: '$16 $24',
|
|
4039
|
+
minWidth: '375px',
|
|
4040
|
+
maxWidth: '512px',
|
|
4041
|
+
maxHeight: '595px',
|
|
4042
|
+
padding: '$16',
|
|
3403
4043
|
boxSizing: 'border-box',
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
4044
|
+
backgroundColor: '$background',
|
|
4045
|
+
variants: {
|
|
4046
|
+
fixedHeight: {
|
|
4047
|
+
"true": {
|
|
4048
|
+
height: '595px'
|
|
4049
|
+
},
|
|
4050
|
+
"false": {
|
|
4051
|
+
height: 'auto'
|
|
4052
|
+
}
|
|
4053
|
+
}
|
|
4054
|
+
}
|
|
3408
4055
|
});
|
|
3409
4056
|
function SwapContainer(props) {
|
|
3410
4057
|
var children = props.children,
|
|
3411
|
-
style = props.style
|
|
3412
|
-
|
|
4058
|
+
style = props.style,
|
|
4059
|
+
_props$fixedHeight = props.fixedHeight,
|
|
4060
|
+
fixedHeight = _props$fixedHeight === void 0 ? true : _props$fixedHeight;
|
|
4061
|
+
return React__default.createElement(MainContainer$2, {
|
|
3413
4062
|
style: style,
|
|
3414
|
-
id: "swap-box"
|
|
3415
|
-
|
|
4063
|
+
id: "swap-box",
|
|
4064
|
+
fixedHeight: fixedHeight
|
|
4065
|
+
}, children);
|
|
3416
4066
|
}
|
|
3417
4067
|
|
|
3418
|
-
var
|
|
3419
|
-
position: 'relative'
|
|
3420
|
-
});
|
|
3421
|
-
var ButtonContainer$1 = /*#__PURE__*/styled('div', {
|
|
3422
|
-
paddingTop: '$8'
|
|
3423
|
-
});
|
|
3424
|
-
var SwapContainer$1 = /*#__PURE__*/styled('div', {
|
|
4068
|
+
var TokenContainer = /*#__PURE__*/styled('div', {
|
|
3425
4069
|
display: 'flex',
|
|
3426
|
-
|
|
3427
|
-
'
|
|
3428
|
-
|
|
3429
|
-
},
|
|
3430
|
-
'&:hover': {
|
|
3431
|
-
borderColor: '$primary'
|
|
3432
|
-
},
|
|
3433
|
-
variants: {
|
|
3434
|
-
status: {
|
|
3435
|
-
failed: {
|
|
3436
|
-
borderColor: '$error'
|
|
3437
|
-
},
|
|
3438
|
-
running: {
|
|
3439
|
-
borderColor: '$neutrals400'
|
|
3440
|
-
},
|
|
3441
|
-
success: {
|
|
3442
|
-
borderColor: '$success'
|
|
3443
|
-
}
|
|
3444
|
-
}
|
|
4070
|
+
alignItems: 'center',
|
|
4071
|
+
'& .amount': {
|
|
4072
|
+
fontWeight: 'bold'
|
|
3445
4073
|
}
|
|
3446
4074
|
});
|
|
3447
|
-
var
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
width: '$20',
|
|
3455
|
-
border: '1px dashed $foreground',
|
|
3456
|
-
borderRadius: 'inherit',
|
|
3457
|
-
'@md': {
|
|
3458
|
-
width: '$36'
|
|
4075
|
+
var TokenImage$1 = /*#__PURE__*/styled('div', {
|
|
4076
|
+
position: 'relative',
|
|
4077
|
+
width: '$24',
|
|
4078
|
+
height: '$24',
|
|
4079
|
+
img: {
|
|
4080
|
+
width: '100%',
|
|
4081
|
+
display: 'block'
|
|
3459
4082
|
},
|
|
3460
|
-
'
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
width: '$8',
|
|
3471
|
-
height: '$8'
|
|
3472
|
-
}
|
|
3473
|
-
});
|
|
3474
|
-
var ArrowRight$1 = /*#__PURE__*/styled('div', {
|
|
3475
|
-
width: '0px',
|
|
3476
|
-
height: '0px',
|
|
3477
|
-
borderTop: '5px solid transparent',
|
|
3478
|
-
borderBottom: '5px solid transparent',
|
|
3479
|
-
borderLeft: '5px solid $foreground'
|
|
3480
|
-
});
|
|
3481
|
-
var StatusContainer = /*#__PURE__*/styled('div', {
|
|
3482
|
-
position: 'absolute',
|
|
3483
|
-
right: '-8px',
|
|
3484
|
-
top: '30%',
|
|
3485
|
-
background: '$background',
|
|
3486
|
-
borderRadius: '50%',
|
|
3487
|
-
display: 'flex',
|
|
3488
|
-
justifyContent: 'center',
|
|
3489
|
-
'@md': {
|
|
3490
|
-
top: '40%',
|
|
3491
|
-
right: '-8px'
|
|
4083
|
+
'.overlay': {
|
|
4084
|
+
position: 'absolute',
|
|
4085
|
+
right: -4,
|
|
4086
|
+
bottom: -4,
|
|
4087
|
+
width: '$16',
|
|
4088
|
+
height: '$16',
|
|
4089
|
+
padding: '$2',
|
|
4090
|
+
borderRadius: '50%',
|
|
4091
|
+
backgroundColor: '$background',
|
|
4092
|
+
border: '1px solid $neutrals400'
|
|
3492
4093
|
}
|
|
3493
4094
|
});
|
|
3494
|
-
function
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
},
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
chainLogo: firstStep.fromBlockchainLogo,
|
|
3511
|
-
blockchain: firstStep.fromBlockchain,
|
|
3512
|
-
amount: swap.inputAmount
|
|
3513
|
-
}), React__default.createElement(Arrow, null, React__default.createElement(Dot$1, null), React__default.createElement(Line$1, null), React__default.createElement(ArrowRight$1, null)), React__default.createElement(StepDetail, {
|
|
3514
|
-
logo: lastStep.toLogo,
|
|
3515
|
-
symbol: lastStep.toSymbol,
|
|
3516
|
-
chainLogo: lastStep.toBlockchainLogo,
|
|
3517
|
-
blockchain: lastStep.toBlockchain,
|
|
3518
|
-
amount: lastStep.outputAmount
|
|
3519
|
-
})))), React__default.createElement(StatusContainer, null, status === 'running' ? React__default.createElement(TryAgainIcon, {
|
|
3520
|
-
size: 16
|
|
3521
|
-
}) : status === 'failed' ? React__default.createElement(InfoCircleIcon, {
|
|
3522
|
-
size: 18,
|
|
3523
|
-
color: "error"
|
|
3524
|
-
}) : React__default.createElement(CheckCircleIcon, {
|
|
3525
|
-
size: 18,
|
|
3526
|
-
color: "success"
|
|
3527
|
-
})));
|
|
3528
|
-
}
|
|
3529
|
-
|
|
3530
|
-
function VirtualizedList(props) {
|
|
3531
|
-
var itemCount = props.itemCount,
|
|
3532
|
-
hasNextPage = props.hasNextPage,
|
|
3533
|
-
loadNextPage = props.loadNextPage,
|
|
3534
|
-
Item = props.Item,
|
|
3535
|
-
innerElementType = props.innerElementType,
|
|
3536
|
-
size = props.size;
|
|
3537
|
-
var isItemLoaded = function isItemLoaded(index) {
|
|
3538
|
-
return !hasNextPage || index < itemCount;
|
|
3539
|
-
};
|
|
3540
|
-
return React__default.createElement(AutoSizer, null, function (_ref) {
|
|
3541
|
-
var width = _ref.width,
|
|
3542
|
-
height = _ref.height;
|
|
3543
|
-
return React__default.createElement(InfiniteLoader, {
|
|
3544
|
-
isItemLoaded: isItemLoaded,
|
|
3545
|
-
itemCount: hasNextPage ? itemCount + 1 : itemCount,
|
|
3546
|
-
loadMoreItems: loadNextPage,
|
|
3547
|
-
threshold: 1
|
|
3548
|
-
}, function (_ref2) {
|
|
3549
|
-
var onItemsRendered = _ref2.onItemsRendered,
|
|
3550
|
-
ref = _ref2.ref;
|
|
3551
|
-
return React__default.createElement(reactWindow.VariableSizeList, {
|
|
3552
|
-
innerElementType: innerElementType,
|
|
3553
|
-
ref: ref,
|
|
3554
|
-
itemSize: function itemSize() {
|
|
3555
|
-
return size;
|
|
3556
|
-
},
|
|
3557
|
-
itemCount: itemCount,
|
|
3558
|
-
height: height || 0,
|
|
3559
|
-
width: width || 0,
|
|
3560
|
-
onItemsRendered: onItemsRendered
|
|
3561
|
-
}, function (_ref3) {
|
|
3562
|
-
var index = _ref3.index,
|
|
3563
|
-
style = _ref3.style;
|
|
3564
|
-
return isItemLoaded(index) ? React__default.createElement(Item, {
|
|
3565
|
-
index: index,
|
|
3566
|
-
style: style
|
|
3567
|
-
}) : null;
|
|
3568
|
-
});
|
|
3569
|
-
});
|
|
3570
|
-
});
|
|
4095
|
+
function Token(props) {
|
|
4096
|
+
return React__default.createElement(TokenContainer, null, React__default.createElement(TokenImage$1, null, React__default.createElement("img", {
|
|
4097
|
+
src: props.data.token.logo,
|
|
4098
|
+
alt: ""
|
|
4099
|
+
}), React__default.createElement("div", {
|
|
4100
|
+
className: "overlay"
|
|
4101
|
+
}, React__default.createElement("img", {
|
|
4102
|
+
src: props.data.blockchain.logo,
|
|
4103
|
+
alt: props.data.blockchain.name
|
|
4104
|
+
}))), React__default.createElement(Spacer, {
|
|
4105
|
+
size: 8
|
|
4106
|
+
}), React__default.createElement("span", {
|
|
4107
|
+
className: "amount"
|
|
4108
|
+
}, props.data.amount), React__default.createElement(Spacer, {
|
|
4109
|
+
size: 4
|
|
4110
|
+
}), props.data.token.symbol);
|
|
3571
4111
|
}
|
|
3572
4112
|
|
|
3573
|
-
var
|
|
3574
|
-
|
|
3575
|
-
maxHeight: '$32',
|
|
3576
|
-
marginRight: '$16'
|
|
3577
|
-
});
|
|
3578
|
-
var TokenNameContainer = /*#__PURE__*/styled('div', {
|
|
3579
|
-
display: 'flex',
|
|
3580
|
-
flexDirection: 'column'
|
|
3581
|
-
});
|
|
3582
|
-
var TokenAmountContainer = /*#__PURE__*/styled('div', {
|
|
4113
|
+
var Container$4 = /*#__PURE__*/styled('div', {
|
|
4114
|
+
position: 'relative',
|
|
3583
4115
|
display: 'flex',
|
|
3584
|
-
|
|
3585
|
-
alignItems: '
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
},
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
prefix: React__default.createElement(TokenImage, {
|
|
3609
|
-
src: token.image
|
|
3610
|
-
}),
|
|
3611
|
-
suffix: ((_token$balance = token.balance) == null ? void 0 : _token$balance.amount) && React__default.createElement(TokenAmountContainer, null, React__default.createElement(Typography, {
|
|
3612
|
-
variant: "body2"
|
|
3613
|
-
}, token.balance.amount), React__default.createElement(Typography, {
|
|
3614
|
-
variant: "caption"
|
|
3615
|
-
}, token.balance.usdValue + "$"))
|
|
3616
|
-
}, React__default.createElement(TokenNameContainer, null, React__default.createElement(Typography, {
|
|
3617
|
-
variant: "body1"
|
|
3618
|
-
}, token.symbol), React__default.createElement(Typography, {
|
|
3619
|
-
variant: "body2"
|
|
3620
|
-
}, token.name))));
|
|
3621
|
-
}
|
|
3622
|
-
|
|
3623
|
-
var _excluded$E = ["style"];
|
|
3624
|
-
var PAGE_SIZE = 20;
|
|
3625
|
-
function TokenList(props) {
|
|
3626
|
-
var list = props.list,
|
|
3627
|
-
searchedText = props.searchedText,
|
|
3628
|
-
onChange = props.onChange,
|
|
3629
|
-
multiSelect = props.multiSelect,
|
|
3630
|
-
selectedList = props.selectedList;
|
|
3631
|
-
var _useState = React.useState(props.selected),
|
|
3632
|
-
selected = _useState[0],
|
|
3633
|
-
setSelected = _useState[1];
|
|
3634
|
-
var changeSelected = function changeSelected(token) {
|
|
3635
|
-
setSelected(token);
|
|
3636
|
-
onChange(token);
|
|
3637
|
-
};
|
|
3638
|
-
var isSelected = function isSelected(token) {
|
|
3639
|
-
if (multiSelect && selectedList) {
|
|
3640
|
-
return selectedList === 'all' || selectedList.map(function (item) {
|
|
3641
|
-
return item.symbol + item.address;
|
|
3642
|
-
}).indexOf(token.symbol + token.address) > -1;
|
|
3643
|
-
}
|
|
3644
|
-
return (selected == null ? void 0 : selected.symbol) === token.symbol && (selected == null ? void 0 : selected.address) === token.address;
|
|
3645
|
-
};
|
|
3646
|
-
var _useState2 = React.useState(true),
|
|
3647
|
-
hasNextPage = _useState2[0],
|
|
3648
|
-
setHasNextPage = _useState2[1];
|
|
3649
|
-
var _useState3 = React.useState(list),
|
|
3650
|
-
tokens = _useState3[0],
|
|
3651
|
-
setTokens = _useState3[1];
|
|
3652
|
-
var loadNextPage = function loadNextPage() {
|
|
3653
|
-
setTokens(list.slice(0, tokens.length + PAGE_SIZE));
|
|
3654
|
-
};
|
|
3655
|
-
React.useEffect(function () {
|
|
3656
|
-
setTokens(list.slice(0, PAGE_SIZE));
|
|
3657
|
-
}, [searchedText]);
|
|
3658
|
-
React.useEffect(function () {
|
|
3659
|
-
setHasNextPage(list.length > tokens.length);
|
|
3660
|
-
}, [tokens.length]);
|
|
3661
|
-
var innerElementType = React.forwardRef(function (_ref, ref) {
|
|
3662
|
-
var style = _ref.style,
|
|
3663
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
3664
|
-
return React__default.createElement("div", Object.assign({
|
|
3665
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3666
|
-
ref: ref,
|
|
3667
|
-
style: _extends({}, style, {
|
|
3668
|
-
height: parseFloat(style == null ? void 0 : style.height) + 8 * 2 + "px"
|
|
3669
|
-
})
|
|
3670
|
-
}, rest));
|
|
3671
|
-
});
|
|
3672
|
-
return React__default.createElement("div", {
|
|
3673
|
-
style: {
|
|
3674
|
-
height: '450px'
|
|
3675
|
-
}
|
|
3676
|
-
}, React__default.createElement(VirtualizedList, {
|
|
3677
|
-
Item: function Item(_ref2) {
|
|
3678
|
-
var index = _ref2.index,
|
|
3679
|
-
style = _ref2.style;
|
|
3680
|
-
return React__default.createElement(TokenItem, {
|
|
3681
|
-
token: tokens[index],
|
|
3682
|
-
style: style,
|
|
3683
|
-
onClick: changeSelected,
|
|
3684
|
-
selected: isSelected(tokens[index])
|
|
3685
|
-
});
|
|
3686
|
-
},
|
|
3687
|
-
hasNextPage: hasNextPage,
|
|
3688
|
-
itemCount: tokens.length,
|
|
3689
|
-
loadNextPage: loadNextPage,
|
|
3690
|
-
innerElementType: innerElementType,
|
|
3691
|
-
size: 56
|
|
3692
|
-
}));
|
|
3693
|
-
}
|
|
3694
|
-
|
|
3695
|
-
var filterTokens = function filterTokens(list, searchedFor) {
|
|
3696
|
-
return list.filter(function (token) {
|
|
3697
|
-
return containsText(token.symbol, searchedFor) || containsText(token.address || '', searchedFor) || containsText(token.name || '', searchedFor);
|
|
3698
|
-
});
|
|
3699
|
-
};
|
|
3700
|
-
function TokenSelector(props) {
|
|
3701
|
-
var list = props.list,
|
|
3702
|
-
type = props.type,
|
|
3703
|
-
selected = props.selected,
|
|
3704
|
-
onChange = props.onChange,
|
|
3705
|
-
hasHeader = props.hasHeader,
|
|
3706
|
-
multiSelect = props.multiSelect,
|
|
3707
|
-
selectedList = props.selectedList,
|
|
3708
|
-
onBack = props.onBack;
|
|
3709
|
-
return React__default.createElement(SecondaryPage, {
|
|
3710
|
-
textField: true,
|
|
3711
|
-
textFieldPlaceholder: "Search Blockchain By Name",
|
|
3712
|
-
title: "Select " + type + " Token",
|
|
3713
|
-
hasHeader: hasHeader,
|
|
3714
|
-
onBack: onBack
|
|
3715
|
-
}, function (searchedFor) {
|
|
3716
|
-
return React__default.createElement(TokenList, {
|
|
3717
|
-
searchedText: searchedFor,
|
|
3718
|
-
list: filterTokens(list, searchedFor),
|
|
3719
|
-
selected: selected,
|
|
3720
|
-
selectedList: selectedList,
|
|
3721
|
-
multiSelect: multiSelect,
|
|
3722
|
-
onChange: onChange
|
|
3723
|
-
});
|
|
3724
|
-
});
|
|
3725
|
-
}
|
|
3726
|
-
|
|
3727
|
-
var TooltipTrigger = /*#__PURE__*/styled(RadixTooltip.Trigger, {
|
|
3728
|
-
border: 0,
|
|
3729
|
-
padding: 0,
|
|
3730
|
-
backgroundColor: 'transparent'
|
|
3731
|
-
});
|
|
3732
|
-
var TooltipContent = /*#__PURE__*/styled(RadixTooltip.Content, {
|
|
3733
|
-
borderRadius: '$5',
|
|
3734
|
-
padding: '$4 $8',
|
|
3735
|
-
fontSize: '$14',
|
|
3736
|
-
animationDuration: '400ms',
|
|
3737
|
-
animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
|
|
3738
|
-
willChange: 'transform, opacity',
|
|
3739
|
-
variants: {
|
|
3740
|
-
color: {
|
|
3741
|
-
primary: {
|
|
3742
|
-
backgroundColor: '$primary',
|
|
3743
|
-
color: '$white'
|
|
3744
|
-
},
|
|
3745
|
-
error: {
|
|
3746
|
-
backgroundColor: '$error',
|
|
3747
|
-
color: '$white'
|
|
3748
|
-
},
|
|
3749
|
-
warning: {
|
|
3750
|
-
backgroundColor: '$warning',
|
|
3751
|
-
color: '$white'
|
|
3752
|
-
},
|
|
3753
|
-
success: {
|
|
3754
|
-
backgroundColor: '$success',
|
|
3755
|
-
color: '$white'
|
|
3756
|
-
},
|
|
3757
|
-
gray: {
|
|
3758
|
-
backgroundColor: '$neutrals300',
|
|
3759
|
-
color: '$black'
|
|
3760
|
-
},
|
|
3761
|
-
black: {
|
|
3762
|
-
backgroundColor: '$black',
|
|
3763
|
-
color: '$white'
|
|
3764
|
-
},
|
|
3765
|
-
white: {
|
|
3766
|
-
backgroundColor: '$white',
|
|
3767
|
-
color: '$black'
|
|
3768
|
-
}
|
|
3769
|
-
}
|
|
3770
|
-
}
|
|
3771
|
-
});
|
|
3772
|
-
var TooltipArrow = /*#__PURE__*/styled(RadixTooltip.Arrow, {
|
|
3773
|
-
variants: {
|
|
3774
|
-
color: {
|
|
3775
|
-
primary: {
|
|
3776
|
-
fill: '$primary'
|
|
3777
|
-
},
|
|
3778
|
-
error: {
|
|
3779
|
-
fill: '$error'
|
|
3780
|
-
},
|
|
3781
|
-
warning: {
|
|
3782
|
-
fill: '$warning'
|
|
3783
|
-
},
|
|
3784
|
-
success: {
|
|
3785
|
-
fill: '$success'
|
|
3786
|
-
},
|
|
3787
|
-
gray: {
|
|
3788
|
-
fill: '$neutrals300'
|
|
3789
|
-
},
|
|
3790
|
-
black: {
|
|
3791
|
-
fill: '$black'
|
|
3792
|
-
},
|
|
3793
|
-
white: {
|
|
3794
|
-
fill: '$white'
|
|
3795
|
-
}
|
|
3796
|
-
}
|
|
4116
|
+
justifyContent: 'space-between',
|
|
4117
|
+
alignItems: 'center',
|
|
4118
|
+
padding: '$16 0',
|
|
4119
|
+
borderBottom: '1px solid $neutrals300',
|
|
4120
|
+
'& > .info': {
|
|
4121
|
+
display: 'flex',
|
|
4122
|
+
alignItems: 'center'
|
|
4123
|
+
},
|
|
4124
|
+
'.status': {
|
|
4125
|
+
textTransform: 'uppercase',
|
|
4126
|
+
fontWeight: 'bold',
|
|
4127
|
+
fontSize: '$12'
|
|
4128
|
+
},
|
|
4129
|
+
'&.running': {
|
|
4130
|
+
color: '$foreground'
|
|
4131
|
+
},
|
|
4132
|
+
'&.failed,&.success': {
|
|
4133
|
+
color: '$neutrals600'
|
|
4134
|
+
},
|
|
4135
|
+
'&.failed .status': {
|
|
4136
|
+
color: '$error'
|
|
4137
|
+
},
|
|
4138
|
+
'&.success .status': {
|
|
4139
|
+
color: '$success'
|
|
3797
4140
|
}
|
|
3798
4141
|
});
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
var
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
4142
|
+
function SwapDetail(_ref) {
|
|
4143
|
+
var swap = _ref.swap,
|
|
4144
|
+
status = _ref.status,
|
|
4145
|
+
onClick = _ref.onClick;
|
|
4146
|
+
var firstStep = swap.steps[0];
|
|
4147
|
+
var lastStep = swap.steps[swap.steps.length - 1];
|
|
4148
|
+
return React__default.createElement(Button, {
|
|
4149
|
+
variant: "ghost",
|
|
4150
|
+
size: "free",
|
|
4151
|
+
fullWidth: true,
|
|
4152
|
+
onClick: onClick.bind(null, swap.requestId)
|
|
4153
|
+
}, React__default.createElement(Container$4, {
|
|
4154
|
+
className: "" + status
|
|
4155
|
+
}, React__default.createElement("div", {
|
|
4156
|
+
className: "info"
|
|
4157
|
+
}, React__default.createElement(Token, {
|
|
4158
|
+
data: {
|
|
4159
|
+
token: {
|
|
4160
|
+
logo: firstStep.fromLogo,
|
|
4161
|
+
symbol: firstStep.fromSymbol
|
|
4162
|
+
},
|
|
4163
|
+
blockchain: {
|
|
4164
|
+
// @ts-ignore
|
|
4165
|
+
logo: firstStep.fromBlockchainLogo,
|
|
4166
|
+
name: firstStep.fromBlockchain
|
|
4167
|
+
},
|
|
4168
|
+
amount: swap.inputAmount
|
|
4169
|
+
}
|
|
4170
|
+
}), React__default.createElement(Spacer, {
|
|
4171
|
+
size: 12
|
|
4172
|
+
}), React__default.createElement(ArrowRightIcon, {
|
|
4173
|
+
size: 12
|
|
4174
|
+
}), React__default.createElement(Spacer, {
|
|
4175
|
+
size: 12
|
|
4176
|
+
}), React__default.createElement(Token, {
|
|
4177
|
+
data: {
|
|
4178
|
+
token: {
|
|
4179
|
+
logo: lastStep.toLogo,
|
|
4180
|
+
symbol: lastStep.toSymbol
|
|
4181
|
+
},
|
|
4182
|
+
blockchain: {
|
|
4183
|
+
// @ts-ignore
|
|
4184
|
+
logo: lastStep.toBlockchainLogo,
|
|
4185
|
+
name: lastStep.toBlockchain
|
|
4186
|
+
},
|
|
4187
|
+
amount: lastStep.outputAmount || lastStep.expectedOutputAmountHumanReadable || ''
|
|
4188
|
+
}
|
|
4189
|
+
})), React__default.createElement("div", {
|
|
4190
|
+
className: "status"
|
|
4191
|
+
}, status === 'running' ? React__default.createElement(Spinner, {
|
|
4192
|
+
size: 24,
|
|
4193
|
+
color: "primary"
|
|
4194
|
+
}) : status)));
|
|
3818
4195
|
}
|
|
3819
4196
|
|
|
3820
4197
|
var Container$5 = /*#__PURE__*/styled('div', {
|
|
@@ -3988,93 +4365,74 @@ function Drawer(props) {
|
|
|
3988
4365
|
})), React__default.createElement(Body, null, content), React__default.createElement(Footer, null, footer))), container));
|
|
3989
4366
|
}
|
|
3990
4367
|
|
|
3991
|
-
var MainContainer$
|
|
3992
|
-
|
|
3993
|
-
});
|
|
3994
|
-
var Line$2 = /*#__PURE__*/styled('div', {
|
|
3995
|
-
width: '0',
|
|
3996
|
-
marginLeft: '$12',
|
|
3997
|
-
height: '36px',
|
|
3998
|
-
border: '1px dashed $foreground',
|
|
3999
|
-
borderRadius: 'inherit'
|
|
4000
|
-
});
|
|
4001
|
-
var SwapperContainer$1 = /*#__PURE__*/styled('div', {
|
|
4002
|
-
display: 'flex',
|
|
4003
|
-
alignItems: 'center',
|
|
4004
|
-
marginLeft: '6px'
|
|
4005
|
-
});
|
|
4006
|
-
var Fee = /*#__PURE__*/styled('div', {
|
|
4007
|
-
display: 'flex',
|
|
4008
|
-
alignItems: 'center'
|
|
4009
|
-
});
|
|
4010
|
-
var SwapperLogo$1 = /*#__PURE__*/styled('img', {
|
|
4011
|
-
width: '$16',
|
|
4012
|
-
height: '$16'
|
|
4368
|
+
var MainContainer$3 = /*#__PURE__*/styled('div', {
|
|
4369
|
+
overflowY: 'auto'
|
|
4013
4370
|
});
|
|
4014
|
-
var
|
|
4015
|
-
|
|
4371
|
+
var Section = /*#__PURE__*/styled('div', {
|
|
4372
|
+
paddingBottom: '$32',
|
|
4373
|
+
marginBottom: '$32',
|
|
4374
|
+
borderBottom: '1px solid $neutrals400'
|
|
4016
4375
|
});
|
|
4017
4376
|
var Footer$1 = /*#__PURE__*/styled('div', {
|
|
4018
4377
|
display: 'flex',
|
|
4019
4378
|
alignItems: 'center'
|
|
4020
4379
|
});
|
|
4021
|
-
var
|
|
4022
|
-
|
|
4023
|
-
height: '$8',
|
|
4024
|
-
backgroundColor: '$foreground',
|
|
4025
|
-
borderRadius: '4px',
|
|
4026
|
-
marginLeft: '$8'
|
|
4027
|
-
});
|
|
4028
|
-
var ArrowDown = /*#__PURE__*/styled('div', {
|
|
4029
|
-
width: '0px',
|
|
4030
|
-
height: '0px',
|
|
4031
|
-
borderLeft: '5px solid transparent',
|
|
4032
|
-
borderRight: '5px solid transparent',
|
|
4033
|
-
borderTop: '5px solid $foreground',
|
|
4034
|
-
marginLeft: '$8'
|
|
4035
|
-
});
|
|
4036
|
-
var UpdateIcon = /*#__PURE__*/styled(RetryIcon, {
|
|
4037
|
-
position: 'absolute',
|
|
4038
|
-
right: '0'
|
|
4380
|
+
var AlertContainer = /*#__PURE__*/styled('div', {
|
|
4381
|
+
padding: '$16 0'
|
|
4039
4382
|
});
|
|
4040
|
-
var
|
|
4041
|
-
|
|
4383
|
+
var ConfirmButton = /*#__PURE__*/styled(Button, {
|
|
4384
|
+
marginTop: '$16'
|
|
4042
4385
|
});
|
|
4043
|
-
var
|
|
4044
|
-
|
|
4386
|
+
var Container$6 = /*#__PURE__*/styled('div', {
|
|
4387
|
+
paddingBottom: '$24',
|
|
4388
|
+
'.title': {
|
|
4389
|
+
paddingBottom: '$8',
|
|
4390
|
+
display: 'flex',
|
|
4391
|
+
alignItems: 'center'
|
|
4392
|
+
},
|
|
4393
|
+
'.num': {
|
|
4394
|
+
backgroundColor: '$neutrals300',
|
|
4395
|
+
display: 'inline-flex',
|
|
4396
|
+
width: '24px',
|
|
4397
|
+
height: '24px',
|
|
4398
|
+
color: '$neutrals800',
|
|
4399
|
+
borderRadius: '50%',
|
|
4400
|
+
fontSize: '$14',
|
|
4401
|
+
border: '1px solid $neutrals400',
|
|
4402
|
+
justifyContent: 'center',
|
|
4403
|
+
alignItems: 'center'
|
|
4404
|
+
}
|
|
4045
4405
|
});
|
|
4046
4406
|
var Alerts = /*#__PURE__*/styled('div', {
|
|
4047
4407
|
paddingBottom: '$16'
|
|
4048
4408
|
});
|
|
4049
4409
|
function ConfirmSwap(props) {
|
|
4050
|
-
var
|
|
4051
|
-
var bestRoute = props.bestRoute,
|
|
4052
|
-
onRefresh = props.onRefresh,
|
|
4053
|
-
onBack = props.onBack,
|
|
4054
|
-
onConfirm = props.onConfirm,
|
|
4410
|
+
var onBack = props.onBack,
|
|
4055
4411
|
loading = props.loading,
|
|
4412
|
+
onConfirm = props.onConfirm,
|
|
4413
|
+
requiredWallets = props.requiredWallets,
|
|
4414
|
+
selectableWallets = props.selectableWallets,
|
|
4415
|
+
onChange = props.onChange,
|
|
4416
|
+
confirmDisabled = props.confirmDisabled,
|
|
4417
|
+
isExperimentalChain = props.isExperimentalChain,
|
|
4418
|
+
handleConnectChain = props.handleConnectChain,
|
|
4419
|
+
confirmButtonTitle = props.confirmButtonTitle,
|
|
4056
4420
|
errors = props.errors,
|
|
4057
4421
|
warnings = props.warnings,
|
|
4058
|
-
extraMessages = props.extraMessages
|
|
4059
|
-
confirmButtonTitle = props.confirmButtonTitle,
|
|
4060
|
-
confirmButtonDisabled = props.confirmButtonDisabled;
|
|
4422
|
+
extraMessages = props.extraMessages;
|
|
4061
4423
|
return React__default.createElement(SecondaryPage, {
|
|
4062
4424
|
textField: false,
|
|
4063
|
-
title: "Swap",
|
|
4425
|
+
title: "Confirm Swap",
|
|
4064
4426
|
onBack: onBack,
|
|
4065
|
-
Footer: React__default.createElement(Footer$1, null, React__default.createElement(
|
|
4066
|
-
type: "primary",
|
|
4427
|
+
Footer: React__default.createElement(Footer$1, null, React__default.createElement(ConfirmButton, {
|
|
4067
4428
|
fullWidth: true,
|
|
4068
4429
|
loading: loading,
|
|
4430
|
+
type: "primary",
|
|
4069
4431
|
variant: "contained",
|
|
4070
4432
|
onClick: onConfirm,
|
|
4071
|
-
disabled:
|
|
4072
|
-
}, confirmButtonTitle))
|
|
4073
|
-
|
|
4074
|
-
size: 24,
|
|
4075
|
-
onClick: onRefresh
|
|
4076
|
-
})
|
|
4077
|
-
}, React__default.createElement(MainContainer$2, null, React__default.createElement("div", null, extraMessages || null, React__default.createElement(Alerts, null, errors == null ? void 0 : errors.map(function (error, index) {
|
|
4433
|
+
disabled: confirmDisabled
|
|
4434
|
+
}, confirmButtonTitle))
|
|
4435
|
+
}, React__default.createElement(MainContainer$3, null, React__default.createElement("div", null, extraMessages || null, React__default.createElement(Alerts, null, errors == null ? void 0 : errors.map(function (error, index) {
|
|
4078
4436
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4079
4437
|
direction: "vertical"
|
|
4080
4438
|
}), React__default.createElement(Alert, {
|
|
@@ -4088,91 +4446,26 @@ function ConfirmSwap(props) {
|
|
|
4088
4446
|
type: "warning",
|
|
4089
4447
|
key: index
|
|
4090
4448
|
}, warning));
|
|
4091
|
-
}))), React__default.createElement(
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
}, index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
|
|
4096
|
-
logo: swap.from.logo,
|
|
4097
|
-
symbol: swap.from.symbol,
|
|
4098
|
-
chainLogo: swap.from.blockchainLogo,
|
|
4099
|
-
blockchain: swap.from.blockchain,
|
|
4100
|
-
amount: swap.fromAmount
|
|
4101
|
-
}), React__default.createElement(Dot$2, null)), React__default.createElement(Line$2, null), React__default.createElement(SwapperContainer$1, null, React__default.createElement(SwapperLogo$1, {
|
|
4102
|
-
src: swap.swapperLogo,
|
|
4103
|
-
alt: swap.swapperId
|
|
4104
|
-
}), React__default.createElement("div", null, React__default.createElement(Typography, {
|
|
4105
|
-
ml: 4,
|
|
4106
|
-
variant: "caption"
|
|
4107
|
-
}, swap.swapperType, " from ", swap.from.symbol, " to", ' ', swap.to.symbol, " via ", swap.swapperId, ' '), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
|
|
4108
|
-
ml: 4,
|
|
4109
|
-
variant: "caption"
|
|
4110
|
-
}, "$", swap.feeInUsd, " estimated gas fee")))), React__default.createElement(Line$2, null), index + 1 === ((_bestRoute$result2 = bestRoute.result) == null ? void 0 : _bestRoute$result2.swaps.length) && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
|
|
4111
|
-
logo: swap.to.logo,
|
|
4112
|
-
symbol: swap.to.symbol,
|
|
4113
|
-
chainLogo: swap.to.blockchainLogo,
|
|
4114
|
-
blockchain: swap.to.blockchain,
|
|
4115
|
-
amount: swap.toAmount
|
|
4116
|
-
}));
|
|
4117
|
-
}))));
|
|
4118
|
-
}
|
|
4119
|
-
|
|
4120
|
-
var Footer$2 = /*#__PURE__*/styled('div', {
|
|
4121
|
-
display: 'flex',
|
|
4122
|
-
alignItems: 'center'
|
|
4123
|
-
});
|
|
4124
|
-
var AlertContainer = /*#__PURE__*/styled('div', {
|
|
4125
|
-
padding: '$16 0'
|
|
4126
|
-
});
|
|
4127
|
-
var ConfirmButton = /*#__PURE__*/styled(Button, {
|
|
4128
|
-
marginTop: '$16'
|
|
4129
|
-
});
|
|
4130
|
-
function ConfirmWallets(props) {
|
|
4131
|
-
var _swap$result, _swap$result2, _swap$result3;
|
|
4132
|
-
var onBack = props.onBack,
|
|
4133
|
-
loading = props.loading,
|
|
4134
|
-
onConfirm = props.onConfirm,
|
|
4135
|
-
swap = props.swap,
|
|
4136
|
-
requiredWallets = props.requiredWallets,
|
|
4137
|
-
selectableWallets = props.selectableWallets,
|
|
4138
|
-
onChange = props.onChange,
|
|
4139
|
-
confirmDisabled = props.confirmDisabled,
|
|
4140
|
-
isExperimentalChain = props.isExperimentalChain,
|
|
4141
|
-
handleConnectChain = props.handleConnectChain,
|
|
4142
|
-
fromAmount = props.fromAmount,
|
|
4143
|
-
toAmount = props.toAmount;
|
|
4144
|
-
var firstStep = swap == null ? void 0 : (_swap$result = swap.result) == null ? void 0 : _swap$result.swaps[0];
|
|
4145
|
-
var lastStep = swap == null ? void 0 : (_swap$result2 = swap.result) == null ? void 0 : _swap$result2.swaps[((_swap$result3 = swap.result) == null ? void 0 : _swap$result3.swaps.length) - 1];
|
|
4146
|
-
return React__default.createElement(SecondaryPage, {
|
|
4147
|
-
textField: false,
|
|
4148
|
-
title: "Confirm Swap",
|
|
4149
|
-
onBack: onBack,
|
|
4150
|
-
Footer: React__default.createElement(Footer$2, null, React__default.createElement(ConfirmButton, {
|
|
4151
|
-
fullWidth: true,
|
|
4152
|
-
loading: loading,
|
|
4153
|
-
type: "primary",
|
|
4154
|
-
variant: "contained",
|
|
4155
|
-
onClick: onConfirm,
|
|
4156
|
-
disabled: confirmDisabled
|
|
4157
|
-
}, "Confirm"))
|
|
4158
|
-
}, React__default.createElement(React__default.Fragment, null, React__default.createElement(Typography, {
|
|
4159
|
-
variant: "h6",
|
|
4160
|
-
mb: 12
|
|
4161
|
-
}, "Confirm swap ", fromAmount, " ", firstStep == null ? void 0 : firstStep.from.symbol, " (", firstStep == null ? void 0 : firstStep.from.blockchain, ") to ", toAmount, " ", lastStep == null ? void 0 : lastStep.to.symbol, " (on", lastStep == null ? void 0 : lastStep.to.blockchain, ")"), requiredWallets.map(function (wallet, index) {
|
|
4449
|
+
}))), props.previewInputs || props.previewRoutes ? React__default.createElement(Section, null, props.previewInputs, !!props.previewRoutes ? React__default.createElement(Spacer, {
|
|
4450
|
+
size: 16,
|
|
4451
|
+
direction: "vertical"
|
|
4452
|
+
}) : null, props.previewRoutes) : null, requiredWallets.map(function (wallet, index) {
|
|
4162
4453
|
var list = selectableWallets.filter(function (w) {
|
|
4163
4454
|
return wallet === w.chain;
|
|
4164
4455
|
});
|
|
4165
|
-
return React__default.createElement(
|
|
4456
|
+
return React__default.createElement(Container$6, {
|
|
4166
4457
|
key: index
|
|
4167
|
-
}, React__default.createElement(
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
}, index + 1
|
|
4172
|
-
|
|
4173
|
-
}, React__default.createElement(Typography, {
|
|
4458
|
+
}, React__default.createElement("div", {
|
|
4459
|
+
className: "title"
|
|
4460
|
+
}, React__default.createElement("div", {
|
|
4461
|
+
className: "num"
|
|
4462
|
+
}, index + 1), React__default.createElement(Spacer, {
|
|
4463
|
+
size: 8
|
|
4464
|
+
}), React__default.createElement(Typography, {
|
|
4174
4465
|
variant: "body2"
|
|
4175
|
-
}, "
|
|
4466
|
+
}, "Your ", wallet, " Wallet")), list.length === 0 && React__default.createElement(React__default.Fragment, null, React__default.createElement(AlertContainer, null, React__default.createElement(Alert, {
|
|
4467
|
+
type: "error"
|
|
4468
|
+
}, "You need to connect a compatible wallet with ", wallet)), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
|
|
4176
4469
|
variant: "contained",
|
|
4177
4470
|
type: "primary",
|
|
4178
4471
|
align: "grow",
|
|
@@ -4186,31 +4479,13 @@ function ConfirmWallets(props) {
|
|
|
4186
4479
|
})));
|
|
4187
4480
|
}
|
|
4188
4481
|
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
});
|
|
4194
|
-
if (categoryIndex > -1) {
|
|
4195
|
-
acc[categoryIndex].swaps.push(swap);
|
|
4196
|
-
} else {
|
|
4197
|
-
acc.push({
|
|
4198
|
-
title: swap.status === 'running' ? 'Active Swaps' : 'Recent Swaps',
|
|
4199
|
-
swaps: [swap]
|
|
4200
|
-
});
|
|
4201
|
-
}
|
|
4202
|
-
return acc;
|
|
4203
|
-
}, []);
|
|
4204
|
-
}
|
|
4205
|
-
|
|
4206
|
-
var BodyError = /*#__PURE__*/styled('div', {
|
|
4207
|
-
height: '100%',
|
|
4208
|
-
display: 'flex',
|
|
4209
|
-
justifyContent: 'center',
|
|
4210
|
-
alignItems: 'center'
|
|
4482
|
+
var Group = /*#__PURE__*/styled('div', {
|
|
4483
|
+
'.group-title': {
|
|
4484
|
+
textTransform: 'uppercase'
|
|
4485
|
+
}
|
|
4211
4486
|
});
|
|
4212
|
-
var
|
|
4213
|
-
|
|
4487
|
+
var Container$7 = /*#__PURE__*/styled('div', {
|
|
4488
|
+
overflowY: 'auto'
|
|
4214
4489
|
});
|
|
4215
4490
|
var filteredHistory = function filteredHistory(list, searchedFor) {
|
|
4216
4491
|
return list.filter(function (swap) {
|
|
@@ -4219,30 +4494,34 @@ var filteredHistory = function filteredHistory(list, searchedFor) {
|
|
|
4219
4494
|
return containsText(firstStep.fromBlockchain, searchedFor) || containsText(firstStep.fromSymbol, searchedFor) || containsText(lastStep.toBlockchain, searchedFor) || containsText(lastStep.toSymbol, searchedFor) || containsText(swap.requestId, searchedFor);
|
|
4220
4495
|
});
|
|
4221
4496
|
};
|
|
4222
|
-
var Group = /*#__PURE__*/styled('div', {
|
|
4223
|
-
marginBottom: '$24',
|
|
4224
|
-
paddingRight: '$8',
|
|
4225
|
-
maxHeight: '600px'
|
|
4226
|
-
});
|
|
4227
|
-
var GroupTitle = /*#__PURE__*/styled(Typography, {
|
|
4228
|
-
color: '$neutrals500'
|
|
4229
|
-
});
|
|
4230
4497
|
var SwapsGroup = function SwapsGroup(props) {
|
|
4231
4498
|
var list = props.list,
|
|
4232
|
-
onSwapClick = props.onSwapClick
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4499
|
+
onSwapClick = props.onSwapClick,
|
|
4500
|
+
groupBy = props.groupBy;
|
|
4501
|
+
var groups = groupBy ? groupBy(list) : [{
|
|
4502
|
+
title: 'History',
|
|
4503
|
+
swaps: list
|
|
4504
|
+
}];
|
|
4505
|
+
return React__default.createElement(React__default.Fragment, null, groups.filter(function (group) {
|
|
4506
|
+
return group.swaps.length > 0;
|
|
4507
|
+
}).map(function (group, index) {
|
|
4508
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Group, {
|
|
4236
4509
|
key: index
|
|
4237
|
-
}, React__default.createElement(
|
|
4238
|
-
variant: "body2"
|
|
4510
|
+
}, React__default.createElement(Typography, {
|
|
4511
|
+
variant: "body2",
|
|
4512
|
+
color: "neutrals600",
|
|
4513
|
+
className: "group-title"
|
|
4239
4514
|
}, group.title), group.swaps.map(function (swap, index) {
|
|
4240
|
-
return React__default.createElement(SwapDetail, {
|
|
4515
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(SwapDetail, {
|
|
4241
4516
|
key: index,
|
|
4242
4517
|
swap: swap,
|
|
4243
4518
|
status: swap.status,
|
|
4244
4519
|
onClick: onSwapClick
|
|
4245
|
-
})
|
|
4520
|
+
}), React__default.createElement(Divider, {
|
|
4521
|
+
size: 12
|
|
4522
|
+
}));
|
|
4523
|
+
})), React__default.createElement(Divider, {
|
|
4524
|
+
size: 24
|
|
4246
4525
|
}));
|
|
4247
4526
|
}));
|
|
4248
4527
|
};
|
|
@@ -4250,28 +4529,126 @@ function History(_ref) {
|
|
|
4250
4529
|
var _ref$list = _ref.list,
|
|
4251
4530
|
list = _ref$list === void 0 ? [] : _ref$list,
|
|
4252
4531
|
onBack = _ref.onBack,
|
|
4253
|
-
onSwapClick = _ref.onSwapClick
|
|
4532
|
+
onSwapClick = _ref.onSwapClick,
|
|
4533
|
+
groupBy = _ref.groupBy;
|
|
4254
4534
|
return React__default.createElement(SecondaryPage, {
|
|
4255
4535
|
onBack: onBack,
|
|
4256
4536
|
textField: true,
|
|
4257
|
-
textFieldPlaceholder: "Search By Blockchain Or Token",
|
|
4537
|
+
textFieldPlaceholder: "Search By Blockchain Or Token Or Request ID",
|
|
4258
4538
|
title: "Swaps"
|
|
4259
4539
|
}, function (searchedFor) {
|
|
4260
4540
|
var filterSwaps = filteredHistory(list, searchedFor);
|
|
4261
|
-
return filterSwaps.length ? React__default.createElement(SwapsGroup, {
|
|
4541
|
+
return React__default.createElement(Container$7, null, filterSwaps.length ? React__default.createElement(SwapsGroup, {
|
|
4262
4542
|
list: filterSwaps,
|
|
4263
|
-
onSwapClick: onSwapClick
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4543
|
+
onSwapClick: onSwapClick,
|
|
4544
|
+
groupBy: groupBy
|
|
4545
|
+
}) : React__default.createElement(NotFoundAlert, {
|
|
4546
|
+
catergory: "Swap"
|
|
4547
|
+
}));
|
|
4267
4548
|
});
|
|
4268
4549
|
}
|
|
4269
4550
|
|
|
4551
|
+
var getAlertType = function getAlertType(messageType) {
|
|
4552
|
+
if (!messageType || messageType === 'info') return 'secondary';else return messageType;
|
|
4553
|
+
};
|
|
4554
|
+
var DetailedMessage = /*#__PURE__*/styled('div', {
|
|
4555
|
+
width: '90%',
|
|
4556
|
+
overflowWrap: 'break-word',
|
|
4557
|
+
color: '$error500 !important'
|
|
4558
|
+
});
|
|
4559
|
+
var SuccessText = /*#__PURE__*/styled(Typography, {
|
|
4560
|
+
color: '$success500 !important'
|
|
4561
|
+
});
|
|
4562
|
+
var SwapMessages = function SwapMessages(props) {
|
|
4563
|
+
var shortMessage = props.shortMessage,
|
|
4564
|
+
detailedMessage = props.detailedMessage,
|
|
4565
|
+
currentStepBlockchain = props.currentStepBlockchain,
|
|
4566
|
+
type = props.type,
|
|
4567
|
+
lastConvertedTokenInFailedSwap = props.lastConvertedTokenInFailedSwap;
|
|
4568
|
+
var _useState = React.useState(false),
|
|
4569
|
+
expandedMessage = _useState[0],
|
|
4570
|
+
setExpandedMessage = _useState[1];
|
|
4571
|
+
var allowedNumberOfChars = detailedMessage["long"] ? 0 : 150;
|
|
4572
|
+
var shouldShowMoreDetailsButton = !expandedMessage && detailedMessage.content.length > allowedNumberOfChars;
|
|
4573
|
+
return React__default.createElement(Alert, Object.assign({
|
|
4574
|
+
type: getAlertType(type),
|
|
4575
|
+
title: shortMessage
|
|
4576
|
+
}, shouldShowMoreDetailsButton && {
|
|
4577
|
+
footer: React__default.createElement(Button, {
|
|
4578
|
+
variant: "outlined",
|
|
4579
|
+
type: "primary",
|
|
4580
|
+
onClick: setExpandedMessage.bind(null, function (prevState) {
|
|
4581
|
+
return !prevState;
|
|
4582
|
+
})
|
|
4583
|
+
}, "Show more details")
|
|
4584
|
+
}, !!props.switchNetwork && {
|
|
4585
|
+
footer: React__default.createElement(Button, {
|
|
4586
|
+
variant: 'outlined',
|
|
4587
|
+
type: "primary",
|
|
4588
|
+
onClick: props.switchNetwork
|
|
4589
|
+
}, "Change network to ", currentStepBlockchain)
|
|
4590
|
+
}), !!detailedMessage.content ? React__default.createElement(DetailedMessage, null, React__default.createElement(Typography, {
|
|
4591
|
+
variant: "body2"
|
|
4592
|
+
}, shouldShowMoreDetailsButton && !expandedMessage ? detailedMessage.content.substring(0, allowedNumberOfChars) + (allowedNumberOfChars > 0 ? '...' : '') : detailedMessage.content)) : null, !!lastConvertedTokenInFailedSwap && React__default.createElement(React__default.Fragment, null, React__default.createElement("p", null, React__default.createElement(Typography, {
|
|
4593
|
+
variant: "body2"
|
|
4594
|
+
}, "Don't worry, your fund is\xA0"), React__default.createElement(SuccessText, {
|
|
4595
|
+
variant: "body2"
|
|
4596
|
+
}, React__default.createElement("b", null, "Safe"))), React__default.createElement("p", null, React__default.createElement(Typography, {
|
|
4597
|
+
variant: "body2"
|
|
4598
|
+
}, "It is converted to \xA0", React__default.createElement("u", null, lastConvertedTokenInFailedSwap.outputAmount), "\xA0"), React__default.createElement(SuccessText, {
|
|
4599
|
+
variant: "body2"
|
|
4600
|
+
}, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.symbol, "\xA0")), React__default.createElement(Typography, {
|
|
4601
|
+
variant: "body2"
|
|
4602
|
+
}, "on your\xA0"), React__default.createElement(SuccessText, {
|
|
4603
|
+
variant: "body2"
|
|
4604
|
+
}, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.blockchain, "\xA0")), React__default.createElement(Typography, {
|
|
4605
|
+
variant: "body2"
|
|
4606
|
+
}, "wallet"))));
|
|
4607
|
+
};
|
|
4608
|
+
|
|
4609
|
+
var _excluded$I = ["pendingSwap", "onBack", "onCopy", "isCopied", "onCancel", "date", "onRetry", "previewInputs"];
|
|
4610
|
+
var SwapperContainer$1 = /*#__PURE__*/styled('div', {
|
|
4611
|
+
display: 'flex',
|
|
4612
|
+
alignItems: 'center',
|
|
4613
|
+
marginLeft: '6px'
|
|
4614
|
+
});
|
|
4615
|
+
var Fee = /*#__PURE__*/styled('div', {
|
|
4616
|
+
display: 'flex',
|
|
4617
|
+
alignItems: 'center'
|
|
4618
|
+
});
|
|
4619
|
+
var SwapperLogo$1 = /*#__PURE__*/styled('img', {
|
|
4620
|
+
width: '$16',
|
|
4621
|
+
height: '$16'
|
|
4622
|
+
});
|
|
4623
|
+
var RelativeContainer$1 = /*#__PURE__*/styled('div', {
|
|
4624
|
+
position: 'relative'
|
|
4625
|
+
});
|
|
4626
|
+
var Dot$1 = /*#__PURE__*/styled('div', {
|
|
4627
|
+
width: '$8',
|
|
4628
|
+
height: '$8',
|
|
4629
|
+
backgroundColor: '$foreground',
|
|
4630
|
+
borderRadius: '4px',
|
|
4631
|
+
marginLeft: '$8'
|
|
4632
|
+
});
|
|
4633
|
+
var ArrowDown = /*#__PURE__*/styled('div', {
|
|
4634
|
+
width: '0px',
|
|
4635
|
+
height: '0px',
|
|
4636
|
+
borderLeft: '5px solid transparent',
|
|
4637
|
+
borderRight: '5px solid transparent',
|
|
4638
|
+
borderTop: '5px solid $foreground',
|
|
4639
|
+
marginLeft: '$8'
|
|
4640
|
+
});
|
|
4270
4641
|
var StyledAnchor = /*#__PURE__*/styled('a', {
|
|
4271
4642
|
color: '$primary',
|
|
4272
4643
|
fontWeight: '$600',
|
|
4273
4644
|
marginLeft: '$12'
|
|
4274
4645
|
});
|
|
4646
|
+
var SwapInfoContainer = /*#__PURE__*/styled('div', {
|
|
4647
|
+
display: 'flex',
|
|
4648
|
+
flexDirection: 'column',
|
|
4649
|
+
paddingBottom: '$16',
|
|
4650
|
+
borderBottom: '1px solid $neutrals300'
|
|
4651
|
+
});
|
|
4275
4652
|
var InternalDetailsContainer = /*#__PURE__*/styled('div', {
|
|
4276
4653
|
display: 'flex'
|
|
4277
4654
|
});
|
|
@@ -4290,30 +4667,51 @@ var Description = /*#__PURE__*/styled(Typography, {
|
|
|
4290
4667
|
var Error = /*#__PURE__*/styled(Description, {
|
|
4291
4668
|
color: '$error'
|
|
4292
4669
|
});
|
|
4293
|
-
var Line$
|
|
4670
|
+
var Line$1 = /*#__PURE__*/styled('div', {
|
|
4294
4671
|
width: '0',
|
|
4295
4672
|
minHeight: '$16',
|
|
4296
4673
|
marginLeft: '$12',
|
|
4297
4674
|
border: '1px dashed $foreground',
|
|
4298
4675
|
borderRadius: 'inherit'
|
|
4299
4676
|
});
|
|
4300
|
-
var
|
|
4301
|
-
cursor: 'pointer',
|
|
4302
|
-
backgroundColor: '$neutrals200',
|
|
4303
|
-
padding: '$4',
|
|
4677
|
+
var Row$2 = /*#__PURE__*/styled('div', {
|
|
4304
4678
|
display: 'flex',
|
|
4305
|
-
justifyContent: '
|
|
4679
|
+
justifyContent: 'space-between',
|
|
4306
4680
|
alignItems: 'center',
|
|
4307
|
-
|
|
4308
|
-
|
|
4681
|
+
fontSize: '$14',
|
|
4682
|
+
padding: '$8 0',
|
|
4683
|
+
'.name': {
|
|
4684
|
+
color: '$neutrals600'
|
|
4685
|
+
},
|
|
4686
|
+
'.value': {
|
|
4687
|
+
display: 'flex',
|
|
4688
|
+
alignItems: 'center',
|
|
4689
|
+
color: '$neutrals800'
|
|
4690
|
+
},
|
|
4691
|
+
'.status': {
|
|
4692
|
+
fontWeight: 'bold',
|
|
4693
|
+
textTransform: 'uppercase'
|
|
4694
|
+
},
|
|
4695
|
+
'.status.failed': {
|
|
4696
|
+
color: '$error'
|
|
4697
|
+
},
|
|
4698
|
+
'.status.success': {
|
|
4699
|
+
color: '$success'
|
|
4700
|
+
}
|
|
4309
4701
|
});
|
|
4310
|
-
var RequestId = /*#__PURE__*/styled(
|
|
4311
|
-
|
|
4702
|
+
var RequestId = /*#__PURE__*/styled('div', {
|
|
4703
|
+
width: '150px',
|
|
4704
|
+
whiteSpace: 'nowrap',
|
|
4705
|
+
overflow: 'hidden',
|
|
4706
|
+
textOverflow: 'ellipsis',
|
|
4707
|
+
'@md': {
|
|
4708
|
+
width: 'auto'
|
|
4709
|
+
}
|
|
4312
4710
|
});
|
|
4313
|
-
var
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4711
|
+
var ExtraDetails = /*#__PURE__*/styled('div', {
|
|
4712
|
+
padding: '$8 0',
|
|
4713
|
+
color: '$neutrals600',
|
|
4714
|
+
fontSize: '$12'
|
|
4317
4715
|
});
|
|
4318
4716
|
var StepContainer$1 = /*#__PURE__*/styled('div', {
|
|
4319
4717
|
variants: {
|
|
@@ -4329,43 +4727,57 @@ var StepContainer$1 = /*#__PURE__*/styled('div', {
|
|
|
4329
4727
|
}
|
|
4330
4728
|
}
|
|
4331
4729
|
});
|
|
4730
|
+
var SwapFlowContainer = /*#__PURE__*/styled('div', {
|
|
4731
|
+
overflowY: 'auto'
|
|
4732
|
+
});
|
|
4332
4733
|
function SwapHistory(props) {
|
|
4333
4734
|
var pendingSwap = props.pendingSwap,
|
|
4334
4735
|
onBack = props.onBack,
|
|
4335
4736
|
onCopy = props.onCopy,
|
|
4336
4737
|
isCopied = props.isCopied,
|
|
4337
|
-
onCancel = props.onCancel
|
|
4738
|
+
onCancel = props.onCancel,
|
|
4739
|
+
date = props.date,
|
|
4740
|
+
onRetry = props.onRetry,
|
|
4741
|
+
extraMessageProps = _objectWithoutPropertiesLoose(props, _excluded$I);
|
|
4338
4742
|
var _useState = React.useState(false),
|
|
4339
4743
|
showDrawer = _useState[0],
|
|
4340
4744
|
setShowDrawer = _useState[1];
|
|
4341
4745
|
return React__default.createElement(SecondaryPage, {
|
|
4342
4746
|
title: "Swap Details",
|
|
4343
4747
|
textField: false,
|
|
4344
|
-
onBack: onBack
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4748
|
+
onBack: onBack,
|
|
4749
|
+
Footer: React__default.createElement(React__default.Fragment, null, (pendingSwap == null ? void 0 : pendingSwap.status) === 'running' && React__default.createElement(Button, {
|
|
4750
|
+
variant: "outlined",
|
|
4751
|
+
fullWidth: true,
|
|
4752
|
+
type: "error",
|
|
4753
|
+
onClick: setShowDrawer.bind(null, true)
|
|
4754
|
+
}, "Cancel"), !!onRetry && React__default.createElement(Button, {
|
|
4755
|
+
variant: "contained",
|
|
4756
|
+
fullWidth: true,
|
|
4757
|
+
type: "primary",
|
|
4758
|
+
onClick: onRetry
|
|
4759
|
+
}, "Try again"))
|
|
4760
|
+
}, React__default.createElement("div", null, React__default.createElement(SwapInfoContainer, null, React__default.createElement(Row$2, null, React__default.createElement("div", {
|
|
4761
|
+
className: "name"
|
|
4762
|
+
}, "Request ID:"), React__default.createElement("div", {
|
|
4763
|
+
className: "value requestId",
|
|
4352
4764
|
onClick: onCopy.bind(null, pendingSwap == null ? void 0 : pendingSwap.requestId)
|
|
4353
|
-
}, React__default.createElement(RequestId, {
|
|
4354
|
-
|
|
4355
|
-
}
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
}
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
}, pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
|
|
4765
|
+
}, React__default.createElement(RequestId, null, pendingSwap == null ? void 0 : pendingSwap.requestId), React__default.createElement(Spacer, {
|
|
4766
|
+
size: 4
|
|
4767
|
+
}), React__default.createElement(Button, {
|
|
4768
|
+
type: "primary",
|
|
4769
|
+
variant: "ghost",
|
|
4770
|
+
size: "compact"
|
|
4771
|
+
}, isCopied ? 'Copied!' : 'Copy'))), React__default.createElement(Row$2, null, React__default.createElement("div", {
|
|
4772
|
+
className: "name"
|
|
4773
|
+
}, "Status:"), React__default.createElement("div", {
|
|
4774
|
+
className: "value status " + ((pendingSwap == null ? void 0 : pendingSwap.status) || '')
|
|
4775
|
+
}, pendingSwap == null ? void 0 : pendingSwap.status, (pendingSwap == null ? void 0 : pendingSwap.status) === 'running' && React__default.createElement(Spinner, {
|
|
4776
|
+
size: 16,
|
|
4777
|
+
color: "primary"
|
|
4778
|
+
}))), React__default.createElement(ExtraDetails, null, date))), React__default.createElement(SwapFlowContainer, null, extraMessageProps.shortMessage && React__default.createElement(SwapMessages, Object.assign({}, extraMessageProps)), React__default.createElement(Divider, {
|
|
4779
|
+
size: 32
|
|
4780
|
+
}), pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
|
|
4369
4781
|
return React__default.createElement(StepContainer$1, {
|
|
4370
4782
|
key: index,
|
|
4371
4783
|
hasNotStarted: step.status === 'created',
|
|
@@ -4373,23 +4785,31 @@ function SwapHistory(props) {
|
|
|
4373
4785
|
}, index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
|
|
4374
4786
|
logo: step.fromLogo,
|
|
4375
4787
|
symbol: step.fromSymbol,
|
|
4788
|
+
// @ts-ignore
|
|
4376
4789
|
chainLogo: step.fromBlockchainLogo,
|
|
4377
4790
|
blockchain: step.fromBlockchain,
|
|
4378
4791
|
amount: pendingSwap.inputAmount
|
|
4379
|
-
}), React__default.createElement(Dot$
|
|
4792
|
+
}), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1, null, React__default.createElement(SwapperLogo$1
|
|
4793
|
+
// @ts-ignore
|
|
4794
|
+
, {
|
|
4795
|
+
// @ts-ignore
|
|
4380
4796
|
src: step.swapperLogo,
|
|
4381
4797
|
alt: step.swapperId
|
|
4382
4798
|
}), React__default.createElement("div", null, React__default.createElement(Typography, {
|
|
4383
4799
|
ml: 4,
|
|
4384
4800
|
variant: "caption"
|
|
4385
|
-
},
|
|
4801
|
+
},
|
|
4802
|
+
// @ts-ignore
|
|
4803
|
+
step.swapperType, ' ', "from ", step.fromSymbol, " to ", step.toSymbol, "via ", step.swapperId), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
|
|
4386
4804
|
ml: 4,
|
|
4387
4805
|
variant: "caption"
|
|
4388
|
-
}, "$",
|
|
4806
|
+
}, "$",
|
|
4807
|
+
// @ts-ignore
|
|
4808
|
+
step.feeInUsd, ' ', "estimated gas fee")))), React__default.createElement("div", {
|
|
4389
4809
|
style: {
|
|
4390
4810
|
display: 'flex'
|
|
4391
4811
|
}
|
|
4392
|
-
}, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$
|
|
4812
|
+
}, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
|
|
4393
4813
|
return React__default.createElement(InternalDetail, {
|
|
4394
4814
|
key: index
|
|
4395
4815
|
}, React__default.createElement(DescriptionContainer, null, React__default.createElement(CheckCircleIcon, {
|
|
@@ -4409,28 +4829,25 @@ function SwapHistory(props) {
|
|
|
4409
4829
|
}, "Step failed")))))), index + 1 === pendingSwap.steps.length && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
|
|
4410
4830
|
logo: step.toLogo,
|
|
4411
4831
|
symbol: step.toSymbol,
|
|
4832
|
+
// @ts-ignore
|
|
4412
4833
|
chainLogo: step.toBlockchainLogo,
|
|
4413
4834
|
blockchain: step.toBlockchain,
|
|
4414
|
-
amount: step.outputAmount
|
|
4835
|
+
amount: step.outputAmount || ''
|
|
4415
4836
|
}));
|
|
4416
|
-
}),
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
onClick: setShowDrawer.bind(null, true)
|
|
4420
|
-
}, "Cancel")))), React__default.createElement(Drawer, {
|
|
4837
|
+
}), React__default.createElement(Divider, {
|
|
4838
|
+
size: 32
|
|
4839
|
+
})), React__default.createElement(Drawer, {
|
|
4421
4840
|
onClose: setShowDrawer.bind(null, false),
|
|
4422
4841
|
open: showDrawer,
|
|
4423
4842
|
showClose: true,
|
|
4424
4843
|
anchor: "bottom",
|
|
4425
4844
|
title: "Cancel Progress",
|
|
4426
|
-
content: React__default.createElement(
|
|
4845
|
+
content: React__default.createElement(Alert, {
|
|
4427
4846
|
type: "warning"
|
|
4428
|
-
}, React__default.createElement(
|
|
4429
|
-
variant: "body2"
|
|
4430
|
-
}, React__default.createElement("p", null, "Warning: Rango ", React__default.createElement("u", null, "neither reverts"), " your transaction", React__default.createElement("u", null, "nor refunds"), " you if you've already signed and sent a transaction to the blockchain since it's out of Rango's control. Beware that \"Cancel\" only stops next steps from being executed."), React__default.createElement(Spacer, {
|
|
4847
|
+
}, React__default.createElement("p", null, "Warning: Rango ", React__default.createElement("u", null, "neither reverts"), " your transaction\xA0", React__default.createElement("u", null, "nor refunds"), " you if you've already signed and sent a transaction to the blockchain since it's out of Rango's control. Beware that \"Cancel\" only stops next steps from being executed."), React__default.createElement(Spacer, {
|
|
4431
4848
|
size: 12,
|
|
4432
4849
|
direction: "vertical"
|
|
4433
|
-
}), React__default.createElement("p", null, "If you have already signed your transaction to blockchain, you should wait for that to complete or rollback"))
|
|
4850
|
+
}), React__default.createElement("p", null, "If you have already signed your transaction to blockchain, you should wait for that to complete or rollback")),
|
|
4434
4851
|
footer: React__default.createElement("div", {
|
|
4435
4852
|
style: {
|
|
4436
4853
|
display: 'flex',
|
|
@@ -4463,6 +4880,7 @@ exports.AngleDownIcon = AngleDownIcon;
|
|
|
4463
4880
|
exports.AngleLeftIcon = AngleLeftIcon;
|
|
4464
4881
|
exports.AngleRightIcon = AngleRightIcon;
|
|
4465
4882
|
exports.AngleUpIcon = AngleUpIcon;
|
|
4883
|
+
exports.ArrowRightIcon = ArrowRightIcon;
|
|
4466
4884
|
exports.BagIcon = BagIcon;
|
|
4467
4885
|
exports.BanIcon = BanIcon;
|
|
4468
4886
|
exports.BestRoute = BestRoute;
|
|
@@ -4473,24 +4891,28 @@ exports.CheckIcon = CheckIcon;
|
|
|
4473
4891
|
exports.CheckSquareIcon = CheckSquareIcon;
|
|
4474
4892
|
exports.CheckWalletIcon = CheckWalletIcon;
|
|
4475
4893
|
exports.Checkbox = Checkbox;
|
|
4894
|
+
exports.ChevronRightIcon = ChevronRightIcon;
|
|
4476
4895
|
exports.Chip = Chip;
|
|
4477
4896
|
exports.CloseIcon = CloseIcon;
|
|
4478
4897
|
exports.ColorPicker = ColorPicker;
|
|
4479
4898
|
exports.ConfirmSwap = ConfirmSwap;
|
|
4480
|
-
exports.ConfirmWallets = ConfirmWallets;
|
|
4481
4899
|
exports.ConnectWalletsModal = ConnectWalletsModal;
|
|
4482
4900
|
exports.CopyIcon = CopyIcon;
|
|
4483
4901
|
exports.DeleteCircleIcon = DeleteCircleIcon;
|
|
4484
4902
|
exports.DeleteWalletIcon = DeleteWalletIcon;
|
|
4903
|
+
exports.DisconnectIcon = DisconnectIcon;
|
|
4904
|
+
exports.Divider = Divider;
|
|
4485
4905
|
exports.DownloadIcon = DownloadIcon;
|
|
4486
4906
|
exports.Drawer = Drawer;
|
|
4487
4907
|
exports.FilledCircle = FilledCircle;
|
|
4488
4908
|
exports.GasIcon = GasIcon;
|
|
4909
|
+
exports.Header = Header;
|
|
4489
4910
|
exports.History = History;
|
|
4490
4911
|
exports.HistoryIcon = HistoryIcon;
|
|
4491
4912
|
exports.HorizontalSwapIcon = HorizontalSwapIcon;
|
|
4492
4913
|
exports.InfoCircleIcon = InfoCircleIcon;
|
|
4493
4914
|
exports.LiquiditySourcesSelector = LiquiditySourcesSelector;
|
|
4915
|
+
exports.LoadingFailedAlert = LoadingFailedAlert;
|
|
4494
4916
|
exports.MinusCircleIcon = MinusCircleIcon;
|
|
4495
4917
|
exports.Modal = Modal;
|
|
4496
4918
|
exports.Radio = Radio;
|