@rango-dev/ui 0.1.10-next.92 → 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/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 +1 -1
- 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/index.d.ts +1 -0
- 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/SwapContainer/SwapContainer.d.ts +1 -0
- package/dist/components/SwapDetail/Token.d.ts +16 -0
- package/dist/components/TokenSelector/TokenSelector.d.ts +3 -0
- 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 +1062 -838
- 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 +1061 -840
- package/dist/ui.esm.js.map +1 -1
- package/package.json +3 -2
- package/src/components/Alert/Alert.tsx +33 -12
- 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/mock.ts +10 -0
- package/src/components/BlockchainSelector/BlockchainSelector.tsx +13 -19
- package/src/components/Button/Button.tsx +2 -1
- 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/index.ts +1 -0
- package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +72 -22
- package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.tsx +15 -10
- package/src/components/SecondaryPage/SecondaryPage.tsx +26 -52
- package/src/components/SelectableWalletList/SelectableWalletList.tsx +5 -0
- package/src/components/SelectableWalletList/mock.ts +4 -3
- package/src/components/Settings/Settings.tsx +30 -11
- package/src/components/StatusDrawer/StatusDrawer.tsx +1 -0
- package/src/components/StepDetail/StepDetail.tsx +1 -0
- package/src/components/SwapContainer/SwapContainer.tsx +21 -16
- 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/TextField/TextField.tsx +1 -0
- 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/Wallet/Wallet.tsx +1 -1
- package/src/components/index.ts +2 -0
- package/src/containers/ConfirmSwap/ConfirmSwap.stories.tsx +11 -2
- package/src/containers/ConfirmSwap/ConfirmSwap.tsx +103 -117
- 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/types/meta.ts +2 -0
- package/dist/containers/ConfirmWallets/ConfirmWallets.d.ts +0 -16
- 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 -143
- package/src/containers/ConfirmWallets/index.ts +0 -1
- package/src/containers/ConfirmWallets/mock.ts +0 -222
- package/src/helper/swaps.ts +0 -23
|
@@ -7,14 +7,14 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var React__default = _interopDefault(React);
|
|
9
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'));
|
|
10
13
|
var RadixCheckbox = require('@radix-ui/react-checkbox');
|
|
11
14
|
var reactDom = require('react-dom');
|
|
12
15
|
var walletsShared = require('@rango-dev/wallets-shared');
|
|
13
16
|
var RadixSwitch = require('@radix-ui/react-switch');
|
|
14
17
|
var RadioGroup = require('@radix-ui/react-radio-group');
|
|
15
|
-
var reactWindow = require('react-window');
|
|
16
|
-
var InfiniteLoader = _interopDefault(require('react-window-infinite-loader'));
|
|
17
|
-
var AutoSizer = _interopDefault(require('react-virtualized-auto-sizer'));
|
|
18
18
|
var reactColor = require('react-color');
|
|
19
19
|
|
|
20
20
|
function _extends() {
|
|
@@ -871,11 +871,42 @@ ChevronRightIcon.toString = function () {
|
|
|
871
871
|
};
|
|
872
872
|
|
|
873
873
|
var _excluded$m = ["size", "color"];
|
|
874
|
-
var
|
|
874
|
+
var ArrowRightIcon = function ArrowRightIcon(_ref) {
|
|
875
875
|
var _ref$size = _ref.size,
|
|
876
876
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
877
877
|
color = _ref.color,
|
|
878
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"];
|
|
905
|
+
var RetryRightIcon = function RetryRightIcon(_ref) {
|
|
906
|
+
var _ref$size = _ref.size,
|
|
907
|
+
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
908
|
+
color = _ref.color,
|
|
909
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
|
|
879
910
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
880
911
|
width: size,
|
|
881
912
|
height: size,
|
|
@@ -895,12 +926,12 @@ RetryRightIcon.toString = function () {
|
|
|
895
926
|
return '._icon';
|
|
896
927
|
};
|
|
897
928
|
|
|
898
|
-
var _excluded$
|
|
929
|
+
var _excluded$o = ["size", "color"];
|
|
899
930
|
var RetryLeftIcon = function RetryLeftIcon(_ref) {
|
|
900
931
|
var _ref$size = _ref.size,
|
|
901
932
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
902
933
|
color = _ref.color,
|
|
903
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
934
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
|
|
904
935
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
905
936
|
width: size,
|
|
906
937
|
height: size,
|
|
@@ -920,12 +951,12 @@ RetryLeftIcon.toString = function () {
|
|
|
920
951
|
return '._icon';
|
|
921
952
|
};
|
|
922
953
|
|
|
923
|
-
var _excluded$
|
|
954
|
+
var _excluded$p = ["size", "color"];
|
|
924
955
|
var TryAgainIcon = function TryAgainIcon(_ref) {
|
|
925
956
|
var _ref$size = _ref.size,
|
|
926
957
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
927
958
|
color = _ref.color,
|
|
928
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
959
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
|
|
929
960
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
930
961
|
width: size,
|
|
931
962
|
height: size,
|
|
@@ -945,12 +976,12 @@ TryAgainIcon.toString = function () {
|
|
|
945
976
|
return '._icon';
|
|
946
977
|
};
|
|
947
978
|
|
|
948
|
-
var _excluded$
|
|
979
|
+
var _excluded$q = ["size", "color"];
|
|
949
980
|
var VerticalSwapIcon = function VerticalSwapIcon(_ref) {
|
|
950
981
|
var _ref$size = _ref.size,
|
|
951
982
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
952
983
|
color = _ref.color,
|
|
953
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
984
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
|
|
954
985
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
955
986
|
width: size,
|
|
956
987
|
height: size,
|
|
@@ -976,12 +1007,12 @@ VerticalSwapIcon.toString = function () {
|
|
|
976
1007
|
return '._icon';
|
|
977
1008
|
};
|
|
978
1009
|
|
|
979
|
-
var _excluded$
|
|
1010
|
+
var _excluded$r = ["size", "color"];
|
|
980
1011
|
var HorizontalSwapIcon = function HorizontalSwapIcon(_ref) {
|
|
981
1012
|
var _ref$size = _ref.size,
|
|
982
1013
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
983
1014
|
color = _ref.color,
|
|
984
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1015
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$r);
|
|
985
1016
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
986
1017
|
width: size,
|
|
987
1018
|
height: size,
|
|
@@ -1007,13 +1038,13 @@ HorizontalSwapIcon.toString = function () {
|
|
|
1007
1038
|
return '._icon';
|
|
1008
1039
|
};
|
|
1009
1040
|
|
|
1010
|
-
var _excluded$
|
|
1041
|
+
var _excluded$s = ["color", "size"];
|
|
1011
1042
|
var RetryIcon = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
1012
1043
|
var _ref$color = _ref.color,
|
|
1013
1044
|
color = _ref$color === void 0 ? 'black' : _ref$color,
|
|
1014
1045
|
_ref$size = _ref.size,
|
|
1015
1046
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1016
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1047
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
1017
1048
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
1018
1049
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1019
1050
|
width: size,
|
|
@@ -1038,12 +1069,12 @@ RetryIcon.toString = function () {
|
|
|
1038
1069
|
return '._icon';
|
|
1039
1070
|
};
|
|
1040
1071
|
|
|
1041
|
-
var _excluded$
|
|
1072
|
+
var _excluded$t = ["size", "color"];
|
|
1042
1073
|
var WalletIcon = function WalletIcon(_ref) {
|
|
1043
1074
|
var _ref$size = _ref.size,
|
|
1044
1075
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1045
1076
|
color = _ref.color,
|
|
1046
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1077
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
1047
1078
|
return React.createElement(SvgWithFillColor, Object.assign({
|
|
1048
1079
|
width: size,
|
|
1049
1080
|
height: size,
|
|
@@ -1070,12 +1101,12 @@ WalletIcon.toString = function () {
|
|
|
1070
1101
|
return '._icon';
|
|
1071
1102
|
};
|
|
1072
1103
|
|
|
1073
|
-
var _excluded$
|
|
1104
|
+
var _excluded$u = ["size", "color"];
|
|
1074
1105
|
var AddWalletIcon = function AddWalletIcon(_ref) {
|
|
1075
1106
|
var _ref$size = _ref.size,
|
|
1076
1107
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1077
1108
|
color = _ref.color,
|
|
1078
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1109
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
1079
1110
|
return React.createElement(SvgWithFillColor, Object.assign({
|
|
1080
1111
|
width: size,
|
|
1081
1112
|
height: size,
|
|
@@ -1110,12 +1141,12 @@ AddWalletIcon.toString = function () {
|
|
|
1110
1141
|
return '._icon';
|
|
1111
1142
|
};
|
|
1112
1143
|
|
|
1113
|
-
var _excluded$
|
|
1144
|
+
var _excluded$v = ["size", "color"];
|
|
1114
1145
|
var DeleteWalletIcon = function DeleteWalletIcon(_ref) {
|
|
1115
1146
|
var _ref$size = _ref.size,
|
|
1116
1147
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1117
1148
|
color = _ref.color,
|
|
1118
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1149
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
1119
1150
|
return React.createElement(SvgWithFillColor, Object.assign({
|
|
1120
1151
|
width: size,
|
|
1121
1152
|
height: size,
|
|
@@ -1150,12 +1181,12 @@ DeleteWalletIcon.toString = function () {
|
|
|
1150
1181
|
return '._icon';
|
|
1151
1182
|
};
|
|
1152
1183
|
|
|
1153
|
-
var _excluded$
|
|
1184
|
+
var _excluded$w = ["size", "color"];
|
|
1154
1185
|
var CheckWalletIcon = function CheckWalletIcon(_ref) {
|
|
1155
1186
|
var _ref$size = _ref.size,
|
|
1156
1187
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1157
1188
|
color = _ref.color,
|
|
1158
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1189
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
1159
1190
|
return React.createElement(SvgWithFillColor, Object.assign({
|
|
1160
1191
|
width: size,
|
|
1161
1192
|
height: size,
|
|
@@ -1186,12 +1217,12 @@ CheckWalletIcon.toString = function () {
|
|
|
1186
1217
|
return '._icon';
|
|
1187
1218
|
};
|
|
1188
1219
|
|
|
1189
|
-
var _excluded$
|
|
1220
|
+
var _excluded$x = ["size", "color"];
|
|
1190
1221
|
var SwapWalletIcon = function SwapWalletIcon(_ref) {
|
|
1191
1222
|
var _ref$size = _ref.size,
|
|
1192
1223
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1193
1224
|
color = _ref.color,
|
|
1194
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1225
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
1195
1226
|
return React.createElement(SvgWithFillColor, Object.assign({
|
|
1196
1227
|
width: size,
|
|
1197
1228
|
height: size,
|
|
@@ -1226,13 +1257,13 @@ SwapWalletIcon.toString = function () {
|
|
|
1226
1257
|
return '._icon';
|
|
1227
1258
|
};
|
|
1228
1259
|
|
|
1229
|
-
var _excluded$
|
|
1260
|
+
var _excluded$y = ["color", "size"];
|
|
1230
1261
|
var DisconnectIcon = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
1231
1262
|
var _ref$color = _ref.color,
|
|
1232
1263
|
color = _ref$color === void 0 ? 'black' : _ref$color,
|
|
1233
1264
|
_ref$size = _ref.size,
|
|
1234
1265
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1235
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1266
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
1236
1267
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
1237
1268
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1238
1269
|
width: size,
|
|
@@ -1262,12 +1293,12 @@ DisconnectIcon.toString = function () {
|
|
|
1262
1293
|
return '._icon';
|
|
1263
1294
|
};
|
|
1264
1295
|
|
|
1265
|
-
var _excluded$
|
|
1296
|
+
var _excluded$z = ["size", "color"];
|
|
1266
1297
|
var BagIcon = function BagIcon(_ref) {
|
|
1267
1298
|
var _ref$size = _ref.size,
|
|
1268
1299
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1269
1300
|
color = _ref.color,
|
|
1270
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1301
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
1271
1302
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
1272
1303
|
width: size,
|
|
1273
1304
|
height: size,
|
|
@@ -1297,11 +1328,11 @@ BagIcon.toString = function () {
|
|
|
1297
1328
|
return '._icon';
|
|
1298
1329
|
};
|
|
1299
1330
|
|
|
1300
|
-
var _excluded$
|
|
1331
|
+
var _excluded$A = ["size"];
|
|
1301
1332
|
var TimeIcon = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
1302
1333
|
var _ref$size = _ref.size,
|
|
1303
1334
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1304
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1335
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
1305
1336
|
return React.createElement(SvgWithStrokeColor, Object.assign({
|
|
1306
1337
|
width: size,
|
|
1307
1338
|
height: size,
|
|
@@ -1334,12 +1365,12 @@ CloseIcon.toString = function () {
|
|
|
1334
1365
|
return '._icon';
|
|
1335
1366
|
};
|
|
1336
1367
|
|
|
1337
|
-
var _excluded$
|
|
1368
|
+
var _excluded$B = ["size", "color"];
|
|
1338
1369
|
var SignatureIcon = function SignatureIcon(_ref) {
|
|
1339
1370
|
var _ref$size = _ref.size,
|
|
1340
1371
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1341
1372
|
color = _ref.color,
|
|
1342
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1373
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
1343
1374
|
return React.createElement(SvgWithFillColor, Object.assign({
|
|
1344
1375
|
width: size,
|
|
1345
1376
|
height: size,
|
|
@@ -1360,12 +1391,12 @@ SignatureIcon.toString = function () {
|
|
|
1360
1391
|
return '._icon';
|
|
1361
1392
|
};
|
|
1362
1393
|
|
|
1363
|
-
var _excluded$
|
|
1394
|
+
var _excluded$C = ["size", "color"];
|
|
1364
1395
|
var CopyIcon = function CopyIcon(_ref) {
|
|
1365
1396
|
var _ref$size = _ref.size,
|
|
1366
1397
|
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
1367
1398
|
color = _ref.color,
|
|
1368
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1399
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
|
|
1369
1400
|
return React.createElement(SvgWithFillColor, Object.assign({
|
|
1370
1401
|
width: size,
|
|
1371
1402
|
height: size,
|
|
@@ -1391,7 +1422,7 @@ CopyIcon.toString = function () {
|
|
|
1391
1422
|
return '._icon';
|
|
1392
1423
|
};
|
|
1393
1424
|
|
|
1394
|
-
var _excluded$
|
|
1425
|
+
var _excluded$D = ["children", "className", "color"];
|
|
1395
1426
|
var TypographyContainer = /*#__PURE__*/styled('span', {
|
|
1396
1427
|
margin: 0,
|
|
1397
1428
|
display: 'inline-block',
|
|
@@ -1558,7 +1589,7 @@ function Typography(_ref) {
|
|
|
1558
1589
|
var children = _ref.children,
|
|
1559
1590
|
className = _ref.className,
|
|
1560
1591
|
color = _ref.color,
|
|
1561
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1592
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
|
|
1562
1593
|
var customCss = color ? {
|
|
1563
1594
|
color: color.startsWith('$') ? color : "$" + color
|
|
1564
1595
|
} : {
|
|
@@ -1637,7 +1668,8 @@ var Detail = /*#__PURE__*/styled('div', {
|
|
|
1637
1668
|
}
|
|
1638
1669
|
});
|
|
1639
1670
|
var SubTitle = /*#__PURE__*/styled(Typography, {
|
|
1640
|
-
color: '$neutrals600'
|
|
1671
|
+
color: '$neutrals600',
|
|
1672
|
+
display: 'block'
|
|
1641
1673
|
});
|
|
1642
1674
|
function StepDetail(_ref) {
|
|
1643
1675
|
var logo = _ref.logo,
|
|
@@ -2075,7 +2107,7 @@ function BestRoute(props) {
|
|
|
2075
2107
|
}, "No routes found")));
|
|
2076
2108
|
}
|
|
2077
2109
|
|
|
2078
|
-
var _excluded$
|
|
2110
|
+
var _excluded$E = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
|
|
2079
2111
|
var _ghost, _css, _css2, _css3;
|
|
2080
2112
|
var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
2081
2113
|
borderRadius: '$5',
|
|
@@ -2104,6 +2136,7 @@ var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
|
2104
2136
|
},
|
|
2105
2137
|
size: {
|
|
2106
2138
|
compact: {},
|
|
2139
|
+
free: {},
|
|
2107
2140
|
small: {
|
|
2108
2141
|
height: '$32'
|
|
2109
2142
|
},
|
|
@@ -2419,7 +2452,7 @@ function Button(_ref) {
|
|
|
2419
2452
|
suffix = _ref.suffix,
|
|
2420
2453
|
align = _ref.align,
|
|
2421
2454
|
flexContent = _ref.flexContent,
|
|
2422
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2455
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
2423
2456
|
var isDisabled = loading || disabled;
|
|
2424
2457
|
return React__default.createElement(ButtonContainer, Object.assign({
|
|
2425
2458
|
disabled: isDisabled
|
|
@@ -2495,9 +2528,70 @@ function BlockchainsList(props) {
|
|
|
2495
2528
|
}));
|
|
2496
2529
|
}
|
|
2497
2530
|
|
|
2498
|
-
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"];
|
|
2499
2592
|
var InputContainer = /*#__PURE__*/styled('div', {
|
|
2500
2593
|
backgroundColor: '$background',
|
|
2594
|
+
padding: '1px',
|
|
2501
2595
|
boxSizing: 'border-box',
|
|
2502
2596
|
border: '1px solid $neutrals400',
|
|
2503
2597
|
borderRadius: '$5',
|
|
@@ -2581,7 +2675,7 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
2581
2675
|
suffix = props.suffix,
|
|
2582
2676
|
size = props.size,
|
|
2583
2677
|
style = props.style,
|
|
2584
|
-
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$
|
|
2678
|
+
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$F);
|
|
2585
2679
|
return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({
|
|
2586
2680
|
className: "_text"
|
|
2587
2681
|
}, inputAttributes.id && {
|
|
@@ -2601,36 +2695,15 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
2601
2695
|
})), suffix || null));
|
|
2602
2696
|
});
|
|
2603
2697
|
|
|
2604
|
-
var
|
|
2698
|
+
var ContentContainer = /*#__PURE__*/styled('div', {
|
|
2699
|
+
overflow: 'hidden',
|
|
2605
2700
|
display: 'flex',
|
|
2606
2701
|
flexDirection: 'column',
|
|
2607
|
-
height: '100%',
|
|
2608
|
-
width: '100%',
|
|
2609
|
-
padding: '$12 0',
|
|
2610
|
-
position: 'relative',
|
|
2611
|
-
'@lg': {
|
|
2612
|
-
padding: '$16 0'
|
|
2613
|
-
}
|
|
2614
|
-
});
|
|
2615
|
-
var HeaderContainer = /*#__PURE__*/styled('div', {
|
|
2616
|
-
display: 'flex',
|
|
2617
|
-
justifyContent: 'center',
|
|
2618
|
-
alignItems: 'center',
|
|
2619
|
-
marginBottom: '$16',
|
|
2620
|
-
position: 'relative'
|
|
2621
|
-
});
|
|
2622
|
-
var BackIcon = /*#__PURE__*/styled(AngleLeftIcon, {
|
|
2623
|
-
position: 'absolute',
|
|
2624
|
-
left: '0'
|
|
2625
|
-
});
|
|
2626
|
-
var StyledBackIcon = /*#__PURE__*/styled(BackIcon, {
|
|
2627
|
-
cursor: 'pointer'
|
|
2628
|
-
});
|
|
2629
|
-
var ContentContainer = /*#__PURE__*/styled('div', {
|
|
2630
2702
|
flex: '1',
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2703
|
+
padding: '0 $4'
|
|
2704
|
+
});
|
|
2705
|
+
var TextFieldContainer = /*#__PURE__*/styled('div', {
|
|
2706
|
+
padding: '1px'
|
|
2634
2707
|
});
|
|
2635
2708
|
function SecondaryPage(props) {
|
|
2636
2709
|
var title = props.title,
|
|
@@ -2642,12 +2715,11 @@ function SecondaryPage(props) {
|
|
|
2642
2715
|
var _useState = React.useState(''),
|
|
2643
2716
|
searchedFor = _useState[0],
|
|
2644
2717
|
setSearchedFor = _useState[1];
|
|
2645
|
-
return React__default.createElement(
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
}, 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, {
|
|
2651
2723
|
size: "large",
|
|
2652
2724
|
prefix: React__default.createElement(SearchIcon, {
|
|
2653
2725
|
size: 24
|
|
@@ -2658,9 +2730,28 @@ function SecondaryPage(props) {
|
|
|
2658
2730
|
},
|
|
2659
2731
|
value: searchedFor,
|
|
2660
2732
|
autoFocus: true
|
|
2661
|
-
})
|
|
2733
|
+
}), React__default.createElement(Divider, {
|
|
2734
|
+
size: 16
|
|
2735
|
+
})), props.textField && (props.children == null ? void 0 : props.children(searchedFor)), !props.textField && props.children), Footer);
|
|
2662
2736
|
}
|
|
2663
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
|
+
|
|
2664
2755
|
var SpacerContainer = /*#__PURE__*/styled('div', {
|
|
2665
2756
|
variants: {
|
|
2666
2757
|
size: {
|
|
@@ -2796,7 +2887,7 @@ var MainContainer = /*#__PURE__*/styled('div', {
|
|
|
2796
2887
|
color: '$primary200'
|
|
2797
2888
|
},
|
|
2798
2889
|
secondary: {
|
|
2799
|
-
color: '$
|
|
2890
|
+
color: '$foreground'
|
|
2800
2891
|
},
|
|
2801
2892
|
success: {
|
|
2802
2893
|
color: '$success300'
|
|
@@ -2820,7 +2911,14 @@ function Alert(props) {
|
|
|
2820
2911
|
className: showIcon ? 'hasIcon' : ''
|
|
2821
2912
|
}, React__default.createElement("div", {
|
|
2822
2913
|
className: "main"
|
|
2823
|
-
}, showIcon && React__default.createElement(React__default.Fragment, null,
|
|
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, {
|
|
2824
2922
|
color: type,
|
|
2825
2923
|
size: 24
|
|
2826
2924
|
}), type === 'warning' && React__default.createElement(WarningIcon, {
|
|
@@ -2831,230 +2929,462 @@ function Alert(props) {
|
|
|
2831
2929
|
size: 24
|
|
2832
2930
|
}), React__default.createElement(Spacer, {
|
|
2833
2931
|
size: 8
|
|
2834
|
-
})),
|
|
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",
|
|
2835
2942
|
variant: "h6",
|
|
2836
2943
|
color: type
|
|
2837
|
-
}, title), children
|
|
2944
|
+
}, title), !!children && React__default.createElement(Spacer, {
|
|
2945
|
+
size: 8,
|
|
2946
|
+
direction: "vertical"
|
|
2947
|
+
})), children)), props.footer ? React__default.createElement("div", {
|
|
2838
2948
|
className: "footer"
|
|
2839
2949
|
}, props.footer) : null);
|
|
2840
2950
|
}
|
|
2841
2951
|
|
|
2842
|
-
|
|
2843
|
-
return
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
var ListContainer$1 = /*#__PURE__*/styled('div', {
|
|
2847
|
-
height: '450px',
|
|
2848
|
-
display: 'flex',
|
|
2849
|
-
justifyContent: 'center',
|
|
2850
|
-
alignItems: 'center'
|
|
2851
|
-
});
|
|
2852
|
-
var filterBlockchains = function filterBlockchains(list, searchedFor) {
|
|
2853
|
-
return list.filter(function (blockchain) {
|
|
2854
|
-
return containsText(blockchain.name, searchedFor) || containsText(blockchain.displayName, searchedFor);
|
|
2855
|
-
});
|
|
2856
|
-
};
|
|
2857
|
-
function BlockchainSelector(props) {
|
|
2858
|
-
var type = props.type,
|
|
2859
|
-
list = props.list,
|
|
2860
|
-
onChange = props.onChange,
|
|
2861
|
-
selected = props.selected,
|
|
2862
|
-
onBack = props.onBack,
|
|
2863
|
-
loadingStatus = props.loadingStatus,
|
|
2864
|
-
hasHeader = props.hasHeader,
|
|
2865
|
-
listContainerStyle = props.listContainerStyle,
|
|
2866
|
-
multiSelect = props.multiSelect,
|
|
2867
|
-
selectedList = props.selectedList;
|
|
2868
|
-
return React__default.createElement(SecondaryPage, {
|
|
2869
|
-
textField: true,
|
|
2870
|
-
hasHeader: hasHeader,
|
|
2871
|
-
textFieldPlaceholder: "Search Blockchain By Name",
|
|
2872
|
-
title: "Select " + type + " Network",
|
|
2873
|
-
onBack: onBack
|
|
2874
|
-
}, function (searchedFor) {
|
|
2875
|
-
var filteredBlockchains = filterBlockchains(list, searchedFor);
|
|
2876
|
-
return React__default.createElement(ListContainer$1, {
|
|
2877
|
-
style: listContainerStyle,
|
|
2878
|
-
key: "1"
|
|
2879
|
-
}, loadingStatus === 'loading' && React__default.createElement("div", null, React__default.createElement(Spinner, {
|
|
2880
|
-
size: 24
|
|
2881
|
-
})), loadingStatus === 'failed' && React__default.createElement(Alert, {
|
|
2882
|
-
type: "error"
|
|
2883
|
-
}, React__default.createElement(Typography, {
|
|
2884
|
-
variant: "body2"
|
|
2885
|
-
}, "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, {
|
|
2886
|
-
list: filteredBlockchains,
|
|
2887
|
-
selected: selected,
|
|
2888
|
-
multiSelect: multiSelect,
|
|
2889
|
-
selectedList: selectedList,
|
|
2890
|
-
onChange: onChange
|
|
2891
|
-
}) : React__default.createElement(Alert, null, searchedFor + " not found")));
|
|
2952
|
+
function LoadingFailedAlert() {
|
|
2953
|
+
return React__default.createElement(Alert, {
|
|
2954
|
+
type: "error",
|
|
2955
|
+
title: " Error connecting server, please reload the app and try again."
|
|
2892
2956
|
});
|
|
2893
2957
|
}
|
|
2894
2958
|
|
|
2895
|
-
|
|
2896
|
-
var
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
width: 20,
|
|
2903
|
-
padding: 0,
|
|
2904
|
-
height: 20,
|
|
2905
|
-
border: '1px solid $foreground',
|
|
2906
|
-
display: 'flex',
|
|
2907
|
-
alignItems: 'center',
|
|
2908
|
-
justifyContent: 'center',
|
|
2909
|
-
marginRight: '$2',
|
|
2910
|
-
backgroundColor: '$neutral-100'
|
|
2911
|
-
});
|
|
2912
|
-
var Label$1 = /*#__PURE__*/styled('label', {
|
|
2913
|
-
color: '$foreground',
|
|
2914
|
-
fontSize: '$m',
|
|
2915
|
-
marginLeft: '$8'
|
|
2916
|
-
});
|
|
2917
|
-
function Checkbox(_ref) {
|
|
2918
|
-
var label = _ref.label,
|
|
2919
|
-
id = _ref.id,
|
|
2920
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
2921
|
-
return React__default.createElement(CheckboxContainer, null, React__default.createElement(CheckboxRoot, Object.assign({
|
|
2922
|
-
id: id
|
|
2923
|
-
}, props), React__default.createElement(RadixCheckbox.Indicator, null, React__default.createElement(CheckIcon, {
|
|
2924
|
-
size: 20
|
|
2925
|
-
}))), React__default.createElement(Label$1, {
|
|
2926
|
-
className: "_text",
|
|
2927
|
-
htmlFor: id
|
|
2928
|
-
}, label));
|
|
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
|
+
});
|
|
2929
2966
|
}
|
|
2930
2967
|
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
}
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
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
|
+
});
|
|
2970
3009
|
}
|
|
2971
3010
|
|
|
2972
|
-
var
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
alignItems: 'center',
|
|
2977
|
-
top: '0',
|
|
2978
|
-
left: '0',
|
|
2979
|
-
width: '100vw',
|
|
2980
|
-
height: '100vh',
|
|
2981
|
-
backgroundColor: 'rgba(0,0,0,.1)'
|
|
2982
|
-
});
|
|
2983
|
-
var ModalContainer = /*#__PURE__*/styled('div', {
|
|
2984
|
-
backgroundColor: '$background',
|
|
2985
|
-
borderRadius: '$10',
|
|
2986
|
-
padding: '$16 $16',
|
|
2987
|
-
display: 'flex',
|
|
2988
|
-
flexDirection: 'column',
|
|
2989
|
-
boxShadow: '$s',
|
|
2990
|
-
zIndex: 10
|
|
3011
|
+
var TokenImage = /*#__PURE__*/styled('img', {
|
|
3012
|
+
width: '$32',
|
|
3013
|
+
maxHeight: '$32',
|
|
3014
|
+
marginRight: '$16'
|
|
2991
3015
|
});
|
|
2992
|
-
var
|
|
3016
|
+
var TokenNameContainer = /*#__PURE__*/styled('div', {
|
|
2993
3017
|
display: 'flex',
|
|
2994
|
-
|
|
3018
|
+
flexDirection: 'column'
|
|
2995
3019
|
});
|
|
2996
|
-
var
|
|
3020
|
+
var TokenAmountContainer = /*#__PURE__*/styled('div', {
|
|
2997
3021
|
display: 'flex',
|
|
2998
|
-
|
|
2999
|
-
alignItems: '
|
|
3000
|
-
position: 'relative',
|
|
3001
|
-
marginBottom: '$16'
|
|
3022
|
+
flexDirection: 'column',
|
|
3023
|
+
alignItems: 'flex-end'
|
|
3002
3024
|
});
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
var
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
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));
|
|
3014
3094
|
};
|
|
3015
3095
|
React.useEffect(function () {
|
|
3016
|
-
|
|
3017
|
-
}, [
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
},
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
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
|
+
});
|
|
3030
3129
|
}
|
|
3031
3130
|
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
WalletState["CONNECTED"] = "connected";
|
|
3037
|
-
})(exports.WalletState || (exports.WalletState = {}));
|
|
3038
|
-
|
|
3039
|
-
var StateIconContainer = /*#__PURE__*/styled('span', {
|
|
3131
|
+
var Container$1 = /*#__PURE__*/styled('div', {
|
|
3132
|
+
flex: '1'
|
|
3133
|
+
});
|
|
3134
|
+
var LoaderContainer = /*#__PURE__*/styled('div', {
|
|
3040
3135
|
display: 'flex',
|
|
3041
3136
|
justifyContent: 'center',
|
|
3042
|
-
|
|
3137
|
+
width: '100%',
|
|
3138
|
+
position: 'absolute',
|
|
3139
|
+
top: '50%'
|
|
3043
3140
|
});
|
|
3044
|
-
var
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
href: walletsShared.detectInstallLink(installLink),
|
|
3049
|
-
target: "_blank"
|
|
3050
|
-
}, React__default.createElement(DownloadIcon, {
|
|
3051
|
-
size: 24,
|
|
3052
|
-
color: "success"
|
|
3053
|
-
})), walletState === exports.WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === exports.WalletState.CONNECTED && React__default.createElement(DisconnectIcon, null)));
|
|
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
|
+
});
|
|
3054
3145
|
};
|
|
3055
|
-
|
|
3056
|
-
var
|
|
3057
|
-
|
|
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'
|
|
3182
|
+
});
|
|
3183
|
+
var filterBlockchains = function filterBlockchains(list, searchedFor) {
|
|
3184
|
+
return list.filter(function (blockchain) {
|
|
3185
|
+
return containsText(blockchain.name, searchedFor) || containsText(blockchain.displayName, searchedFor);
|
|
3186
|
+
});
|
|
3187
|
+
};
|
|
3188
|
+
function BlockchainSelector(props) {
|
|
3189
|
+
var type = props.type,
|
|
3190
|
+
list = props.list,
|
|
3191
|
+
onChange = props.onChange,
|
|
3192
|
+
selected = props.selected,
|
|
3193
|
+
onBack = props.onBack,
|
|
3194
|
+
loadingStatus = props.loadingStatus,
|
|
3195
|
+
hasHeader = props.hasHeader,
|
|
3196
|
+
listContainerStyle = props.listContainerStyle,
|
|
3197
|
+
multiSelect = props.multiSelect,
|
|
3198
|
+
selectedList = props.selectedList;
|
|
3199
|
+
return React__default.createElement(SecondaryPage, {
|
|
3200
|
+
textField: true,
|
|
3201
|
+
hasHeader: hasHeader,
|
|
3202
|
+
textFieldPlaceholder: "Search Blockchain By Name",
|
|
3203
|
+
title: "Select " + type + " Network",
|
|
3204
|
+
onBack: onBack
|
|
3205
|
+
}, function (searchedFor) {
|
|
3206
|
+
var filteredBlockchains = filterBlockchains(list, searchedFor);
|
|
3207
|
+
return React__default.createElement(ListContainer$1, {
|
|
3208
|
+
style: listContainerStyle,
|
|
3209
|
+
key: "1"
|
|
3210
|
+
}, loadingStatus === 'loading' && React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
|
|
3211
|
+
size: 24
|
|
3212
|
+
})), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredBlockchains.length ? React__default.createElement(BlockchainsList, {
|
|
3213
|
+
list: filteredBlockchains,
|
|
3214
|
+
selected: selected,
|
|
3215
|
+
multiSelect: multiSelect,
|
|
3216
|
+
selectedList: selectedList,
|
|
3217
|
+
onChange: onChange
|
|
3218
|
+
}) : React__default.createElement(NotFoundAlert, {
|
|
3219
|
+
catergory: "Blockchain",
|
|
3220
|
+
searchedFor: searchedFor
|
|
3221
|
+
})));
|
|
3222
|
+
});
|
|
3223
|
+
}
|
|
3224
|
+
|
|
3225
|
+
var _excluded$H = ["label", "id"];
|
|
3226
|
+
var CheckboxContainer = /*#__PURE__*/styled('div', {
|
|
3227
|
+
display: 'flex',
|
|
3228
|
+
alignItems: 'center'
|
|
3229
|
+
});
|
|
3230
|
+
var CheckboxRoot = /*#__PURE__*/styled(RadixCheckbox.Root, {
|
|
3231
|
+
borderRadius: '5px',
|
|
3232
|
+
width: 20,
|
|
3233
|
+
padding: 0,
|
|
3234
|
+
height: 20,
|
|
3235
|
+
border: '1px solid $foreground',
|
|
3236
|
+
display: 'flex',
|
|
3237
|
+
alignItems: 'center',
|
|
3238
|
+
justifyContent: 'center',
|
|
3239
|
+
marginRight: '$2',
|
|
3240
|
+
backgroundColor: '$neutral-100'
|
|
3241
|
+
});
|
|
3242
|
+
var Label$1 = /*#__PURE__*/styled('label', {
|
|
3243
|
+
color: '$foreground',
|
|
3244
|
+
fontSize: '$m',
|
|
3245
|
+
marginLeft: '$8'
|
|
3246
|
+
});
|
|
3247
|
+
function Checkbox(_ref) {
|
|
3248
|
+
var label = _ref.label,
|
|
3249
|
+
id = _ref.id,
|
|
3250
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
3251
|
+
return React__default.createElement(CheckboxContainer, null, React__default.createElement(CheckboxRoot, Object.assign({
|
|
3252
|
+
id: id
|
|
3253
|
+
}, props), React__default.createElement(RadixCheckbox.Indicator, null, React__default.createElement(CheckIcon, {
|
|
3254
|
+
size: 20
|
|
3255
|
+
}))), React__default.createElement(Label$1, {
|
|
3256
|
+
className: "_text",
|
|
3257
|
+
htmlFor: id
|
|
3258
|
+
}, label));
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3261
|
+
var ChipCointainer = /*#__PURE__*/styled('div', {
|
|
3262
|
+
display: 'inline-flex',
|
|
3263
|
+
justifyContent: 'center',
|
|
3264
|
+
alignItems: 'center',
|
|
3265
|
+
borderRadius: '$5',
|
|
3266
|
+
padding: '$4 $8',
|
|
3267
|
+
height: '32',
|
|
3268
|
+
fontSize: '$14',
|
|
3269
|
+
cursor: 'pointer',
|
|
3270
|
+
transition: 'all 0.35s',
|
|
3271
|
+
color: '$foreground',
|
|
3272
|
+
'&:hover': {
|
|
3273
|
+
backgroundColor: '$success700',
|
|
3274
|
+
color: '$background'
|
|
3275
|
+
},
|
|
3276
|
+
variants: {
|
|
3277
|
+
selected: {
|
|
3278
|
+
"true": {
|
|
3279
|
+
backgroundColor: '$success',
|
|
3280
|
+
color: '$background'
|
|
3281
|
+
},
|
|
3282
|
+
"false": {
|
|
3283
|
+
backgroundColor: '$background'
|
|
3284
|
+
}
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
});
|
|
3288
|
+
function Chip(props) {
|
|
3289
|
+
var label = props.label,
|
|
3290
|
+
selected = props.selected,
|
|
3291
|
+
prefix = props.prefix,
|
|
3292
|
+
suffix = props.suffix,
|
|
3293
|
+
onClick = props.onClick,
|
|
3294
|
+
style = props.style;
|
|
3295
|
+
return React__default.createElement(ChipCointainer, {
|
|
3296
|
+
selected: selected,
|
|
3297
|
+
onClick: onClick,
|
|
3298
|
+
style: style
|
|
3299
|
+
}, prefix || null, label, suffix || null);
|
|
3300
|
+
}
|
|
3301
|
+
|
|
3302
|
+
var BackDrop = /*#__PURE__*/styled('div', {
|
|
3303
|
+
position: 'fixed',
|
|
3304
|
+
display: 'flex',
|
|
3305
|
+
justifyContent: 'center',
|
|
3306
|
+
alignItems: 'center',
|
|
3307
|
+
top: '0',
|
|
3308
|
+
left: '0',
|
|
3309
|
+
width: '100vw',
|
|
3310
|
+
height: '100vh',
|
|
3311
|
+
backgroundColor: 'rgba(0,0,0,.1)'
|
|
3312
|
+
});
|
|
3313
|
+
var ModalContainer = /*#__PURE__*/styled('div', {
|
|
3314
|
+
backgroundColor: '$background',
|
|
3315
|
+
borderRadius: '$10',
|
|
3316
|
+
padding: '$16 $16',
|
|
3317
|
+
display: 'flex',
|
|
3318
|
+
flexDirection: 'column',
|
|
3319
|
+
boxShadow: '$s',
|
|
3320
|
+
zIndex: 10
|
|
3321
|
+
});
|
|
3322
|
+
var Row = /*#__PURE__*/styled('div', {
|
|
3323
|
+
display: 'flex',
|
|
3324
|
+
alignItems: 'center'
|
|
3325
|
+
});
|
|
3326
|
+
var ModalHeader = /*#__PURE__*/styled('div', {
|
|
3327
|
+
display: 'flex',
|
|
3328
|
+
justifyContent: 'space-between',
|
|
3329
|
+
alignItems: 'center',
|
|
3330
|
+
position: 'relative',
|
|
3331
|
+
marginBottom: '$16'
|
|
3332
|
+
});
|
|
3333
|
+
var ContentContainer$1 = /*#__PURE__*/styled('div', {});
|
|
3334
|
+
function Modal(props) {
|
|
3335
|
+
var title = props.title,
|
|
3336
|
+
content = props.content,
|
|
3337
|
+
open = props.open,
|
|
3338
|
+
onClose = props.onClose,
|
|
3339
|
+
containerStyle = props.containerStyle,
|
|
3340
|
+
action = props.action,
|
|
3341
|
+
contentStyle = props.contentStyle;
|
|
3342
|
+
var handleBackDropClick = function handleBackDropClick(event) {
|
|
3343
|
+
if (event.target === event.currentTarget) onClose();
|
|
3344
|
+
};
|
|
3345
|
+
React.useEffect(function () {
|
|
3346
|
+
if (open) document.body.style.overflow = 'hidden';else document.body.style.overflow = 'unset';
|
|
3347
|
+
}, [open]);
|
|
3348
|
+
return React__default.createElement(React__default.Fragment, null, open && reactDom.createPortal(React__default.createElement(BackDrop, {
|
|
3349
|
+
onClick: handleBackDropClick
|
|
3350
|
+
}, React__default.createElement(ModalContainer, {
|
|
3351
|
+
style: containerStyle
|
|
3352
|
+
}, React__default.createElement(ModalHeader, null, React__default.createElement(Typography, {
|
|
3353
|
+
variant: "h4"
|
|
3354
|
+
}, title), React__default.createElement(Row, null, action, React__default.createElement(CloseIcon, {
|
|
3355
|
+
size: 24,
|
|
3356
|
+
onClick: onClose
|
|
3357
|
+
}))), React__default.createElement(ContentContainer$1, {
|
|
3358
|
+
style: contentStyle
|
|
3359
|
+
}, content))), document.body));
|
|
3360
|
+
}
|
|
3361
|
+
|
|
3362
|
+
(function (WalletState) {
|
|
3363
|
+
WalletState["NOT_INSTALLED"] = "not installed";
|
|
3364
|
+
WalletState["DISCONNECTED"] = "disconnected";
|
|
3365
|
+
WalletState["CONNECTING"] = "connecting";
|
|
3366
|
+
WalletState["CONNECTED"] = "connected";
|
|
3367
|
+
})(exports.WalletState || (exports.WalletState = {}));
|
|
3368
|
+
|
|
3369
|
+
var StateIconContainer = /*#__PURE__*/styled('span', {
|
|
3370
|
+
display: 'flex',
|
|
3371
|
+
justifyContent: 'center',
|
|
3372
|
+
alignItems: 'center'
|
|
3373
|
+
});
|
|
3374
|
+
var State = function State(_ref) {
|
|
3375
|
+
var walletState = _ref.walletState,
|
|
3376
|
+
installLink = _ref.installLink;
|
|
3377
|
+
return React__default.createElement(React.Fragment, null, walletState !== exports.WalletState.DISCONNECTED && React__default.createElement(StateIconContainer, null, walletState === exports.WalletState.NOT_INSTALLED && React__default.createElement("a", {
|
|
3378
|
+
href: walletsShared.detectInstallLink(installLink),
|
|
3379
|
+
target: "_blank"
|
|
3380
|
+
}, React__default.createElement(DownloadIcon, {
|
|
3381
|
+
size: 24,
|
|
3382
|
+
color: "success"
|
|
3383
|
+
})), walletState === exports.WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === exports.WalletState.CONNECTED && React__default.createElement(DisconnectIcon, null)));
|
|
3384
|
+
};
|
|
3385
|
+
|
|
3386
|
+
var WalletImage = /*#__PURE__*/styled('img', {
|
|
3387
|
+
width: '$24',
|
|
3058
3388
|
height: '$24',
|
|
3059
3389
|
marginRight: '$12'
|
|
3060
3390
|
});
|
|
@@ -3084,7 +3414,7 @@ function Wallet(props) {
|
|
|
3084
3414
|
installLink = props.installLink;
|
|
3085
3415
|
return React__default.createElement(ExtendedButton, {
|
|
3086
3416
|
type: state === exports.WalletState.CONNECTED ? 'primary' : undefined,
|
|
3087
|
-
disabled:
|
|
3417
|
+
disabled: state == exports.WalletState.CONNECTING,
|
|
3088
3418
|
onClick: function onClick() {
|
|
3089
3419
|
if (state === exports.WalletState.NOT_INSTALLED) {
|
|
3090
3420
|
window.open(walletsShared.detectInstallLink(installLink), '_blank');
|
|
@@ -3191,14 +3521,21 @@ var groupLiquiditySources = function groupLiquiditySources(liquiditySources) {
|
|
|
3191
3521
|
})
|
|
3192
3522
|
};
|
|
3193
3523
|
};
|
|
3524
|
+
var MainContainer$1 = /*#__PURE__*/styled('div', {
|
|
3525
|
+
variants: {
|
|
3526
|
+
loaded: {
|
|
3527
|
+
"true": {
|
|
3528
|
+
overflowY: 'auto'
|
|
3529
|
+
}
|
|
3530
|
+
}
|
|
3531
|
+
}
|
|
3532
|
+
});
|
|
3194
3533
|
var LiquiditySourceType = /*#__PURE__*/styled('div', {
|
|
3195
3534
|
position: 'sticky',
|
|
3196
3535
|
display: 'flex',
|
|
3197
3536
|
justifyContent: 'space-between',
|
|
3198
3537
|
alignItems: 'center',
|
|
3199
3538
|
top: '0',
|
|
3200
|
-
marginTop: '$8',
|
|
3201
|
-
marginBottom: '$8',
|
|
3202
3539
|
backgroundColor: '$background',
|
|
3203
3540
|
zIndex: '9999',
|
|
3204
3541
|
paddingTop: '$8',
|
|
@@ -3209,10 +3546,16 @@ var LiquidityImage = /*#__PURE__*/styled('img', {
|
|
|
3209
3546
|
maxHeight: '$20',
|
|
3210
3547
|
marginRight: '$16'
|
|
3211
3548
|
});
|
|
3549
|
+
var LoaderContainer$1 = /*#__PURE__*/styled('div', {
|
|
3550
|
+
display: 'flex',
|
|
3551
|
+
justifyContent: 'center'
|
|
3552
|
+
});
|
|
3212
3553
|
function LiquiditySourceList(props) {
|
|
3213
3554
|
var list = props.list,
|
|
3214
3555
|
onChange = props.onChange,
|
|
3215
|
-
listContainerStyle = props.listContainerStyle
|
|
3556
|
+
listContainerStyle = props.listContainerStyle,
|
|
3557
|
+
loadingStatus = props.loadingStatus,
|
|
3558
|
+
searchedFor = props.searchedFor;
|
|
3216
3559
|
var _useState = React.useState(list.filter(function (item) {
|
|
3217
3560
|
return item.selected;
|
|
3218
3561
|
})),
|
|
@@ -3246,10 +3589,9 @@ function LiquiditySourceList(props) {
|
|
|
3246
3589
|
// TODO: This is not performant
|
|
3247
3590
|
var totalSelectedBridges = bridges.filter(isSelected).length;
|
|
3248
3591
|
var totalSelectedExchanges = exchanges.filter(isSelected).length;
|
|
3249
|
-
return React__default.createElement(
|
|
3250
|
-
style:
|
|
3251
|
-
|
|
3252
|
-
}, listContainerStyle)
|
|
3592
|
+
return React__default.createElement(MainContainer$1, {
|
|
3593
|
+
style: listContainerStyle,
|
|
3594
|
+
loaded: loadingStatus === 'success'
|
|
3253
3595
|
}, React__default.createElement("div", null, React__default.createElement(LiquiditySourceType, null, React__default.createElement(Typography, {
|
|
3254
3596
|
variant: "h5"
|
|
3255
3597
|
}, "Bridges"), React__default.createElement(Typography, {
|
|
@@ -3258,14 +3600,19 @@ function LiquiditySourceList(props) {
|
|
|
3258
3600
|
}, totalSelectedBridges === totalBridges ? totalBridges : totalSelectedBridges + " / " + totalBridges)), React__default.createElement(Spacer, {
|
|
3259
3601
|
size: 12,
|
|
3260
3602
|
direction: "vertical"
|
|
3261
|
-
}),
|
|
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) {
|
|
3262
3606
|
return React__default.createElement(LiquiditySourceItem, {
|
|
3263
3607
|
liquiditySource: liquiditySource,
|
|
3264
3608
|
key: index,
|
|
3265
3609
|
selected: isSelected(liquiditySource),
|
|
3266
3610
|
onChange: changeLiquiditySources
|
|
3267
3611
|
});
|
|
3268
|
-
})
|
|
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, {
|
|
3269
3616
|
variant: "h5"
|
|
3270
3617
|
}, "Exchanges"), React__default.createElement(Typography, {
|
|
3271
3618
|
variant: "body1",
|
|
@@ -3273,14 +3620,19 @@ function LiquiditySourceList(props) {
|
|
|
3273
3620
|
}, totalSelectedExchanges === totalExchanges ? totalExchanges : totalSelectedExchanges + " / " + totalExchanges)), React__default.createElement(Spacer, {
|
|
3274
3621
|
size: 12,
|
|
3275
3622
|
direction: "vertical"
|
|
3276
|
-
}),
|
|
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) {
|
|
3277
3626
|
return React__default.createElement(LiquiditySourceItem, {
|
|
3278
3627
|
liquiditySource: liquiditySource,
|
|
3279
3628
|
key: index,
|
|
3280
3629
|
selected: isSelected(liquiditySource),
|
|
3281
3630
|
onChange: changeLiquiditySources
|
|
3282
3631
|
});
|
|
3283
|
-
})
|
|
3632
|
+
}) : React__default.createElement(NotFoundAlert, {
|
|
3633
|
+
catergory: "Exchange",
|
|
3634
|
+
searchedFor: searchedFor
|
|
3635
|
+
}))));
|
|
3284
3636
|
}
|
|
3285
3637
|
var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
|
|
3286
3638
|
var liquiditySource = _ref.liquiditySource,
|
|
@@ -3310,22 +3662,19 @@ var filterLiquiditySources = function filterLiquiditySources(liquiditySources, s
|
|
|
3310
3662
|
return containsText(liquiditySource.title, searchedFor || '');
|
|
3311
3663
|
});
|
|
3312
3664
|
};
|
|
3313
|
-
var ActionButton = /*#__PURE__*/styled(Button, {
|
|
3314
|
-
position: 'absolute',
|
|
3315
|
-
right: 0
|
|
3316
|
-
});
|
|
3317
3665
|
function LiquiditySourcesSelector(props) {
|
|
3318
3666
|
var list = props.list,
|
|
3319
3667
|
onChange = props.onChange,
|
|
3320
3668
|
onBack = props.onBack,
|
|
3321
3669
|
hasHeader = props.hasHeader,
|
|
3322
3670
|
listContainerStyle = props.listContainerStyle,
|
|
3323
|
-
toggleAll = props.toggleAll
|
|
3671
|
+
toggleAll = props.toggleAll,
|
|
3672
|
+
loadingStatus = props.loadingStatus;
|
|
3324
3673
|
return React__default.createElement(SecondaryPage, {
|
|
3325
3674
|
textField: true,
|
|
3326
3675
|
textFieldPlaceholder: "Search By Name",
|
|
3327
3676
|
title: "Liquidity Sources",
|
|
3328
|
-
TopButton: React__default.createElement(
|
|
3677
|
+
TopButton: React__default.createElement(Button, {
|
|
3329
3678
|
variant: "ghost",
|
|
3330
3679
|
type: "primary",
|
|
3331
3680
|
onClick: toggleAll
|
|
@@ -3338,7 +3687,9 @@ function LiquiditySourcesSelector(props) {
|
|
|
3338
3687
|
return React__default.createElement(LiquiditySourceList, {
|
|
3339
3688
|
listContainerStyle: listContainerStyle,
|
|
3340
3689
|
list: filterLiquiditySources(list, searchedFor),
|
|
3341
|
-
onChange: onChange
|
|
3690
|
+
onChange: onChange,
|
|
3691
|
+
loadingStatus: loadingStatus,
|
|
3692
|
+
searchedFor: searchedFor
|
|
3342
3693
|
});
|
|
3343
3694
|
});
|
|
3344
3695
|
}
|
|
@@ -3440,7 +3791,9 @@ function SelectableWalletList(_ref) {
|
|
|
3440
3791
|
height: 24
|
|
3441
3792
|
}), React__default.createElement(Typography, {
|
|
3442
3793
|
variant: "body2"
|
|
3443
|
-
}, w.name), React__default.createElement(
|
|
3794
|
+
}, w.name), React__default.createElement(Typography, {
|
|
3795
|
+
variant: "caption"
|
|
3796
|
+
}, getConciseAddress(w.address)), React__default.createElement(Circle, {
|
|
3444
3797
|
checked: checked
|
|
3445
3798
|
}, React__default.createElement(SolidCircle, {
|
|
3446
3799
|
checked: checked
|
|
@@ -3585,7 +3938,8 @@ function Settings(props) {
|
|
|
3585
3938
|
selectedTheme = props.selectedTheme,
|
|
3586
3939
|
onThemeChange = props.onThemeChange,
|
|
3587
3940
|
toggleInfiniteApprove = props.toggleInfiniteApprove,
|
|
3588
|
-
infiniteApprove = props.infiniteApprove
|
|
3941
|
+
infiniteApprove = props.infiniteApprove,
|
|
3942
|
+
loadingStatus = props.loadingStatus;
|
|
3589
3943
|
var _useState = React.useState(props.selectedSlippage),
|
|
3590
3944
|
selectedSlippage = _useState[0],
|
|
3591
3945
|
setSelectedSlippage = _useState[1];
|
|
@@ -3653,14 +4007,21 @@ function Settings(props) {
|
|
|
3653
4007
|
}, "Infinite Approval"), React__default.createElement(Switch, {
|
|
3654
4008
|
checked: infiniteApprove,
|
|
3655
4009
|
onChange: toggleInfiniteApprove
|
|
3656
|
-
})), React__default.createElement(LiquiditySourceContainer, {
|
|
3657
|
-
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))
|
|
3658
4022
|
}, React__default.createElement(Typography, {
|
|
3659
4023
|
variant: "body1"
|
|
3660
|
-
}, "Liquidity Sources")
|
|
3661
|
-
variant: "body2",
|
|
3662
|
-
color: "neutrals800"
|
|
3663
|
-
}, liquiditySources.length !== selectedLiquiditySources.length ? selectedLiquiditySources.length + " / " + liquiditySources.length : liquiditySources.length), React__default.createElement(StyledAngleRight, null))));
|
|
4024
|
+
}, "Liquidity Sources"))));
|
|
3664
4025
|
return React__default.createElement(SecondaryPage, {
|
|
3665
4026
|
title: "Settings",
|
|
3666
4027
|
textField: false,
|
|
@@ -3668,340 +4029,169 @@ function Settings(props) {
|
|
|
3668
4029
|
}, PageContent);
|
|
3669
4030
|
}
|
|
3670
4031
|
|
|
3671
|
-
var MainContainer$
|
|
4032
|
+
var MainContainer$2 = /*#__PURE__*/styled('div', {
|
|
4033
|
+
position: 'relative',
|
|
4034
|
+
display: 'flex',
|
|
4035
|
+
flexDirection: 'column',
|
|
3672
4036
|
borderRadius: '$10',
|
|
3673
|
-
maxWidth: '512px',
|
|
3674
4037
|
boxShadow: '$s',
|
|
3675
|
-
minWidth: '375px',
|
|
3676
4038
|
width: '100%',
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
flexDirection: 'column',
|
|
3681
|
-
alignItems: 'end',
|
|
4039
|
+
minWidth: '375px',
|
|
4040
|
+
maxWidth: '512px',
|
|
4041
|
+
maxHeight: '595px',
|
|
3682
4042
|
padding: '$16',
|
|
3683
4043
|
boxSizing: 'border-box',
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
4044
|
+
backgroundColor: '$background',
|
|
4045
|
+
variants: {
|
|
4046
|
+
fixedHeight: {
|
|
4047
|
+
"true": {
|
|
4048
|
+
height: '595px'
|
|
4049
|
+
},
|
|
4050
|
+
"false": {
|
|
4051
|
+
height: 'auto'
|
|
4052
|
+
}
|
|
4053
|
+
}
|
|
4054
|
+
}
|
|
3688
4055
|
});
|
|
3689
4056
|
function SwapContainer(props) {
|
|
3690
4057
|
var children = props.children,
|
|
3691
|
-
style = props.style
|
|
3692
|
-
|
|
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, {
|
|
3693
4062
|
style: style,
|
|
3694
|
-
id: "swap-box"
|
|
3695
|
-
|
|
4063
|
+
id: "swap-box",
|
|
4064
|
+
fixedHeight: fixedHeight
|
|
4065
|
+
}, children);
|
|
3696
4066
|
}
|
|
3697
4067
|
|
|
3698
|
-
var
|
|
3699
|
-
position: 'relative'
|
|
3700
|
-
});
|
|
3701
|
-
var ButtonContainer$1 = /*#__PURE__*/styled('div', {
|
|
3702
|
-
paddingTop: '$8'
|
|
3703
|
-
});
|
|
3704
|
-
var SwapContainer$1 = /*#__PURE__*/styled('div', {
|
|
4068
|
+
var TokenContainer = /*#__PURE__*/styled('div', {
|
|
3705
4069
|
display: 'flex',
|
|
3706
|
-
|
|
3707
|
-
'
|
|
3708
|
-
|
|
3709
|
-
},
|
|
3710
|
-
'&:hover': {
|
|
3711
|
-
borderColor: '$primary'
|
|
3712
|
-
},
|
|
3713
|
-
variants: {
|
|
3714
|
-
status: {
|
|
3715
|
-
failed: {
|
|
3716
|
-
borderColor: '$error'
|
|
3717
|
-
},
|
|
3718
|
-
running: {
|
|
3719
|
-
borderColor: '$neutrals400'
|
|
3720
|
-
},
|
|
3721
|
-
success: {
|
|
3722
|
-
borderColor: '$success'
|
|
3723
|
-
}
|
|
3724
|
-
}
|
|
4070
|
+
alignItems: 'center',
|
|
4071
|
+
'& .amount': {
|
|
4072
|
+
fontWeight: 'bold'
|
|
3725
4073
|
}
|
|
3726
4074
|
});
|
|
3727
|
-
var
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
width: '$20',
|
|
3735
|
-
border: '1px dashed $foreground',
|
|
3736
|
-
borderRadius: 'inherit',
|
|
3737
|
-
'@md': {
|
|
3738
|
-
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'
|
|
3739
4082
|
},
|
|
3740
|
-
'
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
width: '$8',
|
|
3751
|
-
height: '$8'
|
|
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'
|
|
3752
4093
|
}
|
|
3753
4094
|
});
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
}
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
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);
|
|
4111
|
+
}
|
|
4112
|
+
|
|
4113
|
+
var Container$4 = /*#__PURE__*/styled('div', {
|
|
4114
|
+
position: 'relative',
|
|
3767
4115
|
display: 'flex',
|
|
3768
|
-
justifyContent: '
|
|
3769
|
-
'
|
|
3770
|
-
|
|
3771
|
-
|
|
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'
|
|
3772
4140
|
}
|
|
3773
4141
|
});
|
|
3774
4142
|
function SwapDetail(_ref) {
|
|
3775
4143
|
var swap = _ref.swap,
|
|
3776
4144
|
status = _ref.status,
|
|
3777
|
-
onClick = _ref.onClick;
|
|
3778
|
-
var firstStep = swap.steps[0];
|
|
3779
|
-
var lastStep = swap.steps[swap.steps.length - 1];
|
|
3780
|
-
return React__default.createElement(
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
}, React__default.createElement(
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
})
|
|
3805
|
-
size:
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
}
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
threshold: 1
|
|
3828
|
-
}, function (_ref2) {
|
|
3829
|
-
var onItemsRendered = _ref2.onItemsRendered,
|
|
3830
|
-
ref = _ref2.ref;
|
|
3831
|
-
return React__default.createElement(reactWindow.VariableSizeList, {
|
|
3832
|
-
innerElementType: innerElementType,
|
|
3833
|
-
ref: ref,
|
|
3834
|
-
itemSize: function itemSize() {
|
|
3835
|
-
return size;
|
|
3836
|
-
},
|
|
3837
|
-
itemCount: itemCount,
|
|
3838
|
-
height: height || 0,
|
|
3839
|
-
width: width || 0,
|
|
3840
|
-
onItemsRendered: onItemsRendered
|
|
3841
|
-
}, function (_ref3) {
|
|
3842
|
-
var index = _ref3.index,
|
|
3843
|
-
style = _ref3.style;
|
|
3844
|
-
return isItemLoaded(index) ? React__default.createElement(Item, {
|
|
3845
|
-
index: index,
|
|
3846
|
-
style: style
|
|
3847
|
-
}) : null;
|
|
3848
|
-
});
|
|
3849
|
-
});
|
|
3850
|
-
});
|
|
3851
|
-
}
|
|
3852
|
-
|
|
3853
|
-
var TokenImage = /*#__PURE__*/styled('img', {
|
|
3854
|
-
width: '$32',
|
|
3855
|
-
maxHeight: '$32',
|
|
3856
|
-
marginRight: '$16'
|
|
3857
|
-
});
|
|
3858
|
-
var TokenNameContainer = /*#__PURE__*/styled('div', {
|
|
3859
|
-
display: 'flex',
|
|
3860
|
-
flexDirection: 'column'
|
|
3861
|
-
});
|
|
3862
|
-
var TokenAmountContainer = /*#__PURE__*/styled('div', {
|
|
3863
|
-
display: 'flex',
|
|
3864
|
-
flexDirection: 'column',
|
|
3865
|
-
alignItems: 'flex-end'
|
|
3866
|
-
});
|
|
3867
|
-
function TokenItem(props) {
|
|
3868
|
-
var _token$balance;
|
|
3869
|
-
var token = props.token,
|
|
3870
|
-
style = props.style,
|
|
3871
|
-
onClick = props.onClick,
|
|
3872
|
-
selected = props.selected;
|
|
3873
|
-
return React__default.createElement("div", {
|
|
3874
|
-
style: _extends({
|
|
3875
|
-
display: 'flex',
|
|
3876
|
-
alignItems: 'center',
|
|
3877
|
-
width: '100%'
|
|
3878
|
-
}, style, {
|
|
3879
|
-
height: '48px',
|
|
3880
|
-
top: parseFloat(style == null ? void 0 : style.top) + 0 + "px"
|
|
3881
|
-
})
|
|
3882
|
-
}, React__default.createElement(Button, {
|
|
3883
|
-
variant: "outlined",
|
|
3884
|
-
size: "large",
|
|
3885
|
-
align: "start",
|
|
3886
|
-
onClick: onClick.bind(null, token),
|
|
3887
|
-
type: selected ? 'primary' : undefined,
|
|
3888
|
-
prefix: React__default.createElement(TokenImage, {
|
|
3889
|
-
src: token.image
|
|
3890
|
-
}),
|
|
3891
|
-
suffix: ((_token$balance = token.balance) == null ? void 0 : _token$balance.amount) && React__default.createElement(TokenAmountContainer, null, React__default.createElement(Typography, {
|
|
3892
|
-
variant: "body2"
|
|
3893
|
-
}, token.balance.amount), React__default.createElement(Typography, {
|
|
3894
|
-
variant: "caption"
|
|
3895
|
-
}, token.balance.usdValue + "$"))
|
|
3896
|
-
}, React__default.createElement(TokenNameContainer, null, React__default.createElement(Typography, {
|
|
3897
|
-
variant: "body1"
|
|
3898
|
-
}, token.symbol), React__default.createElement(Typography, {
|
|
3899
|
-
variant: "body2"
|
|
3900
|
-
}, token.name))));
|
|
3901
|
-
}
|
|
3902
|
-
|
|
3903
|
-
var _excluded$G = ["style"];
|
|
3904
|
-
var PAGE_SIZE = 20;
|
|
3905
|
-
function TokenList(props) {
|
|
3906
|
-
var list = props.list,
|
|
3907
|
-
searchedText = props.searchedText,
|
|
3908
|
-
onChange = props.onChange,
|
|
3909
|
-
multiSelect = props.multiSelect,
|
|
3910
|
-
selectedList = props.selectedList;
|
|
3911
|
-
var _useState = React.useState(props.selected),
|
|
3912
|
-
selected = _useState[0],
|
|
3913
|
-
setSelected = _useState[1];
|
|
3914
|
-
var changeSelected = function changeSelected(token) {
|
|
3915
|
-
setSelected(token);
|
|
3916
|
-
onChange(token);
|
|
3917
|
-
};
|
|
3918
|
-
var isSelected = function isSelected(token) {
|
|
3919
|
-
if (multiSelect && selectedList) {
|
|
3920
|
-
return selectedList === 'all' || selectedList.map(function (item) {
|
|
3921
|
-
return item.symbol + item.address;
|
|
3922
|
-
}).indexOf(token.symbol + token.address) > -1;
|
|
3923
|
-
}
|
|
3924
|
-
return (selected == null ? void 0 : selected.symbol) === token.symbol && (selected == null ? void 0 : selected.address) === token.address;
|
|
3925
|
-
};
|
|
3926
|
-
var _useState2 = React.useState(true),
|
|
3927
|
-
hasNextPage = _useState2[0],
|
|
3928
|
-
setHasNextPage = _useState2[1];
|
|
3929
|
-
var _useState3 = React.useState(list),
|
|
3930
|
-
tokens = _useState3[0],
|
|
3931
|
-
setTokens = _useState3[1];
|
|
3932
|
-
var loadNextPage = function loadNextPage() {
|
|
3933
|
-
setTokens(list.slice(0, tokens.length + PAGE_SIZE));
|
|
3934
|
-
};
|
|
3935
|
-
React.useEffect(function () {
|
|
3936
|
-
setTokens(list.slice(0, PAGE_SIZE));
|
|
3937
|
-
}, [searchedText]);
|
|
3938
|
-
React.useEffect(function () {
|
|
3939
|
-
setHasNextPage(list.length > tokens.length);
|
|
3940
|
-
}, [tokens.length]);
|
|
3941
|
-
var innerElementType = React.forwardRef(function (_ref, ref) {
|
|
3942
|
-
var style = _ref.style,
|
|
3943
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
3944
|
-
return React__default.createElement("div", Object.assign({
|
|
3945
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3946
|
-
ref: ref,
|
|
3947
|
-
style: _extends({}, style, {
|
|
3948
|
-
height: parseFloat(style == null ? void 0 : style.height) + 8 * 2 + "px"
|
|
3949
|
-
})
|
|
3950
|
-
}, rest));
|
|
3951
|
-
});
|
|
3952
|
-
return React__default.createElement("div", {
|
|
3953
|
-
style: {
|
|
3954
|
-
height: '450px'
|
|
3955
|
-
}
|
|
3956
|
-
}, React__default.createElement(VirtualizedList, {
|
|
3957
|
-
Item: function Item(_ref2) {
|
|
3958
|
-
var index = _ref2.index,
|
|
3959
|
-
style = _ref2.style;
|
|
3960
|
-
return React__default.createElement(TokenItem, {
|
|
3961
|
-
token: tokens[index],
|
|
3962
|
-
style: style,
|
|
3963
|
-
onClick: changeSelected,
|
|
3964
|
-
selected: isSelected(tokens[index])
|
|
3965
|
-
});
|
|
3966
|
-
},
|
|
3967
|
-
hasNextPage: hasNextPage,
|
|
3968
|
-
itemCount: tokens.length,
|
|
3969
|
-
loadNextPage: loadNextPage,
|
|
3970
|
-
innerElementType: innerElementType,
|
|
3971
|
-
size: 56
|
|
3972
|
-
}));
|
|
3973
|
-
}
|
|
3974
|
-
|
|
3975
|
-
var filterTokens = function filterTokens(list, searchedFor) {
|
|
3976
|
-
return list.filter(function (token) {
|
|
3977
|
-
return containsText(token.symbol, searchedFor) || containsText(token.address || '', searchedFor) || containsText(token.name || '', searchedFor);
|
|
3978
|
-
});
|
|
3979
|
-
};
|
|
3980
|
-
function TokenSelector(props) {
|
|
3981
|
-
var list = props.list,
|
|
3982
|
-
type = props.type,
|
|
3983
|
-
selected = props.selected,
|
|
3984
|
-
onChange = props.onChange,
|
|
3985
|
-
hasHeader = props.hasHeader,
|
|
3986
|
-
multiSelect = props.multiSelect,
|
|
3987
|
-
selectedList = props.selectedList,
|
|
3988
|
-
onBack = props.onBack;
|
|
3989
|
-
return React__default.createElement(SecondaryPage, {
|
|
3990
|
-
textField: true,
|
|
3991
|
-
textFieldPlaceholder: "Search Blockchain By Name",
|
|
3992
|
-
title: "Select " + type + " Token",
|
|
3993
|
-
hasHeader: hasHeader,
|
|
3994
|
-
onBack: onBack
|
|
3995
|
-
}, function (searchedFor) {
|
|
3996
|
-
return React__default.createElement(TokenList, {
|
|
3997
|
-
searchedText: searchedFor,
|
|
3998
|
-
list: filterTokens(list, searchedFor),
|
|
3999
|
-
selected: selected,
|
|
4000
|
-
selectedList: selectedList,
|
|
4001
|
-
multiSelect: multiSelect,
|
|
4002
|
-
onChange: onChange
|
|
4003
|
-
});
|
|
4004
|
-
});
|
|
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)));
|
|
4005
4195
|
}
|
|
4006
4196
|
|
|
4007
4197
|
var Container$5 = /*#__PURE__*/styled('div', {
|
|
@@ -4175,129 +4365,15 @@ function Drawer(props) {
|
|
|
4175
4365
|
})), React__default.createElement(Body, null, content), React__default.createElement(Footer, null, footer))), container));
|
|
4176
4366
|
}
|
|
4177
4367
|
|
|
4178
|
-
var MainContainer$
|
|
4179
|
-
|
|
4180
|
-
});
|
|
4181
|
-
var Line$2 = /*#__PURE__*/styled('div', {
|
|
4182
|
-
width: '0',
|
|
4183
|
-
marginLeft: '$12',
|
|
4184
|
-
height: '36px',
|
|
4185
|
-
border: '1px dashed $foreground',
|
|
4186
|
-
borderRadius: 'inherit'
|
|
4187
|
-
});
|
|
4188
|
-
var SwapperContainer$1 = /*#__PURE__*/styled('div', {
|
|
4189
|
-
display: 'flex',
|
|
4190
|
-
alignItems: 'center',
|
|
4191
|
-
marginLeft: '6px'
|
|
4192
|
-
});
|
|
4193
|
-
var Fee = /*#__PURE__*/styled('div', {
|
|
4194
|
-
display: 'flex',
|
|
4195
|
-
alignItems: 'center'
|
|
4196
|
-
});
|
|
4197
|
-
var SwapperLogo$1 = /*#__PURE__*/styled('img', {
|
|
4198
|
-
width: '$16',
|
|
4199
|
-
height: '$16'
|
|
4200
|
-
});
|
|
4201
|
-
var RelativeContainer$1 = /*#__PURE__*/styled('div', {
|
|
4202
|
-
position: 'relative'
|
|
4203
|
-
});
|
|
4204
|
-
var Footer$1 = /*#__PURE__*/styled('div', {
|
|
4205
|
-
display: 'flex',
|
|
4206
|
-
alignItems: 'center'
|
|
4207
|
-
});
|
|
4208
|
-
var Dot$2 = /*#__PURE__*/styled('div', {
|
|
4209
|
-
width: '$8',
|
|
4210
|
-
height: '$8',
|
|
4211
|
-
backgroundColor: '$foreground',
|
|
4212
|
-
borderRadius: '4px',
|
|
4213
|
-
marginLeft: '$8'
|
|
4214
|
-
});
|
|
4215
|
-
var ArrowDown = /*#__PURE__*/styled('div', {
|
|
4216
|
-
width: '0px',
|
|
4217
|
-
height: '0px',
|
|
4218
|
-
borderLeft: '5px solid transparent',
|
|
4219
|
-
borderRight: '5px solid transparent',
|
|
4220
|
-
borderTop: '5px solid $foreground',
|
|
4221
|
-
marginLeft: '$8'
|
|
4222
|
-
});
|
|
4223
|
-
var BestRouteContainer$1 = /*#__PURE__*/styled('div', {
|
|
4224
|
-
overflow: 'auto'
|
|
4225
|
-
});
|
|
4226
|
-
var Alerts = /*#__PURE__*/styled('div', {
|
|
4227
|
-
paddingBottom: '$16'
|
|
4368
|
+
var MainContainer$3 = /*#__PURE__*/styled('div', {
|
|
4369
|
+
overflowY: 'auto'
|
|
4228
4370
|
});
|
|
4229
|
-
function ConfirmSwap(props) {
|
|
4230
|
-
var _bestRoute$result;
|
|
4231
|
-
var bestRoute = props.bestRoute,
|
|
4232
|
-
onBack = props.onBack,
|
|
4233
|
-
onConfirm = props.onConfirm,
|
|
4234
|
-
loading = props.loading,
|
|
4235
|
-
errors = props.errors,
|
|
4236
|
-
warnings = props.warnings,
|
|
4237
|
-
extraMessages = props.extraMessages,
|
|
4238
|
-
confirmButtonTitle = props.confirmButtonTitle,
|
|
4239
|
-
confirmButtonDisabled = props.confirmButtonDisabled;
|
|
4240
|
-
return React__default.createElement(SecondaryPage, {
|
|
4241
|
-
textField: false,
|
|
4242
|
-
title: "Swap",
|
|
4243
|
-
onBack: onBack,
|
|
4244
|
-
Footer: React__default.createElement(Footer$1, null, React__default.createElement(Button, {
|
|
4245
|
-
type: "primary",
|
|
4246
|
-
fullWidth: true,
|
|
4247
|
-
loading: loading,
|
|
4248
|
-
variant: "contained",
|
|
4249
|
-
onClick: onConfirm,
|
|
4250
|
-
disabled: confirmButtonDisabled
|
|
4251
|
-
}, confirmButtonTitle))
|
|
4252
|
-
}, 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) {
|
|
4253
|
-
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4254
|
-
direction: "vertical"
|
|
4255
|
-
}), React__default.createElement(Alert, {
|
|
4256
|
-
type: "error",
|
|
4257
|
-
key: index
|
|
4258
|
-
}, error));
|
|
4259
|
-
}), warnings == null ? void 0 : warnings.map(function (warning, index) {
|
|
4260
|
-
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4261
|
-
direction: "vertical"
|
|
4262
|
-
}), React__default.createElement(Alert, {
|
|
4263
|
-
type: "warning",
|
|
4264
|
-
key: index
|
|
4265
|
-
}, warning));
|
|
4266
|
-
}))), React__default.createElement(BestRouteContainer$1, null, bestRoute == null ? void 0 : (_bestRoute$result = bestRoute.result) == null ? void 0 : _bestRoute$result.swaps.map(function (swap, index) {
|
|
4267
|
-
var _bestRoute$result2;
|
|
4268
|
-
return React__default.createElement(React.Fragment, {
|
|
4269
|
-
key: index
|
|
4270
|
-
}, index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
|
|
4271
|
-
logo: swap.from.logo,
|
|
4272
|
-
symbol: swap.from.symbol,
|
|
4273
|
-
chainLogo: swap.from.blockchainLogo,
|
|
4274
|
-
blockchain: swap.from.blockchain,
|
|
4275
|
-
amount: swap.fromAmount
|
|
4276
|
-
}), React__default.createElement(Dot$2, null)), React__default.createElement(Line$2, null), React__default.createElement(SwapperContainer$1, null, React__default.createElement(SwapperLogo$1, {
|
|
4277
|
-
src: swap.swapperLogo,
|
|
4278
|
-
alt: swap.swapperId
|
|
4279
|
-
}), React__default.createElement("div", null, React__default.createElement(Typography, {
|
|
4280
|
-
ml: 4,
|
|
4281
|
-
variant: "caption"
|
|
4282
|
-
}, 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, {
|
|
4283
|
-
ml: 4,
|
|
4284
|
-
variant: "caption"
|
|
4285
|
-
}, "$", 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, {
|
|
4286
|
-
logo: swap.to.logo,
|
|
4287
|
-
symbol: swap.to.symbol,
|
|
4288
|
-
chainLogo: swap.to.blockchainLogo,
|
|
4289
|
-
blockchain: swap.to.blockchain,
|
|
4290
|
-
amount: swap.toAmount
|
|
4291
|
-
}));
|
|
4292
|
-
}))));
|
|
4293
|
-
}
|
|
4294
|
-
|
|
4295
4371
|
var Section = /*#__PURE__*/styled('div', {
|
|
4296
4372
|
paddingBottom: '$32',
|
|
4297
4373
|
marginBottom: '$32',
|
|
4298
4374
|
borderBottom: '1px solid $neutrals400'
|
|
4299
4375
|
});
|
|
4300
|
-
var Footer$
|
|
4376
|
+
var Footer$1 = /*#__PURE__*/styled('div', {
|
|
4301
4377
|
display: 'flex',
|
|
4302
4378
|
alignItems: 'center'
|
|
4303
4379
|
});
|
|
@@ -4327,7 +4403,10 @@ var Container$6 = /*#__PURE__*/styled('div', {
|
|
|
4327
4403
|
alignItems: 'center'
|
|
4328
4404
|
}
|
|
4329
4405
|
});
|
|
4330
|
-
|
|
4406
|
+
var Alerts = /*#__PURE__*/styled('div', {
|
|
4407
|
+
paddingBottom: '$16'
|
|
4408
|
+
});
|
|
4409
|
+
function ConfirmSwap(props) {
|
|
4331
4410
|
var onBack = props.onBack,
|
|
4332
4411
|
loading = props.loading,
|
|
4333
4412
|
onConfirm = props.onConfirm,
|
|
@@ -4336,20 +4415,38 @@ function ConfirmWallets(props) {
|
|
|
4336
4415
|
onChange = props.onChange,
|
|
4337
4416
|
confirmDisabled = props.confirmDisabled,
|
|
4338
4417
|
isExperimentalChain = props.isExperimentalChain,
|
|
4339
|
-
handleConnectChain = props.handleConnectChain
|
|
4418
|
+
handleConnectChain = props.handleConnectChain,
|
|
4419
|
+
confirmButtonTitle = props.confirmButtonTitle,
|
|
4420
|
+
errors = props.errors,
|
|
4421
|
+
warnings = props.warnings,
|
|
4422
|
+
extraMessages = props.extraMessages;
|
|
4340
4423
|
return React__default.createElement(SecondaryPage, {
|
|
4341
4424
|
textField: false,
|
|
4342
4425
|
title: "Confirm Swap",
|
|
4343
4426
|
onBack: onBack,
|
|
4344
|
-
Footer: React__default.createElement(Footer$
|
|
4427
|
+
Footer: React__default.createElement(Footer$1, null, React__default.createElement(ConfirmButton, {
|
|
4345
4428
|
fullWidth: true,
|
|
4346
4429
|
loading: loading,
|
|
4347
4430
|
type: "primary",
|
|
4348
4431
|
variant: "contained",
|
|
4349
4432
|
onClick: onConfirm,
|
|
4350
4433
|
disabled: confirmDisabled
|
|
4351
|
-
},
|
|
4352
|
-
},
|
|
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) {
|
|
4436
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4437
|
+
direction: "vertical"
|
|
4438
|
+
}), React__default.createElement(Alert, {
|
|
4439
|
+
type: "error",
|
|
4440
|
+
key: index
|
|
4441
|
+
}, error));
|
|
4442
|
+
}), warnings == null ? void 0 : warnings.map(function (warning, index) {
|
|
4443
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4444
|
+
direction: "vertical"
|
|
4445
|
+
}), React__default.createElement(Alert, {
|
|
4446
|
+
type: "warning",
|
|
4447
|
+
key: index
|
|
4448
|
+
}, warning));
|
|
4449
|
+
}))), props.previewInputs || props.previewRoutes ? React__default.createElement(Section, null, props.previewInputs, !!props.previewRoutes ? React__default.createElement(Spacer, {
|
|
4353
4450
|
size: 16,
|
|
4354
4451
|
direction: "vertical"
|
|
4355
4452
|
}) : null, props.previewRoutes) : null, requiredWallets.map(function (wallet, index) {
|
|
@@ -4379,34 +4476,16 @@ function ConfirmWallets(props) {
|
|
|
4379
4476
|
list: list,
|
|
4380
4477
|
onChange: onChange
|
|
4381
4478
|
}));
|
|
4382
|
-
}));
|
|
4383
|
-
}
|
|
4384
|
-
|
|
4385
|
-
function groupingOfSwaps(list) {
|
|
4386
|
-
return list.reduce(function (acc, swap) {
|
|
4387
|
-
var categoryIndex = acc.findIndex(function (item) {
|
|
4388
|
-
return swap.status === 'running' && item.title == 'Active Swaps' || swap.status !== 'running' && item.title == 'Recent Swaps';
|
|
4389
|
-
});
|
|
4390
|
-
if (categoryIndex > -1) {
|
|
4391
|
-
acc[categoryIndex].swaps.push(swap);
|
|
4392
|
-
} else {
|
|
4393
|
-
acc.push({
|
|
4394
|
-
title: swap.status === 'running' ? 'Active Swaps' : 'Recent Swaps',
|
|
4395
|
-
swaps: [swap]
|
|
4396
|
-
});
|
|
4397
|
-
}
|
|
4398
|
-
return acc;
|
|
4399
|
-
}, []);
|
|
4479
|
+
})));
|
|
4400
4480
|
}
|
|
4401
4481
|
|
|
4402
|
-
var
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
alignItems: 'center'
|
|
4482
|
+
var Group = /*#__PURE__*/styled('div', {
|
|
4483
|
+
'.group-title': {
|
|
4484
|
+
textTransform: 'uppercase'
|
|
4485
|
+
}
|
|
4407
4486
|
});
|
|
4408
|
-
var
|
|
4409
|
-
|
|
4487
|
+
var Container$7 = /*#__PURE__*/styled('div', {
|
|
4488
|
+
overflowY: 'auto'
|
|
4410
4489
|
});
|
|
4411
4490
|
var filteredHistory = function filteredHistory(list, searchedFor) {
|
|
4412
4491
|
return list.filter(function (swap) {
|
|
@@ -4415,30 +4494,34 @@ var filteredHistory = function filteredHistory(list, searchedFor) {
|
|
|
4415
4494
|
return containsText(firstStep.fromBlockchain, searchedFor) || containsText(firstStep.fromSymbol, searchedFor) || containsText(lastStep.toBlockchain, searchedFor) || containsText(lastStep.toSymbol, searchedFor) || containsText(swap.requestId, searchedFor);
|
|
4416
4495
|
});
|
|
4417
4496
|
};
|
|
4418
|
-
var Group = /*#__PURE__*/styled('div', {
|
|
4419
|
-
marginBottom: '$24',
|
|
4420
|
-
paddingRight: '$8',
|
|
4421
|
-
maxHeight: '600px'
|
|
4422
|
-
});
|
|
4423
|
-
var GroupTitle = /*#__PURE__*/styled(Typography, {
|
|
4424
|
-
color: '$neutrals500'
|
|
4425
|
-
});
|
|
4426
4497
|
var SwapsGroup = function SwapsGroup(props) {
|
|
4427
4498
|
var list = props.list,
|
|
4428
|
-
onSwapClick = props.onSwapClick
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
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, {
|
|
4432
4509
|
key: index
|
|
4433
|
-
}, React__default.createElement(
|
|
4434
|
-
variant: "body2"
|
|
4510
|
+
}, React__default.createElement(Typography, {
|
|
4511
|
+
variant: "body2",
|
|
4512
|
+
color: "neutrals600",
|
|
4513
|
+
className: "group-title"
|
|
4435
4514
|
}, group.title), group.swaps.map(function (swap, index) {
|
|
4436
|
-
return React__default.createElement(SwapDetail, {
|
|
4515
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(SwapDetail, {
|
|
4437
4516
|
key: index,
|
|
4438
4517
|
swap: swap,
|
|
4439
4518
|
status: swap.status,
|
|
4440
4519
|
onClick: onSwapClick
|
|
4441
|
-
})
|
|
4520
|
+
}), React__default.createElement(Divider, {
|
|
4521
|
+
size: 12
|
|
4522
|
+
}));
|
|
4523
|
+
})), React__default.createElement(Divider, {
|
|
4524
|
+
size: 24
|
|
4442
4525
|
}));
|
|
4443
4526
|
}));
|
|
4444
4527
|
};
|
|
@@ -4446,28 +4529,126 @@ function History(_ref) {
|
|
|
4446
4529
|
var _ref$list = _ref.list,
|
|
4447
4530
|
list = _ref$list === void 0 ? [] : _ref$list,
|
|
4448
4531
|
onBack = _ref.onBack,
|
|
4449
|
-
onSwapClick = _ref.onSwapClick
|
|
4532
|
+
onSwapClick = _ref.onSwapClick,
|
|
4533
|
+
groupBy = _ref.groupBy;
|
|
4450
4534
|
return React__default.createElement(SecondaryPage, {
|
|
4451
4535
|
onBack: onBack,
|
|
4452
4536
|
textField: true,
|
|
4453
|
-
textFieldPlaceholder: "Search By Blockchain Or Token",
|
|
4537
|
+
textFieldPlaceholder: "Search By Blockchain Or Token Or Request ID",
|
|
4454
4538
|
title: "Swaps"
|
|
4455
4539
|
}, function (searchedFor) {
|
|
4456
4540
|
var filterSwaps = filteredHistory(list, searchedFor);
|
|
4457
|
-
return filterSwaps.length ? React__default.createElement(SwapsGroup, {
|
|
4541
|
+
return React__default.createElement(Container$7, null, filterSwaps.length ? React__default.createElement(SwapsGroup, {
|
|
4458
4542
|
list: filterSwaps,
|
|
4459
|
-
onSwapClick: onSwapClick
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4543
|
+
onSwapClick: onSwapClick,
|
|
4544
|
+
groupBy: groupBy
|
|
4545
|
+
}) : React__default.createElement(NotFoundAlert, {
|
|
4546
|
+
catergory: "Swap"
|
|
4547
|
+
}));
|
|
4463
4548
|
});
|
|
4464
4549
|
}
|
|
4465
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
|
+
});
|
|
4466
4641
|
var StyledAnchor = /*#__PURE__*/styled('a', {
|
|
4467
4642
|
color: '$primary',
|
|
4468
4643
|
fontWeight: '$600',
|
|
4469
4644
|
marginLeft: '$12'
|
|
4470
4645
|
});
|
|
4646
|
+
var SwapInfoContainer = /*#__PURE__*/styled('div', {
|
|
4647
|
+
display: 'flex',
|
|
4648
|
+
flexDirection: 'column',
|
|
4649
|
+
paddingBottom: '$16',
|
|
4650
|
+
borderBottom: '1px solid $neutrals300'
|
|
4651
|
+
});
|
|
4471
4652
|
var InternalDetailsContainer = /*#__PURE__*/styled('div', {
|
|
4472
4653
|
display: 'flex'
|
|
4473
4654
|
});
|
|
@@ -4486,30 +4667,51 @@ var Description = /*#__PURE__*/styled(Typography, {
|
|
|
4486
4667
|
var Error = /*#__PURE__*/styled(Description, {
|
|
4487
4668
|
color: '$error'
|
|
4488
4669
|
});
|
|
4489
|
-
var Line$
|
|
4670
|
+
var Line$1 = /*#__PURE__*/styled('div', {
|
|
4490
4671
|
width: '0',
|
|
4491
4672
|
minHeight: '$16',
|
|
4492
4673
|
marginLeft: '$12',
|
|
4493
4674
|
border: '1px dashed $foreground',
|
|
4494
4675
|
borderRadius: 'inherit'
|
|
4495
4676
|
});
|
|
4496
|
-
var
|
|
4497
|
-
cursor: 'pointer',
|
|
4498
|
-
backgroundColor: '$neutrals200',
|
|
4499
|
-
padding: '$4',
|
|
4677
|
+
var Row$2 = /*#__PURE__*/styled('div', {
|
|
4500
4678
|
display: 'flex',
|
|
4501
|
-
justifyContent: '
|
|
4679
|
+
justifyContent: 'space-between',
|
|
4502
4680
|
alignItems: 'center',
|
|
4503
|
-
|
|
4504
|
-
|
|
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
|
+
}
|
|
4505
4701
|
});
|
|
4506
|
-
var RequestId = /*#__PURE__*/styled(
|
|
4507
|
-
|
|
4702
|
+
var RequestId = /*#__PURE__*/styled('div', {
|
|
4703
|
+
width: '150px',
|
|
4704
|
+
whiteSpace: 'nowrap',
|
|
4705
|
+
overflow: 'hidden',
|
|
4706
|
+
textOverflow: 'ellipsis',
|
|
4707
|
+
'@md': {
|
|
4708
|
+
width: 'auto'
|
|
4709
|
+
}
|
|
4508
4710
|
});
|
|
4509
|
-
var
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4711
|
+
var ExtraDetails = /*#__PURE__*/styled('div', {
|
|
4712
|
+
padding: '$8 0',
|
|
4713
|
+
color: '$neutrals600',
|
|
4714
|
+
fontSize: '$12'
|
|
4513
4715
|
});
|
|
4514
4716
|
var StepContainer$1 = /*#__PURE__*/styled('div', {
|
|
4515
4717
|
variants: {
|
|
@@ -4525,43 +4727,57 @@ var StepContainer$1 = /*#__PURE__*/styled('div', {
|
|
|
4525
4727
|
}
|
|
4526
4728
|
}
|
|
4527
4729
|
});
|
|
4730
|
+
var SwapFlowContainer = /*#__PURE__*/styled('div', {
|
|
4731
|
+
overflowY: 'auto'
|
|
4732
|
+
});
|
|
4528
4733
|
function SwapHistory(props) {
|
|
4529
4734
|
var pendingSwap = props.pendingSwap,
|
|
4530
4735
|
onBack = props.onBack,
|
|
4531
4736
|
onCopy = props.onCopy,
|
|
4532
4737
|
isCopied = props.isCopied,
|
|
4533
|
-
onCancel = props.onCancel
|
|
4738
|
+
onCancel = props.onCancel,
|
|
4739
|
+
date = props.date,
|
|
4740
|
+
onRetry = props.onRetry,
|
|
4741
|
+
extraMessageProps = _objectWithoutPropertiesLoose(props, _excluded$I);
|
|
4534
4742
|
var _useState = React.useState(false),
|
|
4535
4743
|
showDrawer = _useState[0],
|
|
4536
4744
|
setShowDrawer = _useState[1];
|
|
4537
4745
|
return React__default.createElement(SecondaryPage, {
|
|
4538
4746
|
title: "Swap Details",
|
|
4539
4747
|
textField: false,
|
|
4540
|
-
onBack: onBack
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
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",
|
|
4548
4764
|
onClick: onCopy.bind(null, pendingSwap == null ? void 0 : pendingSwap.requestId)
|
|
4549
|
-
}, React__default.createElement(RequestId, {
|
|
4550
|
-
|
|
4551
|
-
}
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
}
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
}, 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) {
|
|
4565
4781
|
return React__default.createElement(StepContainer$1, {
|
|
4566
4782
|
key: index,
|
|
4567
4783
|
hasNotStarted: step.status === 'created',
|
|
@@ -4569,23 +4785,31 @@ function SwapHistory(props) {
|
|
|
4569
4785
|
}, index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
|
|
4570
4786
|
logo: step.fromLogo,
|
|
4571
4787
|
symbol: step.fromSymbol,
|
|
4788
|
+
// @ts-ignore
|
|
4572
4789
|
chainLogo: step.fromBlockchainLogo,
|
|
4573
4790
|
blockchain: step.fromBlockchain,
|
|
4574
4791
|
amount: pendingSwap.inputAmount
|
|
4575
|
-
}), 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
|
|
4576
4796
|
src: step.swapperLogo,
|
|
4577
4797
|
alt: step.swapperId
|
|
4578
4798
|
}), React__default.createElement("div", null, React__default.createElement(Typography, {
|
|
4579
4799
|
ml: 4,
|
|
4580
4800
|
variant: "caption"
|
|
4581
|
-
},
|
|
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, {
|
|
4582
4804
|
ml: 4,
|
|
4583
4805
|
variant: "caption"
|
|
4584
|
-
}, "$",
|
|
4806
|
+
}, "$",
|
|
4807
|
+
// @ts-ignore
|
|
4808
|
+
step.feeInUsd, ' ', "estimated gas fee")))), React__default.createElement("div", {
|
|
4585
4809
|
style: {
|
|
4586
4810
|
display: 'flex'
|
|
4587
4811
|
}
|
|
4588
|
-
}, 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) {
|
|
4589
4813
|
return React__default.createElement(InternalDetail, {
|
|
4590
4814
|
key: index
|
|
4591
4815
|
}, React__default.createElement(DescriptionContainer, null, React__default.createElement(CheckCircleIcon, {
|
|
@@ -4605,28 +4829,25 @@ function SwapHistory(props) {
|
|
|
4605
4829
|
}, "Step failed")))))), index + 1 === pendingSwap.steps.length && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
|
|
4606
4830
|
logo: step.toLogo,
|
|
4607
4831
|
symbol: step.toSymbol,
|
|
4832
|
+
// @ts-ignore
|
|
4608
4833
|
chainLogo: step.toBlockchainLogo,
|
|
4609
4834
|
blockchain: step.toBlockchain,
|
|
4610
|
-
amount: step.outputAmount
|
|
4835
|
+
amount: step.outputAmount || ''
|
|
4611
4836
|
}));
|
|
4612
|
-
}),
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
onClick: setShowDrawer.bind(null, true)
|
|
4616
|
-
}, "Cancel")))), React__default.createElement(Drawer, {
|
|
4837
|
+
}), React__default.createElement(Divider, {
|
|
4838
|
+
size: 32
|
|
4839
|
+
})), React__default.createElement(Drawer, {
|
|
4617
4840
|
onClose: setShowDrawer.bind(null, false),
|
|
4618
4841
|
open: showDrawer,
|
|
4619
4842
|
showClose: true,
|
|
4620
4843
|
anchor: "bottom",
|
|
4621
4844
|
title: "Cancel Progress",
|
|
4622
|
-
content: React__default.createElement(
|
|
4845
|
+
content: React__default.createElement(Alert, {
|
|
4623
4846
|
type: "warning"
|
|
4624
|
-
}, React__default.createElement(
|
|
4625
|
-
variant: "body2"
|
|
4626
|
-
}, 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, {
|
|
4627
4848
|
size: 12,
|
|
4628
4849
|
direction: "vertical"
|
|
4629
|
-
}), 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")),
|
|
4630
4851
|
footer: React__default.createElement("div", {
|
|
4631
4852
|
style: {
|
|
4632
4853
|
display: 'flex',
|
|
@@ -4659,6 +4880,7 @@ exports.AngleDownIcon = AngleDownIcon;
|
|
|
4659
4880
|
exports.AngleLeftIcon = AngleLeftIcon;
|
|
4660
4881
|
exports.AngleRightIcon = AngleRightIcon;
|
|
4661
4882
|
exports.AngleUpIcon = AngleUpIcon;
|
|
4883
|
+
exports.ArrowRightIcon = ArrowRightIcon;
|
|
4662
4884
|
exports.BagIcon = BagIcon;
|
|
4663
4885
|
exports.BanIcon = BanIcon;
|
|
4664
4886
|
exports.BestRoute = BestRoute;
|
|
@@ -4674,21 +4896,23 @@ exports.Chip = Chip;
|
|
|
4674
4896
|
exports.CloseIcon = CloseIcon;
|
|
4675
4897
|
exports.ColorPicker = ColorPicker;
|
|
4676
4898
|
exports.ConfirmSwap = ConfirmSwap;
|
|
4677
|
-
exports.ConfirmWallets = ConfirmWallets;
|
|
4678
4899
|
exports.ConnectWalletsModal = ConnectWalletsModal;
|
|
4679
4900
|
exports.CopyIcon = CopyIcon;
|
|
4680
4901
|
exports.DeleteCircleIcon = DeleteCircleIcon;
|
|
4681
4902
|
exports.DeleteWalletIcon = DeleteWalletIcon;
|
|
4682
4903
|
exports.DisconnectIcon = DisconnectIcon;
|
|
4904
|
+
exports.Divider = Divider;
|
|
4683
4905
|
exports.DownloadIcon = DownloadIcon;
|
|
4684
4906
|
exports.Drawer = Drawer;
|
|
4685
4907
|
exports.FilledCircle = FilledCircle;
|
|
4686
4908
|
exports.GasIcon = GasIcon;
|
|
4909
|
+
exports.Header = Header;
|
|
4687
4910
|
exports.History = History;
|
|
4688
4911
|
exports.HistoryIcon = HistoryIcon;
|
|
4689
4912
|
exports.HorizontalSwapIcon = HorizontalSwapIcon;
|
|
4690
4913
|
exports.InfoCircleIcon = InfoCircleIcon;
|
|
4691
4914
|
exports.LiquiditySourcesSelector = LiquiditySourcesSelector;
|
|
4915
|
+
exports.LoadingFailedAlert = LoadingFailedAlert;
|
|
4692
4916
|
exports.MinusCircleIcon = MinusCircleIcon;
|
|
4693
4917
|
exports.Modal = Modal;
|
|
4694
4918
|
exports.Radio = Radio;
|