@rango-dev/ui 0.1.10 → 0.1.11-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/Icon/types.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +0 -1
- package/dist/components/StepDetail/StepDetail.d.ts +3 -1
- package/dist/components/SwapDetail/Token.d.ts +1 -0
- package/dist/components/TextField/TextField.d.ts +1 -1
- package/dist/components/TokenList/TokenList.d.ts +2 -2
- package/dist/components/TokenSelector/TokenSelector.d.ts +1 -3
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/common/Image.d.ts +6 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/containers/ConfirmSwap/ConfirmSwap.d.ts +4 -2
- package/dist/containers/History/History.d.ts +5 -12
- package/dist/containers/History/SwapsGroup.d.ts +13 -0
- package/dist/containers/History/index.d.ts +2 -1
- package/dist/containers/SwapHistory/SwapHistory.d.ts +1 -1
- package/dist/helper/index.d.ts +3 -2
- package/dist/ui.cjs.development.js +329 -255
- 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 +328 -256
- package/dist/ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Alert/Alert.tsx +3 -3
- package/src/components/BestRoute/BestRoute.tsx +2 -5
- package/src/components/BlockchainSelector/BlockchainSelector.tsx +24 -21
- package/src/components/BlockchainsList/BlockchainsList.tsx +8 -6
- package/src/components/Drawer/Drawer.tsx +1 -1
- package/src/components/Icon/common.ts +10 -0
- package/src/components/Icon/types.tsx +1 -0
- package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +9 -5
- package/src/components/Modal/Modal.tsx +1 -6
- package/src/components/SelectableWalletList/SelectableWalletList.tsx +2 -1
- package/src/components/Settings/Settings.tsx +4 -3
- package/src/components/StepDetail/StepDetail.tsx +45 -12
- package/src/components/SwapContainer/SwapContainer.tsx +1 -2
- package/src/components/SwapDetail/SwapDetail.tsx +8 -16
- package/src/components/SwapDetail/Token.tsx +19 -14
- package/src/components/TextField/TextField.tsx +8 -0
- package/src/components/TokenList/TokenItem.tsx +8 -5
- package/src/components/TokenList/TokenList.tsx +2 -3
- package/src/components/TokenSelector/TokenSelector.tsx +23 -47
- package/src/components/Typography/Typography.tsx +11 -3
- package/src/components/Wallet/Wallet.tsx +8 -5
- package/src/components/common/Image.tsx +27 -0
- package/src/components/common/index.ts +1 -0
- package/src/containers/ConfirmSwap/ConfirmSwap.tsx +9 -9
- package/src/containers/History/History.tsx +28 -71
- package/src/containers/History/SwapsGroup.tsx +59 -0
- package/src/containers/History/index.ts +2 -1
- package/src/containers/SwapHistory/SwapHistory.tsx +121 -135
- package/src/helper/index.ts +20 -5
|
@@ -225,6 +225,11 @@ var SvgWithStrokeColor = /*#__PURE__*/styled('svg', {
|
|
|
225
225
|
}, _white["." + darkTheme + " &"] = {
|
|
226
226
|
$$color: '$colors$foreground'
|
|
227
227
|
}, _white.stroke = '$$color', _white)
|
|
228
|
+
},
|
|
229
|
+
disabled: {
|
|
230
|
+
"true": {
|
|
231
|
+
stroke: '$neutrals400'
|
|
232
|
+
}
|
|
228
233
|
}
|
|
229
234
|
}
|
|
230
235
|
});
|
|
@@ -254,6 +259,11 @@ var SvgWithFillColor = /*#__PURE__*/styled('svg', {
|
|
|
254
259
|
}, _white2["." + darkTheme + " &"] = {
|
|
255
260
|
$$color: '$colors$foreground'
|
|
256
261
|
}, _white2.fill = '$$color', _white2)
|
|
262
|
+
},
|
|
263
|
+
disabled: {
|
|
264
|
+
"true": {
|
|
265
|
+
stroke: '$neutrals400'
|
|
266
|
+
}
|
|
257
267
|
}
|
|
258
268
|
}
|
|
259
269
|
});
|
|
@@ -1482,6 +1492,13 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
|
|
|
1482
1492
|
fontSize: '$18'
|
|
1483
1493
|
}
|
|
1484
1494
|
},
|
|
1495
|
+
title: {
|
|
1496
|
+
fontSize: '$14',
|
|
1497
|
+
fontWeight: '$500',
|
|
1498
|
+
'@md': {
|
|
1499
|
+
fontSize: '$15'
|
|
1500
|
+
}
|
|
1501
|
+
},
|
|
1485
1502
|
body1: {
|
|
1486
1503
|
fontSize: '$14',
|
|
1487
1504
|
fontWeight: '$400',
|
|
@@ -1494,10 +1511,7 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
|
|
|
1494
1511
|
},
|
|
1495
1512
|
body2: {
|
|
1496
1513
|
fontSize: '$14',
|
|
1497
|
-
fontWeight: '$400'
|
|
1498
|
-
'@lg': {
|
|
1499
|
-
fontSize: '$16'
|
|
1500
|
-
}
|
|
1514
|
+
fontWeight: '$400'
|
|
1501
1515
|
},
|
|
1502
1516
|
body3: {
|
|
1503
1517
|
fontSize: '$12',
|
|
@@ -1649,6 +1663,14 @@ var StepContainer = /*#__PURE__*/styled('div', {
|
|
|
1649
1663
|
textAlign: 'center',
|
|
1650
1664
|
justifyContent: 'center'
|
|
1651
1665
|
}
|
|
1666
|
+
},
|
|
1667
|
+
success: {
|
|
1668
|
+
"true": {
|
|
1669
|
+
filter: 'none'
|
|
1670
|
+
},
|
|
1671
|
+
"false": {
|
|
1672
|
+
filter: 'grayscale(100%)'
|
|
1673
|
+
}
|
|
1652
1674
|
}
|
|
1653
1675
|
}
|
|
1654
1676
|
});
|
|
@@ -1669,18 +1691,23 @@ var Detail = /*#__PURE__*/styled('div', {
|
|
|
1669
1691
|
});
|
|
1670
1692
|
var SubTitle = /*#__PURE__*/styled(Typography, {
|
|
1671
1693
|
color: '$neutrals600',
|
|
1672
|
-
display: 'block'
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1694
|
+
display: 'block',
|
|
1695
|
+
paddingLeft: '$8'
|
|
1696
|
+
});
|
|
1697
|
+
function StepDetail(props) {
|
|
1698
|
+
var logo = props.logo,
|
|
1699
|
+
chainLogo = props.chainLogo,
|
|
1700
|
+
amount = props.amount,
|
|
1701
|
+
symbol = props.symbol,
|
|
1702
|
+
blockchain = props.blockchain,
|
|
1703
|
+
estimatedAmount = props.estimatedAmount,
|
|
1704
|
+
_props$success = props.success,
|
|
1705
|
+
success = _props$success === void 0 ? true : _props$success,
|
|
1706
|
+
_props$direction = props.direction,
|
|
1707
|
+
direction = _props$direction === void 0 ? 'horizontal' : _props$direction;
|
|
1682
1708
|
return React__default.createElement(StepContainer, {
|
|
1683
|
-
direction: direction
|
|
1709
|
+
direction: direction,
|
|
1710
|
+
success: success
|
|
1684
1711
|
}, React__default.createElement(StepLogoContainer, {
|
|
1685
1712
|
direction: direction
|
|
1686
1713
|
}, React__default.createElement(Logo, {
|
|
@@ -1691,13 +1718,20 @@ function StepDetail(_ref) {
|
|
|
1691
1718
|
alt: blockchain
|
|
1692
1719
|
}))), React__default.createElement(Detail, {
|
|
1693
1720
|
pl: direction === 'horizontal'
|
|
1694
|
-
}, React__default.createElement(Typography, {
|
|
1721
|
+
}, amount && React__default.createElement(Typography, {
|
|
1695
1722
|
noWrap: true,
|
|
1696
|
-
variant: direction === 'vertical' ? 'body2' : '
|
|
1697
|
-
}, amount
|
|
1723
|
+
variant: direction === 'vertical' ? 'body2' : 'title'
|
|
1724
|
+
}, amount), !amount && estimatedAmount && React__default.createElement(Typography, {
|
|
1725
|
+
noWrap: true,
|
|
1726
|
+
variant: direction === 'vertical' ? 'body2' : 'title',
|
|
1727
|
+
color: '$neutrals600'
|
|
1728
|
+
}, estimatedAmount), "\xA0", React__default.createElement(Typography, {
|
|
1729
|
+
variant: direction === 'vertical' ? 'body2' : 'title',
|
|
1730
|
+
noWrap: true
|
|
1731
|
+
}, symbol), React__default.createElement(SubTitle, {
|
|
1698
1732
|
noWrap: true,
|
|
1699
1733
|
variant: "caption",
|
|
1700
|
-
color: "neutrals800"
|
|
1734
|
+
color: "$neutrals800"
|
|
1701
1735
|
}, "on ", blockchain)));
|
|
1702
1736
|
}
|
|
1703
1737
|
|
|
@@ -1919,6 +1953,37 @@ function Tooltip(_ref) {
|
|
|
1919
1953
|
})))));
|
|
1920
1954
|
}
|
|
1921
1955
|
|
|
1956
|
+
var FilledCircle = /*#__PURE__*/styled('span', {
|
|
1957
|
+
width: '10px',
|
|
1958
|
+
height: '10px',
|
|
1959
|
+
backgroundColor: '$primary',
|
|
1960
|
+
borderRadius: '99999px'
|
|
1961
|
+
});
|
|
1962
|
+
|
|
1963
|
+
var _excluded$E = ["size"];
|
|
1964
|
+
var ImageContainer = /*#__PURE__*/styled('div', {
|
|
1965
|
+
display: 'flex',
|
|
1966
|
+
justifyContent: 'center',
|
|
1967
|
+
alignItems: 'center',
|
|
1968
|
+
'.image': {
|
|
1969
|
+
width: '100%',
|
|
1970
|
+
height: '100%',
|
|
1971
|
+
objectFit: 'contain'
|
|
1972
|
+
}
|
|
1973
|
+
});
|
|
1974
|
+
function Image(props) {
|
|
1975
|
+
var size = props.size,
|
|
1976
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$E);
|
|
1977
|
+
return React__default.createElement(ImageContainer, {
|
|
1978
|
+
css: {
|
|
1979
|
+
width: size + 'px',
|
|
1980
|
+
height: size + 'px'
|
|
1981
|
+
}
|
|
1982
|
+
}, React__default.createElement("img", Object.assign({
|
|
1983
|
+
className: "image"
|
|
1984
|
+
}, otherProps)));
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1922
1987
|
var Container = /*#__PURE__*/styled('div', {
|
|
1923
1988
|
borderRadius: '$5',
|
|
1924
1989
|
border: '1px solid $neutrals300',
|
|
@@ -1956,10 +2021,6 @@ var HR = /*#__PURE__*/styled('hr', {
|
|
|
1956
2021
|
border: '1px solid $neutrals400',
|
|
1957
2022
|
margin: '$8 0'
|
|
1958
2023
|
});
|
|
1959
|
-
var SwapperLogo = /*#__PURE__*/styled('img', {
|
|
1960
|
-
width: '$16',
|
|
1961
|
-
height: '$16'
|
|
1962
|
-
});
|
|
1963
2024
|
var RelativeContainer = /*#__PURE__*/styled('div', {
|
|
1964
2025
|
position: 'relative'
|
|
1965
2026
|
});
|
|
@@ -2091,9 +2152,10 @@ function BestRoute(props) {
|
|
|
2091
2152
|
chainLogo: swap.from.blockchainLogo,
|
|
2092
2153
|
blockchain: swap.from.blockchain,
|
|
2093
2154
|
amount: swap.fromAmount
|
|
2094
|
-
}), React__default.createElement(Dot, null)), React__default.createElement(SwapperContainer, null, React__default.createElement(Line, null), React__default.createElement(
|
|
2155
|
+
}), React__default.createElement(Dot, null)), React__default.createElement(SwapperContainer, null, React__default.createElement(Line, null), React__default.createElement(Image, {
|
|
2095
2156
|
src: swap.swapperLogo,
|
|
2096
|
-
alt: swap.swapperId
|
|
2157
|
+
alt: swap.swapperId,
|
|
2158
|
+
size: 20
|
|
2097
2159
|
}), React__default.createElement(Line, null)), index + 1 === ((_data$result2 = data.result) == null ? void 0 : _data$result2.swaps.length) && React__default.createElement(ArrowRight, null), React__default.createElement(StepDetail, {
|
|
2098
2160
|
direction: "vertical",
|
|
2099
2161
|
logo: swap.to.logo,
|
|
@@ -2107,7 +2169,7 @@ function BestRoute(props) {
|
|
|
2107
2169
|
}, "No routes found")));
|
|
2108
2170
|
}
|
|
2109
2171
|
|
|
2110
|
-
var _excluded$
|
|
2172
|
+
var _excluded$F = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
|
|
2111
2173
|
var _ghost, _css, _css2, _css3;
|
|
2112
2174
|
var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
2113
2175
|
borderRadius: '$5',
|
|
@@ -2452,7 +2514,7 @@ function Button(_ref) {
|
|
|
2452
2514
|
suffix = _ref.suffix,
|
|
2453
2515
|
align = _ref.align,
|
|
2454
2516
|
flexContent = _ref.flexContent,
|
|
2455
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2517
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
2456
2518
|
var isDisabled = loading || disabled;
|
|
2457
2519
|
return React__default.createElement(ButtonContainer, Object.assign({
|
|
2458
2520
|
disabled: isDisabled
|
|
@@ -2470,13 +2532,6 @@ function Button(_ref) {
|
|
|
2470
2532
|
}), suffix);
|
|
2471
2533
|
}
|
|
2472
2534
|
|
|
2473
|
-
var FilledCircle = /*#__PURE__*/styled('span', {
|
|
2474
|
-
width: '10px',
|
|
2475
|
-
height: '10px',
|
|
2476
|
-
backgroundColor: '$primary',
|
|
2477
|
-
borderRadius: '99999px'
|
|
2478
|
-
});
|
|
2479
|
-
|
|
2480
2535
|
var ListContainer = /*#__PURE__*/styled('div', {
|
|
2481
2536
|
display: 'grid',
|
|
2482
2537
|
gap: '.5rem',
|
|
@@ -2485,10 +2540,8 @@ var ListContainer = /*#__PURE__*/styled('div', {
|
|
|
2485
2540
|
width: '100%',
|
|
2486
2541
|
height: '100%'
|
|
2487
2542
|
});
|
|
2488
|
-
var
|
|
2489
|
-
|
|
2490
|
-
maxHeight: '1.5rem',
|
|
2491
|
-
marginRight: '$4'
|
|
2543
|
+
var ImageContainer$1 = /*#__PURE__*/styled('div', {
|
|
2544
|
+
paddingRight: '$4'
|
|
2492
2545
|
});
|
|
2493
2546
|
function BlockchainsList(props) {
|
|
2494
2547
|
var list = props.list,
|
|
@@ -2515,9 +2568,10 @@ function BlockchainsList(props) {
|
|
|
2515
2568
|
type: isSelect(blockchain.name) ? 'primary' : undefined,
|
|
2516
2569
|
variant: "outlined",
|
|
2517
2570
|
size: "large",
|
|
2518
|
-
prefix: React__default.createElement(Image, {
|
|
2571
|
+
prefix: React__default.createElement(ImageContainer$1, null, React__default.createElement(Image, {
|
|
2572
|
+
size: 24,
|
|
2519
2573
|
src: blockchain.logo
|
|
2520
|
-
}),
|
|
2574
|
+
})),
|
|
2521
2575
|
suffix: isSelect(blockchain.name) ? React__default.createElement(FilledCircle, null) : undefined,
|
|
2522
2576
|
align: "start",
|
|
2523
2577
|
onClick: changeSelectedBlockchain.bind(null, blockchain),
|
|
@@ -2588,7 +2642,7 @@ function Header(props) {
|
|
|
2588
2642
|
}, props.title), props.suffix || React__default.createElement("div", null));
|
|
2589
2643
|
}
|
|
2590
2644
|
|
|
2591
|
-
var _excluded$
|
|
2645
|
+
var _excluded$G = ["label", "prefix", "suffix", "children", "size", "style"];
|
|
2592
2646
|
var InputContainer = /*#__PURE__*/styled('div', {
|
|
2593
2647
|
backgroundColor: '$background',
|
|
2594
2648
|
padding: '1px',
|
|
@@ -2601,6 +2655,7 @@ var InputContainer = /*#__PURE__*/styled('div', {
|
|
|
2601
2655
|
position: 'relative',
|
|
2602
2656
|
alignItems: 'center',
|
|
2603
2657
|
color: '$foreground',
|
|
2658
|
+
overflowX: 'hidden',
|
|
2604
2659
|
transition: 'border-color ease .3s',
|
|
2605
2660
|
'&:focus-within': {
|
|
2606
2661
|
borderColor: '$success',
|
|
@@ -2661,6 +2716,13 @@ var Input = /*#__PURE__*/styled('input', {
|
|
|
2661
2716
|
margin: 0,
|
|
2662
2717
|
'&:disabled': {
|
|
2663
2718
|
cursor: 'not-allowed'
|
|
2719
|
+
},
|
|
2720
|
+
'&::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {
|
|
2721
|
+
'-webkit-appearance': 'none',
|
|
2722
|
+
margin: 0
|
|
2723
|
+
},
|
|
2724
|
+
'&[type="number"]': {
|
|
2725
|
+
'-moz-appearance': 'textfield'
|
|
2664
2726
|
}
|
|
2665
2727
|
});
|
|
2666
2728
|
var Label = /*#__PURE__*/styled('label', {
|
|
@@ -2675,7 +2737,7 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
2675
2737
|
suffix = props.suffix,
|
|
2676
2738
|
size = props.size,
|
|
2677
2739
|
style = props.style,
|
|
2678
|
-
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$
|
|
2740
|
+
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$G);
|
|
2679
2741
|
return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({
|
|
2680
2742
|
className: "_text"
|
|
2681
2743
|
}, inputAttributes.id && {
|
|
@@ -2735,10 +2797,10 @@ function SecondaryPage(props) {
|
|
|
2735
2797
|
})), props.textField && (props.children == null ? void 0 : props.children(searchedFor)), !props.textField && props.children), Footer);
|
|
2736
2798
|
}
|
|
2737
2799
|
|
|
2738
|
-
|
|
2800
|
+
function containsText(text, searchText) {
|
|
2739
2801
|
return text.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
|
|
2740
|
-
}
|
|
2741
|
-
|
|
2802
|
+
}
|
|
2803
|
+
function getConciseAddress(address, maxChars, ellipsisLength) {
|
|
2742
2804
|
if (maxChars === void 0) {
|
|
2743
2805
|
maxChars = 8;
|
|
2744
2806
|
}
|
|
@@ -2750,7 +2812,19 @@ var getConciseAddress = function getConciseAddress(address, maxChars, ellipsisLe
|
|
|
2750
2812
|
var start = Math.ceil((address.length - maxChars) / 2);
|
|
2751
2813
|
var end = address.length - maxChars;
|
|
2752
2814
|
return "" + address.substr(start, maxChars) + '.'.repeat(ellipsisLength) + address.substr(end);
|
|
2753
|
-
}
|
|
2815
|
+
}
|
|
2816
|
+
function limitDecimalPlaces(numberString, maxDecimalPlaces) {
|
|
2817
|
+
if (maxDecimalPlaces === void 0) {
|
|
2818
|
+
maxDecimalPlaces = 4;
|
|
2819
|
+
}
|
|
2820
|
+
var number = parseFloat(numberString);
|
|
2821
|
+
if (isNaN(number)) return numberString; // Return the original string if it's not a valid number
|
|
2822
|
+
else {
|
|
2823
|
+
var multiplier = Math.pow(10, maxDecimalPlaces);
|
|
2824
|
+
var roundedNumber = Math.round(number * multiplier) / multiplier;
|
|
2825
|
+
return roundedNumber.toString();
|
|
2826
|
+
}
|
|
2827
|
+
}
|
|
2754
2828
|
|
|
2755
2829
|
var SpacerContainer = /*#__PURE__*/styled('div', {
|
|
2756
2830
|
variants: {
|
|
@@ -2928,7 +3002,7 @@ function Alert(props) {
|
|
|
2928
3002
|
color: type,
|
|
2929
3003
|
size: 24
|
|
2930
3004
|
}), React__default.createElement(Spacer, {
|
|
2931
|
-
size:
|
|
3005
|
+
size: 4
|
|
2932
3006
|
}))), React__default.createElement("div", {
|
|
2933
3007
|
style: {
|
|
2934
3008
|
display: 'flex',
|
|
@@ -2939,10 +3013,10 @@ function Alert(props) {
|
|
|
2939
3013
|
}
|
|
2940
3014
|
}, title && React__default.createElement(React__default.Fragment, null, React__default.createElement(Typography, {
|
|
2941
3015
|
className: "title",
|
|
2942
|
-
variant: "
|
|
3016
|
+
variant: "title",
|
|
2943
3017
|
color: type
|
|
2944
3018
|
}, title), !!children && React__default.createElement(Spacer, {
|
|
2945
|
-
size:
|
|
3019
|
+
size: 4,
|
|
2946
3020
|
direction: "vertical"
|
|
2947
3021
|
})), children)), props.footer ? React__default.createElement("div", {
|
|
2948
3022
|
className: "footer"
|
|
@@ -3008,10 +3082,8 @@ function VirtualizedList(props) {
|
|
|
3008
3082
|
});
|
|
3009
3083
|
}
|
|
3010
3084
|
|
|
3011
|
-
var
|
|
3012
|
-
|
|
3013
|
-
maxHeight: '$32',
|
|
3014
|
-
marginRight: '$16'
|
|
3085
|
+
var TokenImageContainer = /*#__PURE__*/styled('div', {
|
|
3086
|
+
paddingRight: '$16'
|
|
3015
3087
|
});
|
|
3016
3088
|
var TokenNameContainer = /*#__PURE__*/styled('div', {
|
|
3017
3089
|
display: 'flex',
|
|
@@ -3044,9 +3116,10 @@ function TokenItem(props) {
|
|
|
3044
3116
|
align: "start",
|
|
3045
3117
|
onClick: onClick.bind(null, token),
|
|
3046
3118
|
type: selected ? 'primary' : undefined,
|
|
3047
|
-
prefix: React__default.createElement(
|
|
3048
|
-
src: token.image
|
|
3049
|
-
|
|
3119
|
+
prefix: React__default.createElement(TokenImageContainer, null, React__default.createElement(Image, {
|
|
3120
|
+
src: token.image,
|
|
3121
|
+
size: 32
|
|
3122
|
+
})),
|
|
3050
3123
|
suffix: ((_token$balance = token.balance) == null ? void 0 : _token$balance.amount) && React__default.createElement(TokenAmountContainer, null, React__default.createElement(Typography, {
|
|
3051
3124
|
variant: "body2"
|
|
3052
3125
|
}, token.balance.amount), React__default.createElement(Typography, {
|
|
@@ -3060,7 +3133,7 @@ function TokenItem(props) {
|
|
|
3060
3133
|
}, token.name))));
|
|
3061
3134
|
}
|
|
3062
3135
|
|
|
3063
|
-
var _excluded$
|
|
3136
|
+
var _excluded$H = ["style"];
|
|
3064
3137
|
var PAGE_SIZE = 20;
|
|
3065
3138
|
function TokenList(props) {
|
|
3066
3139
|
var list = props.list,
|
|
@@ -3077,7 +3150,7 @@ function TokenList(props) {
|
|
|
3077
3150
|
};
|
|
3078
3151
|
var isSelected = function isSelected(token) {
|
|
3079
3152
|
if (multiSelect && selectedList) {
|
|
3080
|
-
return selectedList
|
|
3153
|
+
return selectedList.map(function (item) {
|
|
3081
3154
|
return item.symbol + item.address;
|
|
3082
3155
|
}).indexOf(token.symbol + token.address) > -1;
|
|
3083
3156
|
}
|
|
@@ -3100,7 +3173,7 @@ function TokenList(props) {
|
|
|
3100
3173
|
}, [tokens.length]);
|
|
3101
3174
|
var innerElementType = React.forwardRef(function (_ref, ref) {
|
|
3102
3175
|
var style = _ref.style,
|
|
3103
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3176
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
3104
3177
|
return React__default.createElement("div", Object.assign({
|
|
3105
3178
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3106
3179
|
ref: ref,
|
|
@@ -3128,15 +3201,12 @@ function TokenList(props) {
|
|
|
3128
3201
|
});
|
|
3129
3202
|
}
|
|
3130
3203
|
|
|
3131
|
-
var Container$1 = /*#__PURE__*/styled('div', {
|
|
3132
|
-
flex: '1'
|
|
3133
|
-
});
|
|
3134
3204
|
var LoaderContainer = /*#__PURE__*/styled('div', {
|
|
3135
3205
|
display: 'flex',
|
|
3136
3206
|
justifyContent: 'center',
|
|
3137
3207
|
width: '100%',
|
|
3138
|
-
|
|
3139
|
-
|
|
3208
|
+
paddingTop: '33%',
|
|
3209
|
+
flex: 1
|
|
3140
3210
|
});
|
|
3141
3211
|
var filterTokens = function filterTokens(list, searchedFor) {
|
|
3142
3212
|
return list.filter(function (token) {
|
|
@@ -3147,38 +3217,35 @@ function TokenSelector(props) {
|
|
|
3147
3217
|
var list = props.list,
|
|
3148
3218
|
type = props.type,
|
|
3149
3219
|
selected = props.selected,
|
|
3150
|
-
onChange = props.onChange,
|
|
3151
3220
|
hasHeader = props.hasHeader,
|
|
3152
|
-
|
|
3153
|
-
selectedList = props.selectedList,
|
|
3221
|
+
onChange = props.onChange,
|
|
3154
3222
|
onBack = props.onBack,
|
|
3155
3223
|
loadingStatus = props.loadingStatus;
|
|
3156
3224
|
return React__default.createElement(SecondaryPage, {
|
|
3157
3225
|
textField: true,
|
|
3158
|
-
textFieldPlaceholder: "Search Blockchain By Name",
|
|
3159
|
-
title: "Select " + type + " Token",
|
|
3160
3226
|
hasHeader: hasHeader,
|
|
3161
|
-
|
|
3227
|
+
title: "Select " + type + " Token",
|
|
3228
|
+
onBack: onBack,
|
|
3229
|
+
textFieldPlaceholder: "Search Token By Name"
|
|
3162
3230
|
}, function (searchedFor) {
|
|
3163
3231
|
var filteredTokens = filterTokens(list, searchedFor);
|
|
3164
|
-
return
|
|
3232
|
+
return loadingStatus === 'loading' ? React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
|
|
3165
3233
|
size: 24
|
|
3166
|
-
}))
|
|
3234
|
+
})) : loadingStatus === 'failed' ? React__default.createElement(LoadingFailedAlert, null) : filteredTokens.length ? React__default.createElement(TokenList, {
|
|
3167
3235
|
searchedText: searchedFor,
|
|
3168
3236
|
list: filteredTokens,
|
|
3169
3237
|
selected: selected,
|
|
3170
|
-
selectedList: selectedList,
|
|
3171
|
-
multiSelect: multiSelect,
|
|
3172
3238
|
onChange: onChange
|
|
3173
3239
|
}) : React__default.createElement(NotFoundAlert, {
|
|
3174
3240
|
catergory: "Token",
|
|
3175
3241
|
searchedFor: searchedFor
|
|
3176
|
-
})
|
|
3242
|
+
});
|
|
3177
3243
|
});
|
|
3178
3244
|
}
|
|
3179
3245
|
|
|
3180
3246
|
var ListContainer$1 = /*#__PURE__*/styled('div', {
|
|
3181
|
-
overflowY: 'auto'
|
|
3247
|
+
overflowY: 'auto',
|
|
3248
|
+
padding: '0 $4'
|
|
3182
3249
|
});
|
|
3183
3250
|
var filterBlockchains = function filterBlockchains(list, searchedFor) {
|
|
3184
3251
|
return list.filter(function (blockchain) {
|
|
@@ -3204,12 +3271,12 @@ function BlockchainSelector(props) {
|
|
|
3204
3271
|
onBack: onBack
|
|
3205
3272
|
}, function (searchedFor) {
|
|
3206
3273
|
var filteredBlockchains = filterBlockchains(list, searchedFor);
|
|
3207
|
-
return React__default.createElement(
|
|
3274
|
+
return React__default.createElement(React__default.Fragment, null, loadingStatus === 'loading' && React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
|
|
3275
|
+
size: 24
|
|
3276
|
+
})), React__default.createElement(ListContainer$1, {
|
|
3208
3277
|
style: listContainerStyle,
|
|
3209
3278
|
key: "1"
|
|
3210
|
-
}, loadingStatus === '
|
|
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, {
|
|
3279
|
+
}, loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredBlockchains.length ? React__default.createElement(BlockchainsList, {
|
|
3213
3280
|
list: filteredBlockchains,
|
|
3214
3281
|
selected: selected,
|
|
3215
3282
|
multiSelect: multiSelect,
|
|
@@ -3218,11 +3285,11 @@ function BlockchainSelector(props) {
|
|
|
3218
3285
|
}) : React__default.createElement(NotFoundAlert, {
|
|
3219
3286
|
catergory: "Blockchain",
|
|
3220
3287
|
searchedFor: searchedFor
|
|
3221
|
-
})));
|
|
3288
|
+
}))));
|
|
3222
3289
|
});
|
|
3223
3290
|
}
|
|
3224
3291
|
|
|
3225
|
-
var _excluded$
|
|
3292
|
+
var _excluded$I = ["label", "id"];
|
|
3226
3293
|
var CheckboxContainer = /*#__PURE__*/styled('div', {
|
|
3227
3294
|
display: 'flex',
|
|
3228
3295
|
alignItems: 'center'
|
|
@@ -3247,7 +3314,7 @@ var Label$1 = /*#__PURE__*/styled('label', {
|
|
|
3247
3314
|
function Checkbox(_ref) {
|
|
3248
3315
|
var label = _ref.label,
|
|
3249
3316
|
id = _ref.id,
|
|
3250
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3317
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
3251
3318
|
return React__default.createElement(CheckboxContainer, null, React__default.createElement(CheckboxRoot, Object.assign({
|
|
3252
3319
|
id: id
|
|
3253
3320
|
}, props), React__default.createElement(RadixCheckbox.Indicator, null, React__default.createElement(CheckIcon, {
|
|
@@ -3330,15 +3397,13 @@ var ModalHeader = /*#__PURE__*/styled('div', {
|
|
|
3330
3397
|
position: 'relative',
|
|
3331
3398
|
marginBottom: '$16'
|
|
3332
3399
|
});
|
|
3333
|
-
var ContentContainer$1 = /*#__PURE__*/styled('div', {});
|
|
3334
3400
|
function Modal(props) {
|
|
3335
3401
|
var title = props.title,
|
|
3336
3402
|
content = props.content,
|
|
3337
3403
|
open = props.open,
|
|
3338
3404
|
onClose = props.onClose,
|
|
3339
3405
|
containerStyle = props.containerStyle,
|
|
3340
|
-
action = props.action
|
|
3341
|
-
contentStyle = props.contentStyle;
|
|
3406
|
+
action = props.action;
|
|
3342
3407
|
var handleBackDropClick = function handleBackDropClick(event) {
|
|
3343
3408
|
if (event.target === event.currentTarget) onClose();
|
|
3344
3409
|
};
|
|
@@ -3354,9 +3419,7 @@ function Modal(props) {
|
|
|
3354
3419
|
}, title), React__default.createElement(Row, null, action, React__default.createElement(CloseIcon, {
|
|
3355
3420
|
size: 24,
|
|
3356
3421
|
onClick: onClose
|
|
3357
|
-
}))),
|
|
3358
|
-
style: contentStyle
|
|
3359
|
-
}, content))), document.body));
|
|
3422
|
+
}))), content)), document.body));
|
|
3360
3423
|
}
|
|
3361
3424
|
|
|
3362
3425
|
(function (WalletState) {
|
|
@@ -3383,10 +3446,8 @@ var State = function State(_ref) {
|
|
|
3383
3446
|
})), walletState === exports.WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === exports.WalletState.CONNECTED && React__default.createElement(DisconnectIcon, null)));
|
|
3384
3447
|
};
|
|
3385
3448
|
|
|
3386
|
-
var
|
|
3387
|
-
|
|
3388
|
-
height: '$24',
|
|
3389
|
-
marginRight: '$12'
|
|
3449
|
+
var WalletImageContainer = /*#__PURE__*/styled('div', {
|
|
3450
|
+
paddingRight: '$12'
|
|
3390
3451
|
});
|
|
3391
3452
|
var Text = /*#__PURE__*/styled('div', {
|
|
3392
3453
|
display: 'flex',
|
|
@@ -3423,9 +3484,10 @@ function Wallet(props) {
|
|
|
3423
3484
|
align: "start",
|
|
3424
3485
|
variant: "outlined",
|
|
3425
3486
|
size: "large",
|
|
3426
|
-
prefix: React__default.createElement(
|
|
3427
|
-
src: image
|
|
3428
|
-
|
|
3487
|
+
prefix: React__default.createElement(WalletImageContainer, null, React__default.createElement(Image, {
|
|
3488
|
+
src: image,
|
|
3489
|
+
size: 24
|
|
3490
|
+
})),
|
|
3429
3491
|
suffix: React__default.createElement(State, {
|
|
3430
3492
|
walletState: state,
|
|
3431
3493
|
installLink: installLink
|
|
@@ -3525,7 +3587,8 @@ var MainContainer$1 = /*#__PURE__*/styled('div', {
|
|
|
3525
3587
|
variants: {
|
|
3526
3588
|
loaded: {
|
|
3527
3589
|
"true": {
|
|
3528
|
-
overflowY: 'auto'
|
|
3590
|
+
overflowY: 'auto',
|
|
3591
|
+
padding: '0 $4'
|
|
3529
3592
|
}
|
|
3530
3593
|
}
|
|
3531
3594
|
}
|
|
@@ -3541,10 +3604,8 @@ var LiquiditySourceType = /*#__PURE__*/styled('div', {
|
|
|
3541
3604
|
paddingTop: '$8',
|
|
3542
3605
|
paddingBottom: '$8'
|
|
3543
3606
|
});
|
|
3544
|
-
var
|
|
3545
|
-
|
|
3546
|
-
maxHeight: '$20',
|
|
3547
|
-
marginRight: '$16'
|
|
3607
|
+
var LiquidityImageContainer = /*#__PURE__*/styled('div', {
|
|
3608
|
+
paddingRight: '$16'
|
|
3548
3609
|
});
|
|
3549
3610
|
var LoaderContainer$1 = /*#__PURE__*/styled('div', {
|
|
3550
3611
|
display: 'flex',
|
|
@@ -3642,9 +3703,10 @@ var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
|
|
|
3642
3703
|
size: "large",
|
|
3643
3704
|
align: "start",
|
|
3644
3705
|
variant: "outlined",
|
|
3645
|
-
prefix: React__default.createElement(
|
|
3646
|
-
src: liquiditySource.logo
|
|
3647
|
-
|
|
3706
|
+
prefix: React__default.createElement(LiquidityImageContainer, null, React__default.createElement(Image, {
|
|
3707
|
+
src: liquiditySource.logo,
|
|
3708
|
+
size: 20
|
|
3709
|
+
})),
|
|
3648
3710
|
suffix: React__default.createElement(Switch, {
|
|
3649
3711
|
checked: selected
|
|
3650
3712
|
}),
|
|
@@ -3733,7 +3795,7 @@ var SolidCircle = /*#__PURE__*/styled('div', {
|
|
|
3733
3795
|
}
|
|
3734
3796
|
}
|
|
3735
3797
|
});
|
|
3736
|
-
var Container$
|
|
3798
|
+
var Container$1 = /*#__PURE__*/styled('div', {
|
|
3737
3799
|
border: '1.5px solid',
|
|
3738
3800
|
borderRadius: '$5',
|
|
3739
3801
|
padding: '$12',
|
|
@@ -3780,15 +3842,14 @@ function SelectableWalletList(_ref) {
|
|
|
3780
3842
|
}, [list]);
|
|
3781
3843
|
return React__default.createElement(Row$1, null, list.map(function (w, index) {
|
|
3782
3844
|
var checked = active === w.walletType;
|
|
3783
|
-
return React__default.createElement(Container$
|
|
3845
|
+
return React__default.createElement(Container$1, {
|
|
3784
3846
|
checked: checked,
|
|
3785
3847
|
onClick: onClick.bind(null, w),
|
|
3786
3848
|
key: index
|
|
3787
|
-
}, React__default.createElement(
|
|
3849
|
+
}, React__default.createElement(Image, {
|
|
3788
3850
|
src: w.image,
|
|
3789
3851
|
alt: w.walletType,
|
|
3790
|
-
|
|
3791
|
-
height: 24
|
|
3852
|
+
size: 24
|
|
3792
3853
|
}), React__default.createElement(Typography, {
|
|
3793
3854
|
variant: "body2"
|
|
3794
3855
|
}, w.name), React__default.createElement(Typography, {
|
|
@@ -3833,7 +3894,7 @@ var StyledItem = /*#__PURE__*/styled(RadioGroup.Item, {
|
|
|
3833
3894
|
borderColor: '$neutrals600'
|
|
3834
3895
|
}
|
|
3835
3896
|
});
|
|
3836
|
-
var Container$
|
|
3897
|
+
var Container$2 = /*#__PURE__*/styled('div', {
|
|
3837
3898
|
display: 'flex'
|
|
3838
3899
|
});
|
|
3839
3900
|
var StyledIndicator = /*#__PURE__*/styled(RadioGroup.Indicator, {
|
|
@@ -3863,7 +3924,7 @@ function Radio(props) {
|
|
|
3863
3924
|
_props$direction = props.direction,
|
|
3864
3925
|
direction = _props$direction === void 0 ? 'vertical' : _props$direction,
|
|
3865
3926
|
style = props.style;
|
|
3866
|
-
return React__default.createElement(Container$
|
|
3927
|
+
return React__default.createElement(Container$2, null, React__default.createElement(StyledRoot, {
|
|
3867
3928
|
onValueChange: onChange,
|
|
3868
3929
|
value: value,
|
|
3869
3930
|
direction: direction,
|
|
@@ -3899,13 +3960,13 @@ var SlippageChipsContainer = /*#__PURE__*/styled('div', {
|
|
|
3899
3960
|
var LiquiditySourceContainer = /*#__PURE__*/styled(BaseContainer, {
|
|
3900
3961
|
display: 'flex',
|
|
3901
3962
|
justifyContent: 'space-between',
|
|
3902
|
-
marginTop: '$
|
|
3963
|
+
marginTop: '$16',
|
|
3903
3964
|
cursor: 'pointer'
|
|
3904
3965
|
});
|
|
3905
3966
|
var InfiniteContainer = /*#__PURE__*/styled(BaseContainer, {
|
|
3906
3967
|
display: 'flex',
|
|
3907
3968
|
justifyContent: 'space-between',
|
|
3908
|
-
marginTop: '$
|
|
3969
|
+
marginTop: '$16'
|
|
3909
3970
|
});
|
|
3910
3971
|
var StyledAngleRight = /*#__PURE__*/styled(AngleRightIcon, {
|
|
3911
3972
|
marginLeft: '$8'
|
|
@@ -3916,7 +3977,7 @@ var LiquiditySourceNumber = /*#__PURE__*/styled('div', {
|
|
|
3916
3977
|
justifyContent: 'center'
|
|
3917
3978
|
});
|
|
3918
3979
|
var ThemesContainer = /*#__PURE__*/styled(BaseContainer, {
|
|
3919
|
-
marginTop: '$
|
|
3980
|
+
marginTop: '$16'
|
|
3920
3981
|
});
|
|
3921
3982
|
var Head = /*#__PURE__*/styled('div', {
|
|
3922
3983
|
display: 'flex',
|
|
@@ -4038,14 +4099,14 @@ var MainContainer$2 = /*#__PURE__*/styled('div', {
|
|
|
4038
4099
|
width: '100%',
|
|
4039
4100
|
minWidth: '375px',
|
|
4040
4101
|
maxWidth: '512px',
|
|
4041
|
-
maxHeight: '595px',
|
|
4042
4102
|
padding: '$16',
|
|
4043
4103
|
boxSizing: 'border-box',
|
|
4044
4104
|
backgroundColor: '$background',
|
|
4045
4105
|
variants: {
|
|
4046
4106
|
fixedHeight: {
|
|
4047
4107
|
"true": {
|
|
4048
|
-
height: '595px'
|
|
4108
|
+
height: '595px',
|
|
4109
|
+
maxHeight: '595px'
|
|
4049
4110
|
},
|
|
4050
4111
|
"false": {
|
|
4051
4112
|
height: 'auto'
|
|
@@ -4068,18 +4129,16 @@ function SwapContainer(props) {
|
|
|
4068
4129
|
var TokenContainer = /*#__PURE__*/styled('div', {
|
|
4069
4130
|
display: 'flex',
|
|
4070
4131
|
alignItems: 'center',
|
|
4132
|
+
width: '160px',
|
|
4071
4133
|
'& .amount': {
|
|
4072
4134
|
fontWeight: 'bold'
|
|
4135
|
+
},
|
|
4136
|
+
'& .estimated': {
|
|
4137
|
+
color: '$neutrals600'
|
|
4073
4138
|
}
|
|
4074
4139
|
});
|
|
4075
|
-
var TokenImage
|
|
4140
|
+
var TokenImage = /*#__PURE__*/styled('div', {
|
|
4076
4141
|
position: 'relative',
|
|
4077
|
-
width: '$24',
|
|
4078
|
-
height: '$24',
|
|
4079
|
-
img: {
|
|
4080
|
-
width: '100%',
|
|
4081
|
-
display: 'block'
|
|
4082
|
-
},
|
|
4083
4142
|
'.overlay': {
|
|
4084
4143
|
position: 'absolute',
|
|
4085
4144
|
right: -4,
|
|
@@ -4088,29 +4147,41 @@ var TokenImage$1 = /*#__PURE__*/styled('div', {
|
|
|
4088
4147
|
height: '$16',
|
|
4089
4148
|
padding: '$2',
|
|
4090
4149
|
borderRadius: '50%',
|
|
4150
|
+
display: 'flex',
|
|
4151
|
+
justifyContent: 'center',
|
|
4152
|
+
alignItems: 'center',
|
|
4091
4153
|
backgroundColor: '$background',
|
|
4092
4154
|
border: '1px solid $neutrals400'
|
|
4093
4155
|
}
|
|
4094
4156
|
});
|
|
4095
4157
|
function Token(props) {
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4158
|
+
var _props$data = props.data,
|
|
4159
|
+
token = _props$data.token,
|
|
4160
|
+
blockchain = _props$data.blockchain,
|
|
4161
|
+
amount = _props$data.amount,
|
|
4162
|
+
estimatedAmount = _props$data.estimatedAmount;
|
|
4163
|
+
return React__default.createElement(TokenContainer, null, React__default.createElement(TokenImage, null, React__default.createElement(Image, {
|
|
4164
|
+
src: token.logo,
|
|
4165
|
+
alt: "",
|
|
4166
|
+
size: 24
|
|
4099
4167
|
}), React__default.createElement("div", {
|
|
4100
4168
|
className: "overlay"
|
|
4101
|
-
}, React__default.createElement(
|
|
4102
|
-
src:
|
|
4103
|
-
alt:
|
|
4169
|
+
}, React__default.createElement(Image, {
|
|
4170
|
+
src: blockchain.logo,
|
|
4171
|
+
alt: blockchain.name,
|
|
4172
|
+
size: 12
|
|
4104
4173
|
}))), React__default.createElement(Spacer, {
|
|
4105
4174
|
size: 8
|
|
4106
|
-
}), React__default.createElement("span", {
|
|
4175
|
+
}), !!amount && React__default.createElement("span", {
|
|
4107
4176
|
className: "amount"
|
|
4108
|
-
}, props.data.amount), React__default.createElement(
|
|
4177
|
+
}, props.data.amount), !amount && estimatedAmount && React__default.createElement("span", {
|
|
4178
|
+
className: "amount estimated"
|
|
4179
|
+
}, props.data.estimatedAmount), React__default.createElement(Spacer, {
|
|
4109
4180
|
size: 4
|
|
4110
|
-
}),
|
|
4181
|
+
}), token.symbol);
|
|
4111
4182
|
}
|
|
4112
4183
|
|
|
4113
|
-
var Container$
|
|
4184
|
+
var Container$3 = /*#__PURE__*/styled('div', {
|
|
4114
4185
|
position: 'relative',
|
|
4115
4186
|
display: 'flex',
|
|
4116
4187
|
justifyContent: 'space-between',
|
|
@@ -4126,12 +4197,6 @@ var Container$4 = /*#__PURE__*/styled('div', {
|
|
|
4126
4197
|
fontWeight: 'bold',
|
|
4127
4198
|
fontSize: '$12'
|
|
4128
4199
|
},
|
|
4129
|
-
'&.running': {
|
|
4130
|
-
color: '$foreground'
|
|
4131
|
-
},
|
|
4132
|
-
'&.failed,&.success': {
|
|
4133
|
-
color: '$neutrals600'
|
|
4134
|
-
},
|
|
4135
4200
|
'&.failed .status': {
|
|
4136
4201
|
color: '$error'
|
|
4137
4202
|
},
|
|
@@ -4150,7 +4215,7 @@ function SwapDetail(_ref) {
|
|
|
4150
4215
|
size: "free",
|
|
4151
4216
|
fullWidth: true,
|
|
4152
4217
|
onClick: onClick.bind(null, swap.requestId)
|
|
4153
|
-
}, React__default.createElement(Container$
|
|
4218
|
+
}, React__default.createElement(Container$3, {
|
|
4154
4219
|
className: "" + status
|
|
4155
4220
|
}, React__default.createElement("div", {
|
|
4156
4221
|
className: "info"
|
|
@@ -4161,11 +4226,10 @@ function SwapDetail(_ref) {
|
|
|
4161
4226
|
symbol: firstStep.fromSymbol
|
|
4162
4227
|
},
|
|
4163
4228
|
blockchain: {
|
|
4164
|
-
|
|
4165
|
-
logo: firstStep.fromBlockchainLogo,
|
|
4229
|
+
logo: firstStep.fromBlockchainLogo || '',
|
|
4166
4230
|
name: firstStep.fromBlockchain
|
|
4167
4231
|
},
|
|
4168
|
-
amount: swap.inputAmount
|
|
4232
|
+
amount: limitDecimalPlaces(swap.inputAmount)
|
|
4169
4233
|
}
|
|
4170
4234
|
}), React__default.createElement(Spacer, {
|
|
4171
4235
|
size: 12
|
|
@@ -4180,11 +4244,11 @@ function SwapDetail(_ref) {
|
|
|
4180
4244
|
symbol: lastStep.toSymbol
|
|
4181
4245
|
},
|
|
4182
4246
|
blockchain: {
|
|
4183
|
-
|
|
4184
|
-
logo: lastStep.toBlockchainLogo,
|
|
4247
|
+
logo: lastStep.toBlockchainLogo || '',
|
|
4185
4248
|
name: lastStep.toBlockchain
|
|
4186
4249
|
},
|
|
4187
|
-
amount: lastStep.outputAmount ||
|
|
4250
|
+
amount: limitDecimalPlaces(lastStep.outputAmount || ''),
|
|
4251
|
+
estimatedAmount: limitDecimalPlaces(lastStep.expectedOutputAmountHumanReadable || '')
|
|
4188
4252
|
}
|
|
4189
4253
|
})), React__default.createElement("div", {
|
|
4190
4254
|
className: "status"
|
|
@@ -4194,7 +4258,7 @@ function SwapDetail(_ref) {
|
|
|
4194
4258
|
}) : status)));
|
|
4195
4259
|
}
|
|
4196
4260
|
|
|
4197
|
-
var Container$
|
|
4261
|
+
var Container$4 = /*#__PURE__*/styled('div', {
|
|
4198
4262
|
position: 'relative'
|
|
4199
4263
|
});
|
|
4200
4264
|
var Color = /*#__PURE__*/styled('div', {
|
|
@@ -4244,7 +4308,7 @@ function ColorPicker(_ref) {
|
|
|
4244
4308
|
var _useState = React.useState(false),
|
|
4245
4309
|
displayColorPicker = _useState[0],
|
|
4246
4310
|
setDisplayColorPicker = _useState[1];
|
|
4247
|
-
return React__default.createElement(Container$
|
|
4311
|
+
return React__default.createElement(Container$4, null, React__default.createElement(Label$3, {
|
|
4248
4312
|
className: "_text"
|
|
4249
4313
|
}, label), React__default.createElement(Button, {
|
|
4250
4314
|
variant: "outlined",
|
|
@@ -4358,7 +4422,7 @@ function Drawer(props) {
|
|
|
4358
4422
|
anchor: anchor,
|
|
4359
4423
|
style: containerStyle
|
|
4360
4424
|
}, React__default.createElement(DrawerHeader, null, React__default.createElement(Typography, {
|
|
4361
|
-
variant: "
|
|
4425
|
+
variant: "h6"
|
|
4362
4426
|
}, title), showClose && React__default.createElement(CloseIcon, {
|
|
4363
4427
|
size: 24,
|
|
4364
4428
|
onClick: onClose
|
|
@@ -4383,7 +4447,7 @@ var AlertContainer = /*#__PURE__*/styled('div', {
|
|
|
4383
4447
|
var ConfirmButton = /*#__PURE__*/styled(Button, {
|
|
4384
4448
|
marginTop: '$16'
|
|
4385
4449
|
});
|
|
4386
|
-
var Container$
|
|
4450
|
+
var Container$5 = /*#__PURE__*/styled('div', {
|
|
4387
4451
|
paddingBottom: '$24',
|
|
4388
4452
|
'.title': {
|
|
4389
4453
|
paddingBottom: '$8',
|
|
@@ -4435,17 +4499,25 @@ function ConfirmSwap(props) {
|
|
|
4435
4499
|
}, 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
4500
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4437
4501
|
direction: "vertical"
|
|
4438
|
-
}), React__default.createElement(Alert, {
|
|
4502
|
+
}), React__default.createElement(Alert, Object.assign({
|
|
4439
4503
|
type: "error",
|
|
4440
4504
|
key: index
|
|
4441
|
-
}, error
|
|
4505
|
+
}, typeof error === 'string' ? {
|
|
4506
|
+
title: error
|
|
4507
|
+
} : {
|
|
4508
|
+
children: error
|
|
4509
|
+
})));
|
|
4442
4510
|
}), warnings == null ? void 0 : warnings.map(function (warning, index) {
|
|
4443
4511
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4444
4512
|
direction: "vertical"
|
|
4445
|
-
}), React__default.createElement(Alert, {
|
|
4513
|
+
}), React__default.createElement(Alert, Object.assign({
|
|
4446
4514
|
type: "warning",
|
|
4447
4515
|
key: index
|
|
4448
|
-
}, warning
|
|
4516
|
+
}, typeof warning === 'string' ? {
|
|
4517
|
+
title: warning
|
|
4518
|
+
} : {
|
|
4519
|
+
children: warning
|
|
4520
|
+
})));
|
|
4449
4521
|
}))), props.previewInputs || props.previewRoutes ? React__default.createElement(Section, null, props.previewInputs, !!props.previewRoutes ? React__default.createElement(Spacer, {
|
|
4450
4522
|
size: 16,
|
|
4451
4523
|
direction: "vertical"
|
|
@@ -4453,7 +4525,7 @@ function ConfirmSwap(props) {
|
|
|
4453
4525
|
var list = selectableWallets.filter(function (w) {
|
|
4454
4526
|
return wallet === w.chain;
|
|
4455
4527
|
});
|
|
4456
|
-
return React__default.createElement(Container$
|
|
4528
|
+
return React__default.createElement(Container$5, {
|
|
4457
4529
|
key: index
|
|
4458
4530
|
}, React__default.createElement("div", {
|
|
4459
4531
|
className: "title"
|
|
@@ -4465,7 +4537,7 @@ function ConfirmSwap(props) {
|
|
|
4465
4537
|
variant: "body2"
|
|
4466
4538
|
}, "Your ", wallet, " Wallet")), list.length === 0 && React__default.createElement(React__default.Fragment, null, React__default.createElement(AlertContainer, null, React__default.createElement(Alert, {
|
|
4467
4539
|
type: "error"
|
|
4468
|
-
}, "You need to connect a compatible wallet with ", wallet)), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
|
|
4540
|
+
}, "You need to connect a compatible wallet with ", wallet, ".")), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
|
|
4469
4541
|
variant: "contained",
|
|
4470
4542
|
type: "primary",
|
|
4471
4543
|
align: "grow",
|
|
@@ -4484,17 +4556,7 @@ var Group = /*#__PURE__*/styled('div', {
|
|
|
4484
4556
|
textTransform: 'uppercase'
|
|
4485
4557
|
}
|
|
4486
4558
|
});
|
|
4487
|
-
|
|
4488
|
-
overflowY: 'auto'
|
|
4489
|
-
});
|
|
4490
|
-
var filteredHistory = function filteredHistory(list, searchedFor) {
|
|
4491
|
-
return list.filter(function (swap) {
|
|
4492
|
-
var firstStep = swap.steps[0];
|
|
4493
|
-
var lastStep = swap.steps[swap.steps.length - 1];
|
|
4494
|
-
return containsText(firstStep.fromBlockchain, searchedFor) || containsText(firstStep.fromSymbol, searchedFor) || containsText(lastStep.toBlockchain, searchedFor) || containsText(lastStep.toSymbol, searchedFor) || containsText(swap.requestId, searchedFor);
|
|
4495
|
-
});
|
|
4496
|
-
};
|
|
4497
|
-
var SwapsGroup = function SwapsGroup(props) {
|
|
4559
|
+
function SwapsGroup(props) {
|
|
4498
4560
|
var list = props.list,
|
|
4499
4561
|
onSwapClick = props.onSwapClick,
|
|
4500
4562
|
groupBy = props.groupBy;
|
|
@@ -4524,27 +4586,41 @@ var SwapsGroup = function SwapsGroup(props) {
|
|
|
4524
4586
|
size: 24
|
|
4525
4587
|
}));
|
|
4526
4588
|
}));
|
|
4589
|
+
}
|
|
4590
|
+
|
|
4591
|
+
var Container$6 = /*#__PURE__*/styled('div', {
|
|
4592
|
+
overflowY: 'auto'
|
|
4593
|
+
});
|
|
4594
|
+
var filteredHistory = function filteredHistory(list, searchedFor) {
|
|
4595
|
+
return list.filter(function (swap) {
|
|
4596
|
+
var firstStep = swap.steps[0];
|
|
4597
|
+
var lastStep = swap.steps[swap.steps.length - 1];
|
|
4598
|
+
return containsText(firstStep.fromBlockchain, searchedFor) || containsText(firstStep.fromSymbol, searchedFor) || containsText(lastStep.toBlockchain, searchedFor) || containsText(lastStep.toSymbol, searchedFor) || containsText(swap.requestId, searchedFor);
|
|
4599
|
+
});
|
|
4527
4600
|
};
|
|
4528
|
-
function History(
|
|
4529
|
-
var
|
|
4530
|
-
list =
|
|
4531
|
-
onBack =
|
|
4532
|
-
onSwapClick =
|
|
4533
|
-
groupBy =
|
|
4601
|
+
function History(props) {
|
|
4602
|
+
var _props$list = props.list,
|
|
4603
|
+
list = _props$list === void 0 ? [] : _props$list,
|
|
4604
|
+
onBack = props.onBack,
|
|
4605
|
+
onSwapClick = props.onSwapClick,
|
|
4606
|
+
groupBy = props.groupBy,
|
|
4607
|
+
loading = props.loading;
|
|
4534
4608
|
return React__default.createElement(SecondaryPage, {
|
|
4535
4609
|
onBack: onBack,
|
|
4536
4610
|
textField: true,
|
|
4537
|
-
textFieldPlaceholder: "Search
|
|
4611
|
+
textFieldPlaceholder: "Search by Network, Token or Request ID",
|
|
4538
4612
|
title: "Swaps"
|
|
4539
4613
|
}, function (searchedFor) {
|
|
4540
4614
|
var filterSwaps = filteredHistory(list, searchedFor);
|
|
4541
|
-
return React__default.createElement(
|
|
4615
|
+
return React__default.createElement(React__default.Fragment, null, loading && React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
|
|
4616
|
+
size: 24
|
|
4617
|
+
})), React__default.createElement(Container$6, null, !loading && React__default.createElement(React__default.Fragment, null, filterSwaps.length ? React__default.createElement(SwapsGroup, {
|
|
4542
4618
|
list: filterSwaps,
|
|
4543
4619
|
onSwapClick: onSwapClick,
|
|
4544
4620
|
groupBy: groupBy
|
|
4545
4621
|
}) : React__default.createElement(NotFoundAlert, {
|
|
4546
4622
|
catergory: "Swap"
|
|
4547
|
-
}));
|
|
4623
|
+
}))));
|
|
4548
4624
|
});
|
|
4549
4625
|
}
|
|
4550
4626
|
|
|
@@ -4606,20 +4682,32 @@ var SwapMessages = function SwapMessages(props) {
|
|
|
4606
4682
|
}, "wallet"))));
|
|
4607
4683
|
};
|
|
4608
4684
|
|
|
4609
|
-
var _excluded$
|
|
4685
|
+
var _excluded$J = ["pendingSwap", "onBack", "onCopy", "isCopied", "onCancel", "date", "onRetry", "previewInputs"];
|
|
4610
4686
|
var SwapperContainer$1 = /*#__PURE__*/styled('div', {
|
|
4611
4687
|
display: 'flex',
|
|
4612
4688
|
alignItems: 'center',
|
|
4613
|
-
|
|
4689
|
+
paddingLeft: '$4',
|
|
4690
|
+
variants: {
|
|
4691
|
+
created: {
|
|
4692
|
+
"true": {
|
|
4693
|
+
filter: 'grayscale(100%)'
|
|
4694
|
+
}
|
|
4695
|
+
},
|
|
4696
|
+
running: {
|
|
4697
|
+
"true": {
|
|
4698
|
+
animation: pulse + " 2s ease-in-out infinite"
|
|
4699
|
+
}
|
|
4700
|
+
}
|
|
4701
|
+
}
|
|
4702
|
+
});
|
|
4703
|
+
var FeeContainer = /*#__PURE__*/styled('div', {
|
|
4704
|
+
paddingLeft: '$16',
|
|
4705
|
+
color: '$neutrals800'
|
|
4614
4706
|
});
|
|
4615
4707
|
var Fee = /*#__PURE__*/styled('div', {
|
|
4616
4708
|
display: 'flex',
|
|
4617
4709
|
alignItems: 'center'
|
|
4618
4710
|
});
|
|
4619
|
-
var SwapperLogo$1 = /*#__PURE__*/styled('img', {
|
|
4620
|
-
width: '$16',
|
|
4621
|
-
height: '$16'
|
|
4622
|
-
});
|
|
4623
4711
|
var RelativeContainer$1 = /*#__PURE__*/styled('div', {
|
|
4624
4712
|
position: 'relative'
|
|
4625
4713
|
});
|
|
@@ -4628,7 +4716,7 @@ var Dot$1 = /*#__PURE__*/styled('div', {
|
|
|
4628
4716
|
height: '$8',
|
|
4629
4717
|
backgroundColor: '$foreground',
|
|
4630
4718
|
borderRadius: '4px',
|
|
4631
|
-
marginLeft: '
|
|
4719
|
+
marginLeft: '11px'
|
|
4632
4720
|
});
|
|
4633
4721
|
var ArrowDown = /*#__PURE__*/styled('div', {
|
|
4634
4722
|
width: '0px',
|
|
@@ -4636,12 +4724,11 @@ var ArrowDown = /*#__PURE__*/styled('div', {
|
|
|
4636
4724
|
borderLeft: '5px solid transparent',
|
|
4637
4725
|
borderRight: '5px solid transparent',
|
|
4638
4726
|
borderTop: '5px solid $foreground',
|
|
4639
|
-
marginLeft: '$
|
|
4727
|
+
marginLeft: '$10'
|
|
4640
4728
|
});
|
|
4641
4729
|
var StyledAnchor = /*#__PURE__*/styled('a', {
|
|
4642
4730
|
color: '$primary',
|
|
4643
|
-
fontWeight: '$600'
|
|
4644
|
-
marginLeft: '$12'
|
|
4731
|
+
fontWeight: '$600'
|
|
4645
4732
|
});
|
|
4646
4733
|
var SwapInfoContainer = /*#__PURE__*/styled('div', {
|
|
4647
4734
|
display: 'flex',
|
|
@@ -4650,11 +4737,14 @@ var SwapInfoContainer = /*#__PURE__*/styled('div', {
|
|
|
4650
4737
|
borderBottom: '1px solid $neutrals300'
|
|
4651
4738
|
});
|
|
4652
4739
|
var InternalDetailsContainer = /*#__PURE__*/styled('div', {
|
|
4653
|
-
display: 'flex'
|
|
4740
|
+
display: 'flex',
|
|
4741
|
+
'.details': {
|
|
4742
|
+
padding: '$8 0'
|
|
4743
|
+
}
|
|
4654
4744
|
});
|
|
4655
4745
|
var InternalDetail = /*#__PURE__*/styled('div', {
|
|
4656
4746
|
display: 'flex',
|
|
4657
|
-
|
|
4747
|
+
margin: '$12 0 $12 $20'
|
|
4658
4748
|
});
|
|
4659
4749
|
var DescriptionContainer = /*#__PURE__*/styled('div', {
|
|
4660
4750
|
display: 'flex',
|
|
@@ -4662,15 +4752,12 @@ var DescriptionContainer = /*#__PURE__*/styled('div', {
|
|
|
4662
4752
|
});
|
|
4663
4753
|
var Description = /*#__PURE__*/styled(Typography, {
|
|
4664
4754
|
color: '$success',
|
|
4665
|
-
|
|
4666
|
-
});
|
|
4667
|
-
var Error = /*#__PURE__*/styled(Description, {
|
|
4668
|
-
color: '$error'
|
|
4755
|
+
paddingLeft: '$4'
|
|
4669
4756
|
});
|
|
4670
4757
|
var Line$1 = /*#__PURE__*/styled('div', {
|
|
4671
4758
|
width: '0',
|
|
4672
4759
|
minHeight: '$16',
|
|
4673
|
-
marginLeft: '
|
|
4760
|
+
marginLeft: '14px',
|
|
4674
4761
|
border: '1px dashed $foreground',
|
|
4675
4762
|
borderRadius: 'inherit'
|
|
4676
4763
|
});
|
|
@@ -4686,7 +4773,8 @@ var Row$2 = /*#__PURE__*/styled('div', {
|
|
|
4686
4773
|
'.value': {
|
|
4687
4774
|
display: 'flex',
|
|
4688
4775
|
alignItems: 'center',
|
|
4689
|
-
color: '$neutrals800'
|
|
4776
|
+
color: '$neutrals800',
|
|
4777
|
+
justifyContent: 'flex-end'
|
|
4690
4778
|
},
|
|
4691
4779
|
'.status': {
|
|
4692
4780
|
fontWeight: 'bold',
|
|
@@ -4709,26 +4797,13 @@ var RequestId = /*#__PURE__*/styled('div', {
|
|
|
4709
4797
|
}
|
|
4710
4798
|
});
|
|
4711
4799
|
var ExtraDetails = /*#__PURE__*/styled('div', {
|
|
4712
|
-
padding: '
|
|
4800
|
+
padding: '0',
|
|
4713
4801
|
color: '$neutrals600',
|
|
4714
|
-
fontSize: '$
|
|
4715
|
-
});
|
|
4716
|
-
var StepContainer$1 = /*#__PURE__*/styled('div', {
|
|
4717
|
-
variants: {
|
|
4718
|
-
hasNotStarted: {
|
|
4719
|
-
"true": {
|
|
4720
|
-
filter: 'grayscale(100%)'
|
|
4721
|
-
}
|
|
4722
|
-
},
|
|
4723
|
-
isRunning: {
|
|
4724
|
-
"true": {
|
|
4725
|
-
animation: pulse + " 2s ease-in-out infinite"
|
|
4726
|
-
}
|
|
4727
|
-
}
|
|
4728
|
-
}
|
|
4802
|
+
fontSize: '$10'
|
|
4729
4803
|
});
|
|
4730
4804
|
var SwapFlowContainer = /*#__PURE__*/styled('div', {
|
|
4731
|
-
overflowY: 'auto'
|
|
4805
|
+
overflowY: 'auto',
|
|
4806
|
+
padding: '$8 $4 $2 $4'
|
|
4732
4807
|
});
|
|
4733
4808
|
function SwapHistory(props) {
|
|
4734
4809
|
var pendingSwap = props.pendingSwap,
|
|
@@ -4738,7 +4813,7 @@ function SwapHistory(props) {
|
|
|
4738
4813
|
onCancel = props.onCancel,
|
|
4739
4814
|
date = props.date,
|
|
4740
4815
|
onRetry = props.onRetry,
|
|
4741
|
-
extraMessageProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
4816
|
+
extraMessageProps = _objectWithoutPropertiesLoose(props, _excluded$J);
|
|
4742
4817
|
var _useState = React.useState(false),
|
|
4743
4818
|
showDrawer = _useState[0],
|
|
4744
4819
|
setShowDrawer = _useState[1];
|
|
@@ -4759,7 +4834,7 @@ function SwapHistory(props) {
|
|
|
4759
4834
|
}, "Try again"))
|
|
4760
4835
|
}, React__default.createElement("div", null, React__default.createElement(SwapInfoContainer, null, React__default.createElement(Row$2, null, React__default.createElement("div", {
|
|
4761
4836
|
className: "name"
|
|
4762
|
-
}, "Request
|
|
4837
|
+
}, "Request Id:", React__default.createElement("span", {
|
|
4763
4838
|
className: "value requestId",
|
|
4764
4839
|
onClick: onCopy.bind(null, pendingSwap == null ? void 0 : pendingSwap.requestId)
|
|
4765
4840
|
}, React__default.createElement(RequestId, null, pendingSwap == null ? void 0 : pendingSwap.requestId), React__default.createElement(Spacer, {
|
|
@@ -4768,71 +4843,69 @@ function SwapHistory(props) {
|
|
|
4768
4843
|
type: "primary",
|
|
4769
4844
|
variant: "ghost",
|
|
4770
4845
|
size: "compact"
|
|
4771
|
-
}, isCopied ? 'Copied!' : 'Copy'))), React__default.createElement(
|
|
4846
|
+
}, isCopied ? 'Copied!' : 'Copy'))), React__default.createElement("div", {
|
|
4772
4847
|
className: "name"
|
|
4773
|
-
},
|
|
4848
|
+
}, React__default.createElement("span", {
|
|
4774
4849
|
className: "value status " + ((pendingSwap == null ? void 0 : pendingSwap.status) || '')
|
|
4775
4850
|
}, pendingSwap == null ? void 0 : pendingSwap.status, (pendingSwap == null ? void 0 : pendingSwap.status) === 'running' && React__default.createElement(Spinner, {
|
|
4776
4851
|
size: 16,
|
|
4777
4852
|
color: "primary"
|
|
4778
|
-
}))
|
|
4779
|
-
size:
|
|
4853
|
+
})), React__default.createElement(ExtraDetails, null, date))))), React__default.createElement(SwapFlowContainer, null, extraMessageProps.shortMessage && React__default.createElement(SwapMessages, Object.assign({}, extraMessageProps)), React__default.createElement(Divider, {
|
|
4854
|
+
size: 16
|
|
4780
4855
|
}), pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
|
|
4781
|
-
return React__default.createElement(
|
|
4782
|
-
key: index
|
|
4783
|
-
hasNotStarted: step.status === 'created',
|
|
4784
|
-
isRunning: step.status != 'failed' && step.status != 'success' && step.status != 'created'
|
|
4856
|
+
return React__default.createElement("div", {
|
|
4857
|
+
key: index
|
|
4785
4858
|
}, index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
|
|
4786
4859
|
logo: step.fromLogo,
|
|
4787
4860
|
symbol: step.fromSymbol,
|
|
4788
|
-
|
|
4789
|
-
chainLogo: step.fromBlockchainLogo,
|
|
4861
|
+
chainLogo: step.fromBlockchainLogo || '',
|
|
4790
4862
|
blockchain: step.fromBlockchain,
|
|
4791
4863
|
amount: pendingSwap.inputAmount
|
|
4792
|
-
}), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1,
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
src: step.swapperLogo,
|
|
4797
|
-
alt: step.swapperId
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
variant: "
|
|
4801
|
-
},
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
ml: 4,
|
|
4805
|
-
variant: "caption"
|
|
4806
|
-
}, "$",
|
|
4807
|
-
// @ts-ignore
|
|
4808
|
-
step.feeInUsd, ' ', "estimated gas fee")))), React__default.createElement("div", {
|
|
4864
|
+
}), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1, {
|
|
4865
|
+
created: step.status === 'created',
|
|
4866
|
+
running: !['created', 'success', 'failed'].includes(step.status)
|
|
4867
|
+
}, React__default.createElement(Image, {
|
|
4868
|
+
src: step.swapperLogo || '',
|
|
4869
|
+
alt: step.swapperId,
|
|
4870
|
+
size: 20
|
|
4871
|
+
}), React__default.createElement(FeeContainer, null, React__default.createElement(Typography, {
|
|
4872
|
+
variant: "body2"
|
|
4873
|
+
}, step.swapperType === 'DEX' ? 'Swap' : 'Bridge', " via", ' ', step.swapperId), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
|
|
4874
|
+
variant: "body2"
|
|
4875
|
+
}, "\xA0 $", step.feeInUsd, " estimated gas fee")))), React__default.createElement("div", {
|
|
4809
4876
|
style: {
|
|
4810
4877
|
display: 'flex'
|
|
4811
4878
|
}
|
|
4812
|
-
}, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null),
|
|
4879
|
+
}, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), React__default.createElement("div", {
|
|
4880
|
+
className: "details"
|
|
4881
|
+
}, !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
|
|
4813
4882
|
return React__default.createElement(InternalDetail, {
|
|
4814
4883
|
key: index
|
|
4815
|
-
}, React__default.createElement(DescriptionContainer, null, React__default.createElement(
|
|
4816
|
-
|
|
4884
|
+
}, React__default.createElement(DescriptionContainer, null, React__default.createElement(Divider, {
|
|
4885
|
+
size: 4
|
|
4886
|
+
}), React__default.createElement(CheckCircleIcon, {
|
|
4887
|
+
color: "primary"
|
|
4817
4888
|
}), React__default.createElement(Description, {
|
|
4818
4889
|
variant: "body2"
|
|
4819
|
-
},
|
|
4890
|
+
}, React__default.createElement(StyledAnchor, {
|
|
4820
4891
|
href: item.url,
|
|
4821
4892
|
target: "_blank",
|
|
4822
4893
|
rel: "noreferrer",
|
|
4823
4894
|
key: index
|
|
4824
|
-
}, "
|
|
4825
|
-
}), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
|
|
4895
|
+
}, !item.description ? React__default.createElement("b", null, "View transaction") : React__default.createElement("b", null, item.description.substring(0, 1).toUpperCase(), item.description.substring(1), " Tx")))));
|
|
4896
|
+
})), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
|
|
4826
4897
|
color: "error"
|
|
4827
|
-
}), React__default.createElement(
|
|
4828
|
-
variant: "body2"
|
|
4898
|
+
}), React__default.createElement(Description, {
|
|
4899
|
+
variant: "body2",
|
|
4900
|
+
color: "$error500"
|
|
4829
4901
|
}, "Step failed")))))), index + 1 === pendingSwap.steps.length && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
|
|
4830
4902
|
logo: step.toLogo,
|
|
4831
4903
|
symbol: step.toSymbol,
|
|
4832
|
-
|
|
4833
|
-
chainLogo: step.toBlockchainLogo,
|
|
4904
|
+
chainLogo: step.toBlockchainLogo || '',
|
|
4834
4905
|
blockchain: step.toBlockchain,
|
|
4835
|
-
amount: step.outputAmount || ''
|
|
4906
|
+
amount: step.outputAmount || '',
|
|
4907
|
+
estimatedAmount: step.expectedOutputAmountHumanReadable || '',
|
|
4908
|
+
success: step.status === 'success'
|
|
4836
4909
|
}));
|
|
4837
4910
|
}), React__default.createElement(Divider, {
|
|
4838
4911
|
size: 32
|
|
@@ -4844,10 +4917,9 @@ function SwapHistory(props) {
|
|
|
4844
4917
|
title: "Cancel Progress",
|
|
4845
4918
|
content: React__default.createElement(Alert, {
|
|
4846
4919
|
type: "warning"
|
|
4847
|
-
}, React__default.createElement(
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
}), React__default.createElement("p", null, "If you have already signed your transaction to blockchain, you should wait for that to complete or rollback")),
|
|
4920
|
+
}, React__default.createElement(Typography, {
|
|
4921
|
+
variant: "body2"
|
|
4922
|
+
}, "Warning: Cancel ", React__default.createElement("u", null, "doesn't revert"), " your transaction if you've already signed and sent a transaction to the blockchain. It only stops next steps from being executed.")),
|
|
4851
4923
|
footer: React__default.createElement("div", {
|
|
4852
4924
|
style: {
|
|
4853
4925
|
display: 'flex',
|
|
@@ -4910,6 +4982,7 @@ exports.Header = Header;
|
|
|
4910
4982
|
exports.History = History;
|
|
4911
4983
|
exports.HistoryIcon = HistoryIcon;
|
|
4912
4984
|
exports.HorizontalSwapIcon = HorizontalSwapIcon;
|
|
4985
|
+
exports.Image = Image;
|
|
4913
4986
|
exports.InfoCircleIcon = InfoCircleIcon;
|
|
4914
4987
|
exports.LiquiditySourcesSelector = LiquiditySourcesSelector;
|
|
4915
4988
|
exports.LoadingFailedAlert = LoadingFailedAlert;
|
|
@@ -4933,6 +5006,7 @@ exports.SwapContainer = SwapContainer;
|
|
|
4933
5006
|
exports.SwapDetail = SwapDetail;
|
|
4934
5007
|
exports.SwapHistory = SwapHistory;
|
|
4935
5008
|
exports.SwapWalletIcon = SwapWalletIcon;
|
|
5009
|
+
exports.SwapsGroup = SwapsGroup;
|
|
4936
5010
|
exports.Switch = Switch;
|
|
4937
5011
|
exports.TextField = TextField;
|
|
4938
5012
|
exports.TimeIcon = TimeIcon;
|