@rango-dev/ui 0.1.10 → 0.1.11-next.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 -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 +332 -256
- 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 +331 -257
- package/dist/ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Alert/Alert.tsx +1 -1
- 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 +8 -0
- 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 +120 -135
- package/src/containers/SwapHistory/SwapMessages.tsx +8 -8
- package/src/helper/index.ts +20 -5
package/dist/ui.esm.js
CHANGED
|
@@ -218,6 +218,11 @@ var SvgWithStrokeColor = /*#__PURE__*/styled('svg', {
|
|
|
218
218
|
}, _white["." + darkTheme + " &"] = {
|
|
219
219
|
$$color: '$colors$foreground'
|
|
220
220
|
}, _white.stroke = '$$color', _white)
|
|
221
|
+
},
|
|
222
|
+
disabled: {
|
|
223
|
+
"true": {
|
|
224
|
+
stroke: '$neutrals400'
|
|
225
|
+
}
|
|
221
226
|
}
|
|
222
227
|
}
|
|
223
228
|
});
|
|
@@ -247,6 +252,11 @@ var SvgWithFillColor = /*#__PURE__*/styled('svg', {
|
|
|
247
252
|
}, _white2["." + darkTheme + " &"] = {
|
|
248
253
|
$$color: '$colors$foreground'
|
|
249
254
|
}, _white2.fill = '$$color', _white2)
|
|
255
|
+
},
|
|
256
|
+
disabled: {
|
|
257
|
+
"true": {
|
|
258
|
+
stroke: '$neutrals400'
|
|
259
|
+
}
|
|
250
260
|
}
|
|
251
261
|
}
|
|
252
262
|
});
|
|
@@ -1475,6 +1485,13 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
|
|
|
1475
1485
|
fontSize: '$18'
|
|
1476
1486
|
}
|
|
1477
1487
|
},
|
|
1488
|
+
title: {
|
|
1489
|
+
fontSize: '$14',
|
|
1490
|
+
fontWeight: '$500',
|
|
1491
|
+
'@md': {
|
|
1492
|
+
fontSize: '$15'
|
|
1493
|
+
}
|
|
1494
|
+
},
|
|
1478
1495
|
body1: {
|
|
1479
1496
|
fontSize: '$14',
|
|
1480
1497
|
fontWeight: '$400',
|
|
@@ -1642,6 +1659,14 @@ var StepContainer = /*#__PURE__*/styled('div', {
|
|
|
1642
1659
|
textAlign: 'center',
|
|
1643
1660
|
justifyContent: 'center'
|
|
1644
1661
|
}
|
|
1662
|
+
},
|
|
1663
|
+
success: {
|
|
1664
|
+
"true": {
|
|
1665
|
+
filter: 'none'
|
|
1666
|
+
},
|
|
1667
|
+
"false": {
|
|
1668
|
+
filter: 'grayscale(100%)'
|
|
1669
|
+
}
|
|
1645
1670
|
}
|
|
1646
1671
|
}
|
|
1647
1672
|
});
|
|
@@ -1662,18 +1687,23 @@ var Detail = /*#__PURE__*/styled('div', {
|
|
|
1662
1687
|
});
|
|
1663
1688
|
var SubTitle = /*#__PURE__*/styled(Typography, {
|
|
1664
1689
|
color: '$neutrals600',
|
|
1665
|
-
display: 'block'
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1690
|
+
display: 'block',
|
|
1691
|
+
paddingLeft: '$8'
|
|
1692
|
+
});
|
|
1693
|
+
function StepDetail(props) {
|
|
1694
|
+
var logo = props.logo,
|
|
1695
|
+
chainLogo = props.chainLogo,
|
|
1696
|
+
amount = props.amount,
|
|
1697
|
+
symbol = props.symbol,
|
|
1698
|
+
blockchain = props.blockchain,
|
|
1699
|
+
estimatedAmount = props.estimatedAmount,
|
|
1700
|
+
_props$success = props.success,
|
|
1701
|
+
success = _props$success === void 0 ? true : _props$success,
|
|
1702
|
+
_props$direction = props.direction,
|
|
1703
|
+
direction = _props$direction === void 0 ? 'horizontal' : _props$direction;
|
|
1675
1704
|
return React__default.createElement(StepContainer, {
|
|
1676
|
-
direction: direction
|
|
1705
|
+
direction: direction,
|
|
1706
|
+
success: success
|
|
1677
1707
|
}, React__default.createElement(StepLogoContainer, {
|
|
1678
1708
|
direction: direction
|
|
1679
1709
|
}, React__default.createElement(Logo, {
|
|
@@ -1684,13 +1714,20 @@ function StepDetail(_ref) {
|
|
|
1684
1714
|
alt: blockchain
|
|
1685
1715
|
}))), React__default.createElement(Detail, {
|
|
1686
1716
|
pl: direction === 'horizontal'
|
|
1687
|
-
}, React__default.createElement(Typography, {
|
|
1717
|
+
}, amount && React__default.createElement(Typography, {
|
|
1688
1718
|
noWrap: true,
|
|
1689
|
-
variant: direction === 'vertical' ? 'body2' : '
|
|
1690
|
-
}, amount
|
|
1719
|
+
variant: direction === 'vertical' ? 'body2' : 'title'
|
|
1720
|
+
}, amount), !amount && estimatedAmount && React__default.createElement(Typography, {
|
|
1721
|
+
noWrap: true,
|
|
1722
|
+
variant: direction === 'vertical' ? 'body2' : 'title',
|
|
1723
|
+
color: '$neutrals600'
|
|
1724
|
+
}, estimatedAmount), "\xA0", React__default.createElement(Typography, {
|
|
1725
|
+
variant: direction === 'vertical' ? 'body2' : 'title',
|
|
1726
|
+
noWrap: true
|
|
1727
|
+
}, symbol), React__default.createElement(SubTitle, {
|
|
1691
1728
|
noWrap: true,
|
|
1692
1729
|
variant: "caption",
|
|
1693
|
-
color: "neutrals800"
|
|
1730
|
+
color: "$neutrals800"
|
|
1694
1731
|
}, "on ", blockchain)));
|
|
1695
1732
|
}
|
|
1696
1733
|
|
|
@@ -1912,6 +1949,37 @@ function Tooltip(_ref) {
|
|
|
1912
1949
|
})))));
|
|
1913
1950
|
}
|
|
1914
1951
|
|
|
1952
|
+
var FilledCircle = /*#__PURE__*/styled('span', {
|
|
1953
|
+
width: '10px',
|
|
1954
|
+
height: '10px',
|
|
1955
|
+
backgroundColor: '$primary',
|
|
1956
|
+
borderRadius: '99999px'
|
|
1957
|
+
});
|
|
1958
|
+
|
|
1959
|
+
var _excluded$E = ["size"];
|
|
1960
|
+
var ImageContainer = /*#__PURE__*/styled('div', {
|
|
1961
|
+
display: 'flex',
|
|
1962
|
+
justifyContent: 'center',
|
|
1963
|
+
alignItems: 'center',
|
|
1964
|
+
'.image': {
|
|
1965
|
+
width: '100%',
|
|
1966
|
+
height: '100%',
|
|
1967
|
+
objectFit: 'contain'
|
|
1968
|
+
}
|
|
1969
|
+
});
|
|
1970
|
+
function Image(props) {
|
|
1971
|
+
var size = props.size,
|
|
1972
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$E);
|
|
1973
|
+
return React__default.createElement(ImageContainer, {
|
|
1974
|
+
css: {
|
|
1975
|
+
width: size + 'px',
|
|
1976
|
+
height: size + 'px'
|
|
1977
|
+
}
|
|
1978
|
+
}, React__default.createElement("img", Object.assign({
|
|
1979
|
+
className: "image"
|
|
1980
|
+
}, otherProps)));
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1915
1983
|
var Container = /*#__PURE__*/styled('div', {
|
|
1916
1984
|
borderRadius: '$5',
|
|
1917
1985
|
border: '1px solid $neutrals300',
|
|
@@ -1949,10 +2017,6 @@ var HR = /*#__PURE__*/styled('hr', {
|
|
|
1949
2017
|
border: '1px solid $neutrals400',
|
|
1950
2018
|
margin: '$8 0'
|
|
1951
2019
|
});
|
|
1952
|
-
var SwapperLogo = /*#__PURE__*/styled('img', {
|
|
1953
|
-
width: '$16',
|
|
1954
|
-
height: '$16'
|
|
1955
|
-
});
|
|
1956
2020
|
var RelativeContainer = /*#__PURE__*/styled('div', {
|
|
1957
2021
|
position: 'relative'
|
|
1958
2022
|
});
|
|
@@ -2084,9 +2148,10 @@ function BestRoute(props) {
|
|
|
2084
2148
|
chainLogo: swap.from.blockchainLogo,
|
|
2085
2149
|
blockchain: swap.from.blockchain,
|
|
2086
2150
|
amount: swap.fromAmount
|
|
2087
|
-
}), React__default.createElement(Dot, null)), React__default.createElement(SwapperContainer, null, React__default.createElement(Line, null), React__default.createElement(
|
|
2151
|
+
}), React__default.createElement(Dot, null)), React__default.createElement(SwapperContainer, null, React__default.createElement(Line, null), React__default.createElement(Image, {
|
|
2088
2152
|
src: swap.swapperLogo,
|
|
2089
|
-
alt: swap.swapperId
|
|
2153
|
+
alt: swap.swapperId,
|
|
2154
|
+
size: 20
|
|
2090
2155
|
}), 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, {
|
|
2091
2156
|
direction: "vertical",
|
|
2092
2157
|
logo: swap.to.logo,
|
|
@@ -2100,7 +2165,7 @@ function BestRoute(props) {
|
|
|
2100
2165
|
}, "No routes found")));
|
|
2101
2166
|
}
|
|
2102
2167
|
|
|
2103
|
-
var _excluded$
|
|
2168
|
+
var _excluded$F = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
|
|
2104
2169
|
var _ghost, _css, _css2, _css3;
|
|
2105
2170
|
var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
2106
2171
|
borderRadius: '$5',
|
|
@@ -2445,7 +2510,7 @@ function Button(_ref) {
|
|
|
2445
2510
|
suffix = _ref.suffix,
|
|
2446
2511
|
align = _ref.align,
|
|
2447
2512
|
flexContent = _ref.flexContent,
|
|
2448
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2513
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
2449
2514
|
var isDisabled = loading || disabled;
|
|
2450
2515
|
return React__default.createElement(ButtonContainer, Object.assign({
|
|
2451
2516
|
disabled: isDisabled
|
|
@@ -2463,13 +2528,6 @@ function Button(_ref) {
|
|
|
2463
2528
|
}), suffix);
|
|
2464
2529
|
}
|
|
2465
2530
|
|
|
2466
|
-
var FilledCircle = /*#__PURE__*/styled('span', {
|
|
2467
|
-
width: '10px',
|
|
2468
|
-
height: '10px',
|
|
2469
|
-
backgroundColor: '$primary',
|
|
2470
|
-
borderRadius: '99999px'
|
|
2471
|
-
});
|
|
2472
|
-
|
|
2473
2531
|
var ListContainer = /*#__PURE__*/styled('div', {
|
|
2474
2532
|
display: 'grid',
|
|
2475
2533
|
gap: '.5rem',
|
|
@@ -2478,10 +2536,8 @@ var ListContainer = /*#__PURE__*/styled('div', {
|
|
|
2478
2536
|
width: '100%',
|
|
2479
2537
|
height: '100%'
|
|
2480
2538
|
});
|
|
2481
|
-
var
|
|
2482
|
-
|
|
2483
|
-
maxHeight: '1.5rem',
|
|
2484
|
-
marginRight: '$4'
|
|
2539
|
+
var ImageContainer$1 = /*#__PURE__*/styled('div', {
|
|
2540
|
+
paddingRight: '$4'
|
|
2485
2541
|
});
|
|
2486
2542
|
function BlockchainsList(props) {
|
|
2487
2543
|
var list = props.list,
|
|
@@ -2508,9 +2564,10 @@ function BlockchainsList(props) {
|
|
|
2508
2564
|
type: isSelect(blockchain.name) ? 'primary' : undefined,
|
|
2509
2565
|
variant: "outlined",
|
|
2510
2566
|
size: "large",
|
|
2511
|
-
prefix: React__default.createElement(Image, {
|
|
2567
|
+
prefix: React__default.createElement(ImageContainer$1, null, React__default.createElement(Image, {
|
|
2568
|
+
size: 24,
|
|
2512
2569
|
src: blockchain.logo
|
|
2513
|
-
}),
|
|
2570
|
+
})),
|
|
2514
2571
|
suffix: isSelect(blockchain.name) ? React__default.createElement(FilledCircle, null) : undefined,
|
|
2515
2572
|
align: "start",
|
|
2516
2573
|
onClick: changeSelectedBlockchain.bind(null, blockchain),
|
|
@@ -2581,7 +2638,7 @@ function Header(props) {
|
|
|
2581
2638
|
}, props.title), props.suffix || React__default.createElement("div", null));
|
|
2582
2639
|
}
|
|
2583
2640
|
|
|
2584
|
-
var _excluded$
|
|
2641
|
+
var _excluded$G = ["label", "prefix", "suffix", "children", "size", "style"];
|
|
2585
2642
|
var InputContainer = /*#__PURE__*/styled('div', {
|
|
2586
2643
|
backgroundColor: '$background',
|
|
2587
2644
|
padding: '1px',
|
|
@@ -2594,6 +2651,7 @@ var InputContainer = /*#__PURE__*/styled('div', {
|
|
|
2594
2651
|
position: 'relative',
|
|
2595
2652
|
alignItems: 'center',
|
|
2596
2653
|
color: '$foreground',
|
|
2654
|
+
overflowX: 'hidden',
|
|
2597
2655
|
transition: 'border-color ease .3s',
|
|
2598
2656
|
'&:focus-within': {
|
|
2599
2657
|
borderColor: '$success',
|
|
@@ -2654,6 +2712,13 @@ var Input = /*#__PURE__*/styled('input', {
|
|
|
2654
2712
|
margin: 0,
|
|
2655
2713
|
'&:disabled': {
|
|
2656
2714
|
cursor: 'not-allowed'
|
|
2715
|
+
},
|
|
2716
|
+
'&::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {
|
|
2717
|
+
'-webkit-appearance': 'none',
|
|
2718
|
+
margin: 0
|
|
2719
|
+
},
|
|
2720
|
+
'&[type="number"]': {
|
|
2721
|
+
'-moz-appearance': 'textfield'
|
|
2657
2722
|
}
|
|
2658
2723
|
});
|
|
2659
2724
|
var Label = /*#__PURE__*/styled('label', {
|
|
@@ -2668,7 +2733,7 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
2668
2733
|
suffix = props.suffix,
|
|
2669
2734
|
size = props.size,
|
|
2670
2735
|
style = props.style,
|
|
2671
|
-
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$
|
|
2736
|
+
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$G);
|
|
2672
2737
|
return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({
|
|
2673
2738
|
className: "_text"
|
|
2674
2739
|
}, inputAttributes.id && {
|
|
@@ -2728,10 +2793,10 @@ function SecondaryPage(props) {
|
|
|
2728
2793
|
})), props.textField && (props.children == null ? void 0 : props.children(searchedFor)), !props.textField && props.children), Footer);
|
|
2729
2794
|
}
|
|
2730
2795
|
|
|
2731
|
-
|
|
2796
|
+
function containsText(text, searchText) {
|
|
2732
2797
|
return text.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
|
|
2733
|
-
}
|
|
2734
|
-
|
|
2798
|
+
}
|
|
2799
|
+
function getConciseAddress(address, maxChars, ellipsisLength) {
|
|
2735
2800
|
if (maxChars === void 0) {
|
|
2736
2801
|
maxChars = 8;
|
|
2737
2802
|
}
|
|
@@ -2743,7 +2808,19 @@ var getConciseAddress = function getConciseAddress(address, maxChars, ellipsisLe
|
|
|
2743
2808
|
var start = Math.ceil((address.length - maxChars) / 2);
|
|
2744
2809
|
var end = address.length - maxChars;
|
|
2745
2810
|
return "" + address.substr(start, maxChars) + '.'.repeat(ellipsisLength) + address.substr(end);
|
|
2746
|
-
}
|
|
2811
|
+
}
|
|
2812
|
+
function limitDecimalPlaces(numberString, maxDecimalPlaces) {
|
|
2813
|
+
if (maxDecimalPlaces === void 0) {
|
|
2814
|
+
maxDecimalPlaces = 4;
|
|
2815
|
+
}
|
|
2816
|
+
var number = parseFloat(numberString);
|
|
2817
|
+
if (isNaN(number)) return numberString; // Return the original string if it's not a valid number
|
|
2818
|
+
else {
|
|
2819
|
+
var multiplier = Math.pow(10, maxDecimalPlaces);
|
|
2820
|
+
var roundedNumber = Math.round(number * multiplier) / multiplier;
|
|
2821
|
+
return roundedNumber.toString();
|
|
2822
|
+
}
|
|
2823
|
+
}
|
|
2747
2824
|
|
|
2748
2825
|
var SpacerContainer = /*#__PURE__*/styled('div', {
|
|
2749
2826
|
variants: {
|
|
@@ -2932,7 +3009,7 @@ function Alert(props) {
|
|
|
2932
3009
|
}
|
|
2933
3010
|
}, title && React__default.createElement(React__default.Fragment, null, React__default.createElement(Typography, {
|
|
2934
3011
|
className: "title",
|
|
2935
|
-
variant: "
|
|
3012
|
+
variant: "title",
|
|
2936
3013
|
color: type
|
|
2937
3014
|
}, title), !!children && React__default.createElement(Spacer, {
|
|
2938
3015
|
size: 8,
|
|
@@ -3001,10 +3078,8 @@ function VirtualizedList(props) {
|
|
|
3001
3078
|
});
|
|
3002
3079
|
}
|
|
3003
3080
|
|
|
3004
|
-
var
|
|
3005
|
-
|
|
3006
|
-
maxHeight: '$32',
|
|
3007
|
-
marginRight: '$16'
|
|
3081
|
+
var TokenImageContainer = /*#__PURE__*/styled('div', {
|
|
3082
|
+
paddingRight: '$16'
|
|
3008
3083
|
});
|
|
3009
3084
|
var TokenNameContainer = /*#__PURE__*/styled('div', {
|
|
3010
3085
|
display: 'flex',
|
|
@@ -3037,9 +3112,10 @@ function TokenItem(props) {
|
|
|
3037
3112
|
align: "start",
|
|
3038
3113
|
onClick: onClick.bind(null, token),
|
|
3039
3114
|
type: selected ? 'primary' : undefined,
|
|
3040
|
-
prefix: React__default.createElement(
|
|
3041
|
-
src: token.image
|
|
3042
|
-
|
|
3115
|
+
prefix: React__default.createElement(TokenImageContainer, null, React__default.createElement(Image, {
|
|
3116
|
+
src: token.image,
|
|
3117
|
+
size: 32
|
|
3118
|
+
})),
|
|
3043
3119
|
suffix: ((_token$balance = token.balance) == null ? void 0 : _token$balance.amount) && React__default.createElement(TokenAmountContainer, null, React__default.createElement(Typography, {
|
|
3044
3120
|
variant: "body2"
|
|
3045
3121
|
}, token.balance.amount), React__default.createElement(Typography, {
|
|
@@ -3053,7 +3129,7 @@ function TokenItem(props) {
|
|
|
3053
3129
|
}, token.name))));
|
|
3054
3130
|
}
|
|
3055
3131
|
|
|
3056
|
-
var _excluded$
|
|
3132
|
+
var _excluded$H = ["style"];
|
|
3057
3133
|
var PAGE_SIZE = 20;
|
|
3058
3134
|
function TokenList(props) {
|
|
3059
3135
|
var list = props.list,
|
|
@@ -3070,7 +3146,7 @@ function TokenList(props) {
|
|
|
3070
3146
|
};
|
|
3071
3147
|
var isSelected = function isSelected(token) {
|
|
3072
3148
|
if (multiSelect && selectedList) {
|
|
3073
|
-
return selectedList
|
|
3149
|
+
return selectedList.map(function (item) {
|
|
3074
3150
|
return item.symbol + item.address;
|
|
3075
3151
|
}).indexOf(token.symbol + token.address) > -1;
|
|
3076
3152
|
}
|
|
@@ -3093,7 +3169,7 @@ function TokenList(props) {
|
|
|
3093
3169
|
}, [tokens.length]);
|
|
3094
3170
|
var innerElementType = forwardRef(function (_ref, ref) {
|
|
3095
3171
|
var style = _ref.style,
|
|
3096
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3172
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
3097
3173
|
return React__default.createElement("div", Object.assign({
|
|
3098
3174
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3099
3175
|
ref: ref,
|
|
@@ -3121,15 +3197,12 @@ function TokenList(props) {
|
|
|
3121
3197
|
});
|
|
3122
3198
|
}
|
|
3123
3199
|
|
|
3124
|
-
var Container$1 = /*#__PURE__*/styled('div', {
|
|
3125
|
-
flex: '1'
|
|
3126
|
-
});
|
|
3127
3200
|
var LoaderContainer = /*#__PURE__*/styled('div', {
|
|
3128
3201
|
display: 'flex',
|
|
3129
3202
|
justifyContent: 'center',
|
|
3130
3203
|
width: '100%',
|
|
3131
|
-
|
|
3132
|
-
|
|
3204
|
+
paddingTop: '33%',
|
|
3205
|
+
flex: 1
|
|
3133
3206
|
});
|
|
3134
3207
|
var filterTokens = function filterTokens(list, searchedFor) {
|
|
3135
3208
|
return list.filter(function (token) {
|
|
@@ -3140,38 +3213,35 @@ function TokenSelector(props) {
|
|
|
3140
3213
|
var list = props.list,
|
|
3141
3214
|
type = props.type,
|
|
3142
3215
|
selected = props.selected,
|
|
3143
|
-
onChange = props.onChange,
|
|
3144
3216
|
hasHeader = props.hasHeader,
|
|
3145
|
-
|
|
3146
|
-
selectedList = props.selectedList,
|
|
3217
|
+
onChange = props.onChange,
|
|
3147
3218
|
onBack = props.onBack,
|
|
3148
3219
|
loadingStatus = props.loadingStatus;
|
|
3149
3220
|
return React__default.createElement(SecondaryPage, {
|
|
3150
3221
|
textField: true,
|
|
3151
|
-
textFieldPlaceholder: "Search Blockchain By Name",
|
|
3152
|
-
title: "Select " + type + " Token",
|
|
3153
3222
|
hasHeader: hasHeader,
|
|
3154
|
-
|
|
3223
|
+
title: "Select " + type + " Token",
|
|
3224
|
+
onBack: onBack,
|
|
3225
|
+
textFieldPlaceholder: "Search Token By Name"
|
|
3155
3226
|
}, function (searchedFor) {
|
|
3156
3227
|
var filteredTokens = filterTokens(list, searchedFor);
|
|
3157
|
-
return
|
|
3228
|
+
return loadingStatus === 'loading' ? React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
|
|
3158
3229
|
size: 24
|
|
3159
|
-
}))
|
|
3230
|
+
})) : loadingStatus === 'failed' ? React__default.createElement(LoadingFailedAlert, null) : filteredTokens.length ? React__default.createElement(TokenList, {
|
|
3160
3231
|
searchedText: searchedFor,
|
|
3161
3232
|
list: filteredTokens,
|
|
3162
3233
|
selected: selected,
|
|
3163
|
-
selectedList: selectedList,
|
|
3164
|
-
multiSelect: multiSelect,
|
|
3165
3234
|
onChange: onChange
|
|
3166
3235
|
}) : React__default.createElement(NotFoundAlert, {
|
|
3167
3236
|
catergory: "Token",
|
|
3168
3237
|
searchedFor: searchedFor
|
|
3169
|
-
})
|
|
3238
|
+
});
|
|
3170
3239
|
});
|
|
3171
3240
|
}
|
|
3172
3241
|
|
|
3173
3242
|
var ListContainer$1 = /*#__PURE__*/styled('div', {
|
|
3174
|
-
overflowY: 'auto'
|
|
3243
|
+
overflowY: 'auto',
|
|
3244
|
+
padding: '0 $4'
|
|
3175
3245
|
});
|
|
3176
3246
|
var filterBlockchains = function filterBlockchains(list, searchedFor) {
|
|
3177
3247
|
return list.filter(function (blockchain) {
|
|
@@ -3197,12 +3267,12 @@ function BlockchainSelector(props) {
|
|
|
3197
3267
|
onBack: onBack
|
|
3198
3268
|
}, function (searchedFor) {
|
|
3199
3269
|
var filteredBlockchains = filterBlockchains(list, searchedFor);
|
|
3200
|
-
return React__default.createElement(
|
|
3270
|
+
return React__default.createElement(React__default.Fragment, null, loadingStatus === 'loading' && React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
|
|
3271
|
+
size: 24
|
|
3272
|
+
})), React__default.createElement(ListContainer$1, {
|
|
3201
3273
|
style: listContainerStyle,
|
|
3202
3274
|
key: "1"
|
|
3203
|
-
}, loadingStatus === '
|
|
3204
|
-
size: 24
|
|
3205
|
-
})), loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredBlockchains.length ? React__default.createElement(BlockchainsList, {
|
|
3275
|
+
}, loadingStatus === 'failed' && React__default.createElement(LoadingFailedAlert, null), loadingStatus === 'success' && React__default.createElement(React__default.Fragment, null, filteredBlockchains.length ? React__default.createElement(BlockchainsList, {
|
|
3206
3276
|
list: filteredBlockchains,
|
|
3207
3277
|
selected: selected,
|
|
3208
3278
|
multiSelect: multiSelect,
|
|
@@ -3211,11 +3281,11 @@ function BlockchainSelector(props) {
|
|
|
3211
3281
|
}) : React__default.createElement(NotFoundAlert, {
|
|
3212
3282
|
catergory: "Blockchain",
|
|
3213
3283
|
searchedFor: searchedFor
|
|
3214
|
-
})));
|
|
3284
|
+
}))));
|
|
3215
3285
|
});
|
|
3216
3286
|
}
|
|
3217
3287
|
|
|
3218
|
-
var _excluded$
|
|
3288
|
+
var _excluded$I = ["label", "id"];
|
|
3219
3289
|
var CheckboxContainer = /*#__PURE__*/styled('div', {
|
|
3220
3290
|
display: 'flex',
|
|
3221
3291
|
alignItems: 'center'
|
|
@@ -3240,7 +3310,7 @@ var Label$1 = /*#__PURE__*/styled('label', {
|
|
|
3240
3310
|
function Checkbox(_ref) {
|
|
3241
3311
|
var label = _ref.label,
|
|
3242
3312
|
id = _ref.id,
|
|
3243
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3313
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
3244
3314
|
return React__default.createElement(CheckboxContainer, null, React__default.createElement(CheckboxRoot, Object.assign({
|
|
3245
3315
|
id: id
|
|
3246
3316
|
}, props), React__default.createElement(Indicator, null, React__default.createElement(CheckIcon, {
|
|
@@ -3323,15 +3393,13 @@ var ModalHeader = /*#__PURE__*/styled('div', {
|
|
|
3323
3393
|
position: 'relative',
|
|
3324
3394
|
marginBottom: '$16'
|
|
3325
3395
|
});
|
|
3326
|
-
var ContentContainer$1 = /*#__PURE__*/styled('div', {});
|
|
3327
3396
|
function Modal(props) {
|
|
3328
3397
|
var title = props.title,
|
|
3329
3398
|
content = props.content,
|
|
3330
3399
|
open = props.open,
|
|
3331
3400
|
onClose = props.onClose,
|
|
3332
3401
|
containerStyle = props.containerStyle,
|
|
3333
|
-
action = props.action
|
|
3334
|
-
contentStyle = props.contentStyle;
|
|
3402
|
+
action = props.action;
|
|
3335
3403
|
var handleBackDropClick = function handleBackDropClick(event) {
|
|
3336
3404
|
if (event.target === event.currentTarget) onClose();
|
|
3337
3405
|
};
|
|
@@ -3347,9 +3415,7 @@ function Modal(props) {
|
|
|
3347
3415
|
}, title), React__default.createElement(Row, null, action, React__default.createElement(CloseIcon, {
|
|
3348
3416
|
size: 24,
|
|
3349
3417
|
onClick: onClose
|
|
3350
|
-
}))),
|
|
3351
|
-
style: contentStyle
|
|
3352
|
-
}, content))), document.body));
|
|
3418
|
+
}))), content)), document.body));
|
|
3353
3419
|
}
|
|
3354
3420
|
|
|
3355
3421
|
var WalletState;
|
|
@@ -3377,10 +3443,8 @@ var State = function State(_ref) {
|
|
|
3377
3443
|
})), walletState === WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === WalletState.CONNECTED && React__default.createElement(DisconnectIcon, null)));
|
|
3378
3444
|
};
|
|
3379
3445
|
|
|
3380
|
-
var
|
|
3381
|
-
|
|
3382
|
-
height: '$24',
|
|
3383
|
-
marginRight: '$12'
|
|
3446
|
+
var WalletImageContainer = /*#__PURE__*/styled('div', {
|
|
3447
|
+
paddingRight: '$12'
|
|
3384
3448
|
});
|
|
3385
3449
|
var Text = /*#__PURE__*/styled('div', {
|
|
3386
3450
|
display: 'flex',
|
|
@@ -3417,9 +3481,10 @@ function Wallet(props) {
|
|
|
3417
3481
|
align: "start",
|
|
3418
3482
|
variant: "outlined",
|
|
3419
3483
|
size: "large",
|
|
3420
|
-
prefix: React__default.createElement(
|
|
3421
|
-
src: image
|
|
3422
|
-
|
|
3484
|
+
prefix: React__default.createElement(WalletImageContainer, null, React__default.createElement(Image, {
|
|
3485
|
+
src: image,
|
|
3486
|
+
size: 24
|
|
3487
|
+
})),
|
|
3423
3488
|
suffix: React__default.createElement(State, {
|
|
3424
3489
|
walletState: state,
|
|
3425
3490
|
installLink: installLink
|
|
@@ -3519,7 +3584,8 @@ var MainContainer$1 = /*#__PURE__*/styled('div', {
|
|
|
3519
3584
|
variants: {
|
|
3520
3585
|
loaded: {
|
|
3521
3586
|
"true": {
|
|
3522
|
-
overflowY: 'auto'
|
|
3587
|
+
overflowY: 'auto',
|
|
3588
|
+
padding: '0 $4'
|
|
3523
3589
|
}
|
|
3524
3590
|
}
|
|
3525
3591
|
}
|
|
@@ -3535,10 +3601,8 @@ var LiquiditySourceType = /*#__PURE__*/styled('div', {
|
|
|
3535
3601
|
paddingTop: '$8',
|
|
3536
3602
|
paddingBottom: '$8'
|
|
3537
3603
|
});
|
|
3538
|
-
var
|
|
3539
|
-
|
|
3540
|
-
maxHeight: '$20',
|
|
3541
|
-
marginRight: '$16'
|
|
3604
|
+
var LiquidityImageContainer = /*#__PURE__*/styled('div', {
|
|
3605
|
+
paddingRight: '$16'
|
|
3542
3606
|
});
|
|
3543
3607
|
var LoaderContainer$1 = /*#__PURE__*/styled('div', {
|
|
3544
3608
|
display: 'flex',
|
|
@@ -3636,9 +3700,10 @@ var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
|
|
|
3636
3700
|
size: "large",
|
|
3637
3701
|
align: "start",
|
|
3638
3702
|
variant: "outlined",
|
|
3639
|
-
prefix: React__default.createElement(
|
|
3640
|
-
src: liquiditySource.logo
|
|
3641
|
-
|
|
3703
|
+
prefix: React__default.createElement(LiquidityImageContainer, null, React__default.createElement(Image, {
|
|
3704
|
+
src: liquiditySource.logo,
|
|
3705
|
+
size: 20
|
|
3706
|
+
})),
|
|
3642
3707
|
suffix: React__default.createElement(Switch, {
|
|
3643
3708
|
checked: selected
|
|
3644
3709
|
}),
|
|
@@ -3727,7 +3792,7 @@ var SolidCircle = /*#__PURE__*/styled('div', {
|
|
|
3727
3792
|
}
|
|
3728
3793
|
}
|
|
3729
3794
|
});
|
|
3730
|
-
var Container$
|
|
3795
|
+
var Container$1 = /*#__PURE__*/styled('div', {
|
|
3731
3796
|
border: '1.5px solid',
|
|
3732
3797
|
borderRadius: '$5',
|
|
3733
3798
|
padding: '$12',
|
|
@@ -3774,15 +3839,14 @@ function SelectableWalletList(_ref) {
|
|
|
3774
3839
|
}, [list]);
|
|
3775
3840
|
return React__default.createElement(Row$1, null, list.map(function (w, index) {
|
|
3776
3841
|
var checked = active === w.walletType;
|
|
3777
|
-
return React__default.createElement(Container$
|
|
3842
|
+
return React__default.createElement(Container$1, {
|
|
3778
3843
|
checked: checked,
|
|
3779
3844
|
onClick: onClick.bind(null, w),
|
|
3780
3845
|
key: index
|
|
3781
|
-
}, React__default.createElement(
|
|
3846
|
+
}, React__default.createElement(Image, {
|
|
3782
3847
|
src: w.image,
|
|
3783
3848
|
alt: w.walletType,
|
|
3784
|
-
|
|
3785
|
-
height: 24
|
|
3849
|
+
size: 24
|
|
3786
3850
|
}), React__default.createElement(Typography, {
|
|
3787
3851
|
variant: "body2"
|
|
3788
3852
|
}, w.name), React__default.createElement(Typography, {
|
|
@@ -3827,7 +3891,7 @@ var StyledItem = /*#__PURE__*/styled(Item, {
|
|
|
3827
3891
|
borderColor: '$neutrals600'
|
|
3828
3892
|
}
|
|
3829
3893
|
});
|
|
3830
|
-
var Container$
|
|
3894
|
+
var Container$2 = /*#__PURE__*/styled('div', {
|
|
3831
3895
|
display: 'flex'
|
|
3832
3896
|
});
|
|
3833
3897
|
var StyledIndicator = /*#__PURE__*/styled(Indicator$1, {
|
|
@@ -3857,7 +3921,7 @@ function Radio(props) {
|
|
|
3857
3921
|
_props$direction = props.direction,
|
|
3858
3922
|
direction = _props$direction === void 0 ? 'vertical' : _props$direction,
|
|
3859
3923
|
style = props.style;
|
|
3860
|
-
return React__default.createElement(Container$
|
|
3924
|
+
return React__default.createElement(Container$2, null, React__default.createElement(StyledRoot, {
|
|
3861
3925
|
onValueChange: onChange,
|
|
3862
3926
|
value: value,
|
|
3863
3927
|
direction: direction,
|
|
@@ -3893,13 +3957,13 @@ var SlippageChipsContainer = /*#__PURE__*/styled('div', {
|
|
|
3893
3957
|
var LiquiditySourceContainer = /*#__PURE__*/styled(BaseContainer, {
|
|
3894
3958
|
display: 'flex',
|
|
3895
3959
|
justifyContent: 'space-between',
|
|
3896
|
-
marginTop: '$
|
|
3960
|
+
marginTop: '$16',
|
|
3897
3961
|
cursor: 'pointer'
|
|
3898
3962
|
});
|
|
3899
3963
|
var InfiniteContainer = /*#__PURE__*/styled(BaseContainer, {
|
|
3900
3964
|
display: 'flex',
|
|
3901
3965
|
justifyContent: 'space-between',
|
|
3902
|
-
marginTop: '$
|
|
3966
|
+
marginTop: '$16'
|
|
3903
3967
|
});
|
|
3904
3968
|
var StyledAngleRight = /*#__PURE__*/styled(AngleRightIcon, {
|
|
3905
3969
|
marginLeft: '$8'
|
|
@@ -3910,7 +3974,7 @@ var LiquiditySourceNumber = /*#__PURE__*/styled('div', {
|
|
|
3910
3974
|
justifyContent: 'center'
|
|
3911
3975
|
});
|
|
3912
3976
|
var ThemesContainer = /*#__PURE__*/styled(BaseContainer, {
|
|
3913
|
-
marginTop: '$
|
|
3977
|
+
marginTop: '$16'
|
|
3914
3978
|
});
|
|
3915
3979
|
var Head = /*#__PURE__*/styled('div', {
|
|
3916
3980
|
display: 'flex',
|
|
@@ -4032,14 +4096,14 @@ var MainContainer$2 = /*#__PURE__*/styled('div', {
|
|
|
4032
4096
|
width: '100%',
|
|
4033
4097
|
minWidth: '375px',
|
|
4034
4098
|
maxWidth: '512px',
|
|
4035
|
-
maxHeight: '595px',
|
|
4036
4099
|
padding: '$16',
|
|
4037
4100
|
boxSizing: 'border-box',
|
|
4038
4101
|
backgroundColor: '$background',
|
|
4039
4102
|
variants: {
|
|
4040
4103
|
fixedHeight: {
|
|
4041
4104
|
"true": {
|
|
4042
|
-
height: '595px'
|
|
4105
|
+
height: '595px',
|
|
4106
|
+
maxHeight: '595px'
|
|
4043
4107
|
},
|
|
4044
4108
|
"false": {
|
|
4045
4109
|
height: 'auto'
|
|
@@ -4062,18 +4126,16 @@ function SwapContainer(props) {
|
|
|
4062
4126
|
var TokenContainer = /*#__PURE__*/styled('div', {
|
|
4063
4127
|
display: 'flex',
|
|
4064
4128
|
alignItems: 'center',
|
|
4129
|
+
width: '160px',
|
|
4065
4130
|
'& .amount': {
|
|
4066
4131
|
fontWeight: 'bold'
|
|
4132
|
+
},
|
|
4133
|
+
'& .estimated': {
|
|
4134
|
+
color: '$neutrals600'
|
|
4067
4135
|
}
|
|
4068
4136
|
});
|
|
4069
|
-
var TokenImage
|
|
4137
|
+
var TokenImage = /*#__PURE__*/styled('div', {
|
|
4070
4138
|
position: 'relative',
|
|
4071
|
-
width: '$24',
|
|
4072
|
-
height: '$24',
|
|
4073
|
-
img: {
|
|
4074
|
-
width: '100%',
|
|
4075
|
-
display: 'block'
|
|
4076
|
-
},
|
|
4077
4139
|
'.overlay': {
|
|
4078
4140
|
position: 'absolute',
|
|
4079
4141
|
right: -4,
|
|
@@ -4082,29 +4144,41 @@ var TokenImage$1 = /*#__PURE__*/styled('div', {
|
|
|
4082
4144
|
height: '$16',
|
|
4083
4145
|
padding: '$2',
|
|
4084
4146
|
borderRadius: '50%',
|
|
4147
|
+
display: 'flex',
|
|
4148
|
+
justifyContent: 'center',
|
|
4149
|
+
alignItems: 'center',
|
|
4085
4150
|
backgroundColor: '$background',
|
|
4086
4151
|
border: '1px solid $neutrals400'
|
|
4087
4152
|
}
|
|
4088
4153
|
});
|
|
4089
4154
|
function Token(props) {
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4155
|
+
var _props$data = props.data,
|
|
4156
|
+
token = _props$data.token,
|
|
4157
|
+
blockchain = _props$data.blockchain,
|
|
4158
|
+
amount = _props$data.amount,
|
|
4159
|
+
estimatedAmount = _props$data.estimatedAmount;
|
|
4160
|
+
return React__default.createElement(TokenContainer, null, React__default.createElement(TokenImage, null, React__default.createElement(Image, {
|
|
4161
|
+
src: token.logo,
|
|
4162
|
+
alt: "",
|
|
4163
|
+
size: 24
|
|
4093
4164
|
}), React__default.createElement("div", {
|
|
4094
4165
|
className: "overlay"
|
|
4095
|
-
}, React__default.createElement(
|
|
4096
|
-
src:
|
|
4097
|
-
alt:
|
|
4166
|
+
}, React__default.createElement(Image, {
|
|
4167
|
+
src: blockchain.logo,
|
|
4168
|
+
alt: blockchain.name,
|
|
4169
|
+
size: 12
|
|
4098
4170
|
}))), React__default.createElement(Spacer, {
|
|
4099
4171
|
size: 8
|
|
4100
|
-
}), React__default.createElement("span", {
|
|
4172
|
+
}), !!amount && React__default.createElement("span", {
|
|
4101
4173
|
className: "amount"
|
|
4102
|
-
}, props.data.amount), React__default.createElement(
|
|
4174
|
+
}, props.data.amount), !amount && estimatedAmount && React__default.createElement("span", {
|
|
4175
|
+
className: "amount estimated"
|
|
4176
|
+
}, props.data.estimatedAmount), React__default.createElement(Spacer, {
|
|
4103
4177
|
size: 4
|
|
4104
|
-
}),
|
|
4178
|
+
}), token.symbol);
|
|
4105
4179
|
}
|
|
4106
4180
|
|
|
4107
|
-
var Container$
|
|
4181
|
+
var Container$3 = /*#__PURE__*/styled('div', {
|
|
4108
4182
|
position: 'relative',
|
|
4109
4183
|
display: 'flex',
|
|
4110
4184
|
justifyContent: 'space-between',
|
|
@@ -4120,12 +4194,6 @@ var Container$4 = /*#__PURE__*/styled('div', {
|
|
|
4120
4194
|
fontWeight: 'bold',
|
|
4121
4195
|
fontSize: '$12'
|
|
4122
4196
|
},
|
|
4123
|
-
'&.running': {
|
|
4124
|
-
color: '$foreground'
|
|
4125
|
-
},
|
|
4126
|
-
'&.failed,&.success': {
|
|
4127
|
-
color: '$neutrals600'
|
|
4128
|
-
},
|
|
4129
4197
|
'&.failed .status': {
|
|
4130
4198
|
color: '$error'
|
|
4131
4199
|
},
|
|
@@ -4144,7 +4212,7 @@ function SwapDetail(_ref) {
|
|
|
4144
4212
|
size: "free",
|
|
4145
4213
|
fullWidth: true,
|
|
4146
4214
|
onClick: onClick.bind(null, swap.requestId)
|
|
4147
|
-
}, React__default.createElement(Container$
|
|
4215
|
+
}, React__default.createElement(Container$3, {
|
|
4148
4216
|
className: "" + status
|
|
4149
4217
|
}, React__default.createElement("div", {
|
|
4150
4218
|
className: "info"
|
|
@@ -4155,11 +4223,10 @@ function SwapDetail(_ref) {
|
|
|
4155
4223
|
symbol: firstStep.fromSymbol
|
|
4156
4224
|
},
|
|
4157
4225
|
blockchain: {
|
|
4158
|
-
|
|
4159
|
-
logo: firstStep.fromBlockchainLogo,
|
|
4226
|
+
logo: firstStep.fromBlockchainLogo || '',
|
|
4160
4227
|
name: firstStep.fromBlockchain
|
|
4161
4228
|
},
|
|
4162
|
-
amount: swap.inputAmount
|
|
4229
|
+
amount: limitDecimalPlaces(swap.inputAmount)
|
|
4163
4230
|
}
|
|
4164
4231
|
}), React__default.createElement(Spacer, {
|
|
4165
4232
|
size: 12
|
|
@@ -4174,11 +4241,11 @@ function SwapDetail(_ref) {
|
|
|
4174
4241
|
symbol: lastStep.toSymbol
|
|
4175
4242
|
},
|
|
4176
4243
|
blockchain: {
|
|
4177
|
-
|
|
4178
|
-
logo: lastStep.toBlockchainLogo,
|
|
4244
|
+
logo: lastStep.toBlockchainLogo || '',
|
|
4179
4245
|
name: lastStep.toBlockchain
|
|
4180
4246
|
},
|
|
4181
|
-
amount: lastStep.outputAmount ||
|
|
4247
|
+
amount: limitDecimalPlaces(lastStep.outputAmount || ''),
|
|
4248
|
+
estimatedAmount: limitDecimalPlaces(lastStep.expectedOutputAmountHumanReadable || '')
|
|
4182
4249
|
}
|
|
4183
4250
|
})), React__default.createElement("div", {
|
|
4184
4251
|
className: "status"
|
|
@@ -4188,7 +4255,7 @@ function SwapDetail(_ref) {
|
|
|
4188
4255
|
}) : status)));
|
|
4189
4256
|
}
|
|
4190
4257
|
|
|
4191
|
-
var Container$
|
|
4258
|
+
var Container$4 = /*#__PURE__*/styled('div', {
|
|
4192
4259
|
position: 'relative'
|
|
4193
4260
|
});
|
|
4194
4261
|
var Color = /*#__PURE__*/styled('div', {
|
|
@@ -4238,7 +4305,7 @@ function ColorPicker(_ref) {
|
|
|
4238
4305
|
var _useState = useState(false),
|
|
4239
4306
|
displayColorPicker = _useState[0],
|
|
4240
4307
|
setDisplayColorPicker = _useState[1];
|
|
4241
|
-
return React__default.createElement(Container$
|
|
4308
|
+
return React__default.createElement(Container$4, null, React__default.createElement(Label$3, {
|
|
4242
4309
|
className: "_text"
|
|
4243
4310
|
}, label), React__default.createElement(Button, {
|
|
4244
4311
|
variant: "outlined",
|
|
@@ -4352,7 +4419,7 @@ function Drawer(props) {
|
|
|
4352
4419
|
anchor: anchor,
|
|
4353
4420
|
style: containerStyle
|
|
4354
4421
|
}, React__default.createElement(DrawerHeader, null, React__default.createElement(Typography, {
|
|
4355
|
-
variant: "
|
|
4422
|
+
variant: "h6"
|
|
4356
4423
|
}, title), showClose && React__default.createElement(CloseIcon, {
|
|
4357
4424
|
size: 24,
|
|
4358
4425
|
onClick: onClose
|
|
@@ -4377,7 +4444,7 @@ var AlertContainer = /*#__PURE__*/styled('div', {
|
|
|
4377
4444
|
var ConfirmButton = /*#__PURE__*/styled(Button, {
|
|
4378
4445
|
marginTop: '$16'
|
|
4379
4446
|
});
|
|
4380
|
-
var Container$
|
|
4447
|
+
var Container$5 = /*#__PURE__*/styled('div', {
|
|
4381
4448
|
paddingBottom: '$24',
|
|
4382
4449
|
'.title': {
|
|
4383
4450
|
paddingBottom: '$8',
|
|
@@ -4429,17 +4496,25 @@ function ConfirmSwap(props) {
|
|
|
4429
4496
|
}, 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) {
|
|
4430
4497
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4431
4498
|
direction: "vertical"
|
|
4432
|
-
}), React__default.createElement(Alert, {
|
|
4499
|
+
}), React__default.createElement(Alert, Object.assign({
|
|
4433
4500
|
type: "error",
|
|
4434
4501
|
key: index
|
|
4435
|
-
}, error
|
|
4502
|
+
}, typeof error === 'string' ? {
|
|
4503
|
+
title: error
|
|
4504
|
+
} : {
|
|
4505
|
+
children: error
|
|
4506
|
+
})));
|
|
4436
4507
|
}), warnings == null ? void 0 : warnings.map(function (warning, index) {
|
|
4437
4508
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4438
4509
|
direction: "vertical"
|
|
4439
|
-
}), React__default.createElement(Alert, {
|
|
4510
|
+
}), React__default.createElement(Alert, Object.assign({
|
|
4440
4511
|
type: "warning",
|
|
4441
4512
|
key: index
|
|
4442
|
-
}, warning
|
|
4513
|
+
}, typeof warning === 'string' ? {
|
|
4514
|
+
title: warning
|
|
4515
|
+
} : {
|
|
4516
|
+
children: warning
|
|
4517
|
+
})));
|
|
4443
4518
|
}))), props.previewInputs || props.previewRoutes ? React__default.createElement(Section, null, props.previewInputs, !!props.previewRoutes ? React__default.createElement(Spacer, {
|
|
4444
4519
|
size: 16,
|
|
4445
4520
|
direction: "vertical"
|
|
@@ -4447,7 +4522,7 @@ function ConfirmSwap(props) {
|
|
|
4447
4522
|
var list = selectableWallets.filter(function (w) {
|
|
4448
4523
|
return wallet === w.chain;
|
|
4449
4524
|
});
|
|
4450
|
-
return React__default.createElement(Container$
|
|
4525
|
+
return React__default.createElement(Container$5, {
|
|
4451
4526
|
key: index
|
|
4452
4527
|
}, React__default.createElement("div", {
|
|
4453
4528
|
className: "title"
|
|
@@ -4459,7 +4534,7 @@ function ConfirmSwap(props) {
|
|
|
4459
4534
|
variant: "body2"
|
|
4460
4535
|
}, "Your ", wallet, " Wallet")), list.length === 0 && React__default.createElement(React__default.Fragment, null, React__default.createElement(AlertContainer, null, React__default.createElement(Alert, {
|
|
4461
4536
|
type: "error"
|
|
4462
|
-
}, "You need to connect a compatible wallet with ", wallet)), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
|
|
4537
|
+
}, "You need to connect a compatible wallet with ", wallet, ".")), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
|
|
4463
4538
|
variant: "contained",
|
|
4464
4539
|
type: "primary",
|
|
4465
4540
|
align: "grow",
|
|
@@ -4478,17 +4553,7 @@ var Group = /*#__PURE__*/styled('div', {
|
|
|
4478
4553
|
textTransform: 'uppercase'
|
|
4479
4554
|
}
|
|
4480
4555
|
});
|
|
4481
|
-
|
|
4482
|
-
overflowY: 'auto'
|
|
4483
|
-
});
|
|
4484
|
-
var filteredHistory = function filteredHistory(list, searchedFor) {
|
|
4485
|
-
return list.filter(function (swap) {
|
|
4486
|
-
var firstStep = swap.steps[0];
|
|
4487
|
-
var lastStep = swap.steps[swap.steps.length - 1];
|
|
4488
|
-
return containsText(firstStep.fromBlockchain, searchedFor) || containsText(firstStep.fromSymbol, searchedFor) || containsText(lastStep.toBlockchain, searchedFor) || containsText(lastStep.toSymbol, searchedFor) || containsText(swap.requestId, searchedFor);
|
|
4489
|
-
});
|
|
4490
|
-
};
|
|
4491
|
-
var SwapsGroup = function SwapsGroup(props) {
|
|
4556
|
+
function SwapsGroup(props) {
|
|
4492
4557
|
var list = props.list,
|
|
4493
4558
|
onSwapClick = props.onSwapClick,
|
|
4494
4559
|
groupBy = props.groupBy;
|
|
@@ -4518,27 +4583,41 @@ var SwapsGroup = function SwapsGroup(props) {
|
|
|
4518
4583
|
size: 24
|
|
4519
4584
|
}));
|
|
4520
4585
|
}));
|
|
4586
|
+
}
|
|
4587
|
+
|
|
4588
|
+
var Container$6 = /*#__PURE__*/styled('div', {
|
|
4589
|
+
overflowY: 'auto'
|
|
4590
|
+
});
|
|
4591
|
+
var filteredHistory = function filteredHistory(list, searchedFor) {
|
|
4592
|
+
return list.filter(function (swap) {
|
|
4593
|
+
var firstStep = swap.steps[0];
|
|
4594
|
+
var lastStep = swap.steps[swap.steps.length - 1];
|
|
4595
|
+
return containsText(firstStep.fromBlockchain, searchedFor) || containsText(firstStep.fromSymbol, searchedFor) || containsText(lastStep.toBlockchain, searchedFor) || containsText(lastStep.toSymbol, searchedFor) || containsText(swap.requestId, searchedFor);
|
|
4596
|
+
});
|
|
4521
4597
|
};
|
|
4522
|
-
function History(
|
|
4523
|
-
var
|
|
4524
|
-
list =
|
|
4525
|
-
onBack =
|
|
4526
|
-
onSwapClick =
|
|
4527
|
-
groupBy =
|
|
4598
|
+
function History(props) {
|
|
4599
|
+
var _props$list = props.list,
|
|
4600
|
+
list = _props$list === void 0 ? [] : _props$list,
|
|
4601
|
+
onBack = props.onBack,
|
|
4602
|
+
onSwapClick = props.onSwapClick,
|
|
4603
|
+
groupBy = props.groupBy,
|
|
4604
|
+
loading = props.loading;
|
|
4528
4605
|
return React__default.createElement(SecondaryPage, {
|
|
4529
4606
|
onBack: onBack,
|
|
4530
4607
|
textField: true,
|
|
4531
|
-
textFieldPlaceholder: "Search
|
|
4608
|
+
textFieldPlaceholder: "Search by Network, Token or Request ID",
|
|
4532
4609
|
title: "Swaps"
|
|
4533
4610
|
}, function (searchedFor) {
|
|
4534
4611
|
var filterSwaps = filteredHistory(list, searchedFor);
|
|
4535
|
-
return React__default.createElement(
|
|
4612
|
+
return React__default.createElement(React__default.Fragment, null, loading && React__default.createElement(LoaderContainer, null, React__default.createElement(Spinner, {
|
|
4613
|
+
size: 24
|
|
4614
|
+
})), React__default.createElement(Container$6, null, !loading && React__default.createElement(React__default.Fragment, null, filterSwaps.length ? React__default.createElement(SwapsGroup, {
|
|
4536
4615
|
list: filterSwaps,
|
|
4537
4616
|
onSwapClick: onSwapClick,
|
|
4538
4617
|
groupBy: groupBy
|
|
4539
4618
|
}) : React__default.createElement(NotFoundAlert, {
|
|
4540
4619
|
catergory: "Swap"
|
|
4541
|
-
}));
|
|
4620
|
+
}))));
|
|
4542
4621
|
});
|
|
4543
4622
|
}
|
|
4544
4623
|
|
|
@@ -4582,38 +4661,49 @@ var SwapMessages = function SwapMessages(props) {
|
|
|
4582
4661
|
onClick: props.switchNetwork
|
|
4583
4662
|
}, "Change network to ", currentStepBlockchain)
|
|
4584
4663
|
}), !!detailedMessage.content ? React__default.createElement(DetailedMessage, null, React__default.createElement(Typography, {
|
|
4585
|
-
variant: "
|
|
4664
|
+
variant: "body3"
|
|
4586
4665
|
}, 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, {
|
|
4587
|
-
variant: "
|
|
4666
|
+
variant: "body3"
|
|
4588
4667
|
}, "Don't worry, your fund is\xA0"), React__default.createElement(SuccessText, {
|
|
4589
|
-
variant: "
|
|
4668
|
+
variant: "body3"
|
|
4590
4669
|
}, React__default.createElement("b", null, "Safe"))), React__default.createElement("p", null, React__default.createElement(Typography, {
|
|
4591
|
-
variant: "
|
|
4670
|
+
variant: "body3"
|
|
4592
4671
|
}, "It is converted to \xA0", React__default.createElement("u", null, lastConvertedTokenInFailedSwap.outputAmount), "\xA0"), React__default.createElement(SuccessText, {
|
|
4593
|
-
variant: "
|
|
4672
|
+
variant: "body3"
|
|
4594
4673
|
}, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.symbol, "\xA0")), React__default.createElement(Typography, {
|
|
4595
|
-
variant: "
|
|
4674
|
+
variant: "body3"
|
|
4596
4675
|
}, "on your\xA0"), React__default.createElement(SuccessText, {
|
|
4597
|
-
variant: "
|
|
4676
|
+
variant: "body3"
|
|
4598
4677
|
}, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.blockchain, "\xA0")), React__default.createElement(Typography, {
|
|
4599
|
-
variant: "
|
|
4678
|
+
variant: "body3"
|
|
4600
4679
|
}, "wallet"))));
|
|
4601
4680
|
};
|
|
4602
4681
|
|
|
4603
|
-
var _excluded$
|
|
4682
|
+
var _excluded$J = ["pendingSwap", "onBack", "onCopy", "isCopied", "onCancel", "date", "onRetry", "previewInputs"];
|
|
4604
4683
|
var SwapperContainer$1 = /*#__PURE__*/styled('div', {
|
|
4605
4684
|
display: 'flex',
|
|
4606
4685
|
alignItems: 'center',
|
|
4607
|
-
|
|
4686
|
+
paddingLeft: '$4',
|
|
4687
|
+
variants: {
|
|
4688
|
+
created: {
|
|
4689
|
+
"true": {
|
|
4690
|
+
filter: 'grayscale(100%)'
|
|
4691
|
+
}
|
|
4692
|
+
},
|
|
4693
|
+
running: {
|
|
4694
|
+
"true": {
|
|
4695
|
+
animation: pulse + " 2s ease-in-out infinite"
|
|
4696
|
+
}
|
|
4697
|
+
}
|
|
4698
|
+
}
|
|
4699
|
+
});
|
|
4700
|
+
var FeeContainer = /*#__PURE__*/styled('div', {
|
|
4701
|
+
paddingLeft: '$16'
|
|
4608
4702
|
});
|
|
4609
4703
|
var Fee = /*#__PURE__*/styled('div', {
|
|
4610
4704
|
display: 'flex',
|
|
4611
4705
|
alignItems: 'center'
|
|
4612
4706
|
});
|
|
4613
|
-
var SwapperLogo$1 = /*#__PURE__*/styled('img', {
|
|
4614
|
-
width: '$16',
|
|
4615
|
-
height: '$16'
|
|
4616
|
-
});
|
|
4617
4707
|
var RelativeContainer$1 = /*#__PURE__*/styled('div', {
|
|
4618
4708
|
position: 'relative'
|
|
4619
4709
|
});
|
|
@@ -4622,7 +4712,7 @@ var Dot$1 = /*#__PURE__*/styled('div', {
|
|
|
4622
4712
|
height: '$8',
|
|
4623
4713
|
backgroundColor: '$foreground',
|
|
4624
4714
|
borderRadius: '4px',
|
|
4625
|
-
marginLeft: '
|
|
4715
|
+
marginLeft: '11px'
|
|
4626
4716
|
});
|
|
4627
4717
|
var ArrowDown = /*#__PURE__*/styled('div', {
|
|
4628
4718
|
width: '0px',
|
|
@@ -4630,12 +4720,11 @@ var ArrowDown = /*#__PURE__*/styled('div', {
|
|
|
4630
4720
|
borderLeft: '5px solid transparent',
|
|
4631
4721
|
borderRight: '5px solid transparent',
|
|
4632
4722
|
borderTop: '5px solid $foreground',
|
|
4633
|
-
marginLeft: '$
|
|
4723
|
+
marginLeft: '$10'
|
|
4634
4724
|
});
|
|
4635
4725
|
var StyledAnchor = /*#__PURE__*/styled('a', {
|
|
4636
4726
|
color: '$primary',
|
|
4637
|
-
fontWeight: '$600'
|
|
4638
|
-
marginLeft: '$12'
|
|
4727
|
+
fontWeight: '$600'
|
|
4639
4728
|
});
|
|
4640
4729
|
var SwapInfoContainer = /*#__PURE__*/styled('div', {
|
|
4641
4730
|
display: 'flex',
|
|
@@ -4644,11 +4733,14 @@ var SwapInfoContainer = /*#__PURE__*/styled('div', {
|
|
|
4644
4733
|
borderBottom: '1px solid $neutrals300'
|
|
4645
4734
|
});
|
|
4646
4735
|
var InternalDetailsContainer = /*#__PURE__*/styled('div', {
|
|
4647
|
-
display: 'flex'
|
|
4736
|
+
display: 'flex',
|
|
4737
|
+
'.details': {
|
|
4738
|
+
padding: '$8 0'
|
|
4739
|
+
}
|
|
4648
4740
|
});
|
|
4649
4741
|
var InternalDetail = /*#__PURE__*/styled('div', {
|
|
4650
4742
|
display: 'flex',
|
|
4651
|
-
|
|
4743
|
+
margin: '$12 0 $12 $20'
|
|
4652
4744
|
});
|
|
4653
4745
|
var DescriptionContainer = /*#__PURE__*/styled('div', {
|
|
4654
4746
|
display: 'flex',
|
|
@@ -4656,15 +4748,12 @@ var DescriptionContainer = /*#__PURE__*/styled('div', {
|
|
|
4656
4748
|
});
|
|
4657
4749
|
var Description = /*#__PURE__*/styled(Typography, {
|
|
4658
4750
|
color: '$success',
|
|
4659
|
-
|
|
4660
|
-
});
|
|
4661
|
-
var Error = /*#__PURE__*/styled(Description, {
|
|
4662
|
-
color: '$error'
|
|
4751
|
+
paddingLeft: '$4'
|
|
4663
4752
|
});
|
|
4664
4753
|
var Line$1 = /*#__PURE__*/styled('div', {
|
|
4665
4754
|
width: '0',
|
|
4666
4755
|
minHeight: '$16',
|
|
4667
|
-
marginLeft: '
|
|
4756
|
+
marginLeft: '14px',
|
|
4668
4757
|
border: '1px dashed $foreground',
|
|
4669
4758
|
borderRadius: 'inherit'
|
|
4670
4759
|
});
|
|
@@ -4680,7 +4769,8 @@ var Row$2 = /*#__PURE__*/styled('div', {
|
|
|
4680
4769
|
'.value': {
|
|
4681
4770
|
display: 'flex',
|
|
4682
4771
|
alignItems: 'center',
|
|
4683
|
-
color: '$neutrals800'
|
|
4772
|
+
color: '$neutrals800',
|
|
4773
|
+
justifyContent: 'flex-end'
|
|
4684
4774
|
},
|
|
4685
4775
|
'.status': {
|
|
4686
4776
|
fontWeight: 'bold',
|
|
@@ -4703,26 +4793,13 @@ var RequestId = /*#__PURE__*/styled('div', {
|
|
|
4703
4793
|
}
|
|
4704
4794
|
});
|
|
4705
4795
|
var ExtraDetails = /*#__PURE__*/styled('div', {
|
|
4706
|
-
padding: '
|
|
4796
|
+
padding: '0',
|
|
4707
4797
|
color: '$neutrals600',
|
|
4708
|
-
fontSize: '$
|
|
4709
|
-
});
|
|
4710
|
-
var StepContainer$1 = /*#__PURE__*/styled('div', {
|
|
4711
|
-
variants: {
|
|
4712
|
-
hasNotStarted: {
|
|
4713
|
-
"true": {
|
|
4714
|
-
filter: 'grayscale(100%)'
|
|
4715
|
-
}
|
|
4716
|
-
},
|
|
4717
|
-
isRunning: {
|
|
4718
|
-
"true": {
|
|
4719
|
-
animation: pulse + " 2s ease-in-out infinite"
|
|
4720
|
-
}
|
|
4721
|
-
}
|
|
4722
|
-
}
|
|
4798
|
+
fontSize: '$10'
|
|
4723
4799
|
});
|
|
4724
4800
|
var SwapFlowContainer = /*#__PURE__*/styled('div', {
|
|
4725
|
-
overflowY: 'auto'
|
|
4801
|
+
overflowY: 'auto',
|
|
4802
|
+
padding: '$8 $4 $2 $4'
|
|
4726
4803
|
});
|
|
4727
4804
|
function SwapHistory(props) {
|
|
4728
4805
|
var pendingSwap = props.pendingSwap,
|
|
@@ -4732,7 +4809,7 @@ function SwapHistory(props) {
|
|
|
4732
4809
|
onCancel = props.onCancel,
|
|
4733
4810
|
date = props.date,
|
|
4734
4811
|
onRetry = props.onRetry,
|
|
4735
|
-
extraMessageProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
4812
|
+
extraMessageProps = _objectWithoutPropertiesLoose(props, _excluded$J);
|
|
4736
4813
|
var _useState = useState(false),
|
|
4737
4814
|
showDrawer = _useState[0],
|
|
4738
4815
|
setShowDrawer = _useState[1];
|
|
@@ -4753,7 +4830,7 @@ function SwapHistory(props) {
|
|
|
4753
4830
|
}, "Try again"))
|
|
4754
4831
|
}, React__default.createElement("div", null, React__default.createElement(SwapInfoContainer, null, React__default.createElement(Row$2, null, React__default.createElement("div", {
|
|
4755
4832
|
className: "name"
|
|
4756
|
-
}, "Request
|
|
4833
|
+
}, "Request Id:", React__default.createElement("span", {
|
|
4757
4834
|
className: "value requestId",
|
|
4758
4835
|
onClick: onCopy.bind(null, pendingSwap == null ? void 0 : pendingSwap.requestId)
|
|
4759
4836
|
}, React__default.createElement(RequestId, null, pendingSwap == null ? void 0 : pendingSwap.requestId), React__default.createElement(Spacer, {
|
|
@@ -4762,71 +4839,69 @@ function SwapHistory(props) {
|
|
|
4762
4839
|
type: "primary",
|
|
4763
4840
|
variant: "ghost",
|
|
4764
4841
|
size: "compact"
|
|
4765
|
-
}, isCopied ? 'Copied!' : 'Copy'))), React__default.createElement(
|
|
4842
|
+
}, isCopied ? 'Copied!' : 'Copy'))), React__default.createElement("div", {
|
|
4766
4843
|
className: "name"
|
|
4767
|
-
},
|
|
4844
|
+
}, React__default.createElement("span", {
|
|
4768
4845
|
className: "value status " + ((pendingSwap == null ? void 0 : pendingSwap.status) || '')
|
|
4769
4846
|
}, pendingSwap == null ? void 0 : pendingSwap.status, (pendingSwap == null ? void 0 : pendingSwap.status) === 'running' && React__default.createElement(Spinner, {
|
|
4770
4847
|
size: 16,
|
|
4771
4848
|
color: "primary"
|
|
4772
|
-
}))
|
|
4773
|
-
size:
|
|
4849
|
+
})), React__default.createElement(ExtraDetails, null, date))))), React__default.createElement(SwapFlowContainer, null, extraMessageProps.shortMessage && React__default.createElement(SwapMessages, Object.assign({}, extraMessageProps)), React__default.createElement(Divider, {
|
|
4850
|
+
size: 16
|
|
4774
4851
|
}), pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
|
|
4775
|
-
return React__default.createElement(
|
|
4776
|
-
key: index
|
|
4777
|
-
hasNotStarted: step.status === 'created',
|
|
4778
|
-
isRunning: step.status != 'failed' && step.status != 'success' && step.status != 'created'
|
|
4852
|
+
return React__default.createElement("div", {
|
|
4853
|
+
key: index
|
|
4779
4854
|
}, index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
|
|
4780
4855
|
logo: step.fromLogo,
|
|
4781
4856
|
symbol: step.fromSymbol,
|
|
4782
|
-
|
|
4783
|
-
chainLogo: step.fromBlockchainLogo,
|
|
4857
|
+
chainLogo: step.fromBlockchainLogo || '',
|
|
4784
4858
|
blockchain: step.fromBlockchain,
|
|
4785
4859
|
amount: pendingSwap.inputAmount
|
|
4786
|
-
}), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1,
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
src: step.swapperLogo,
|
|
4791
|
-
alt: step.swapperId
|
|
4792
|
-
|
|
4793
|
-
|
|
4860
|
+
}), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1, {
|
|
4861
|
+
created: step.status === 'created',
|
|
4862
|
+
running: !['created', 'success', 'failed'].includes(step.status)
|
|
4863
|
+
}, React__default.createElement(Image, {
|
|
4864
|
+
src: step.swapperLogo || '',
|
|
4865
|
+
alt: step.swapperId,
|
|
4866
|
+
size: 20
|
|
4867
|
+
}), React__default.createElement(FeeContainer, null, React__default.createElement(Typography, {
|
|
4794
4868
|
variant: "caption"
|
|
4795
|
-
},
|
|
4796
|
-
// @ts-ignore
|
|
4797
|
-
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, {
|
|
4798
|
-
ml: 4,
|
|
4869
|
+
}, step.swapperType === 'DEX' ? 'Swap' : 'Bridge', " via", ' ', step.swapperId), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
|
|
4799
4870
|
variant: "caption"
|
|
4800
|
-
}, "$",
|
|
4801
|
-
// @ts-ignore
|
|
4802
|
-
step.feeInUsd, ' ', "estimated gas fee")))), React__default.createElement("div", {
|
|
4871
|
+
}, "\xA0 $", step.feeInUsd, " estimated gas fee")))), React__default.createElement("div", {
|
|
4803
4872
|
style: {
|
|
4804
4873
|
display: 'flex'
|
|
4805
4874
|
}
|
|
4806
|
-
}, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null),
|
|
4875
|
+
}, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), React__default.createElement("div", {
|
|
4876
|
+
className: "details"
|
|
4877
|
+
}, !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
|
|
4807
4878
|
return React__default.createElement(InternalDetail, {
|
|
4808
4879
|
key: index
|
|
4809
|
-
}, React__default.createElement(DescriptionContainer, null, React__default.createElement(
|
|
4810
|
-
|
|
4880
|
+
}, React__default.createElement(DescriptionContainer, null, React__default.createElement(Divider, {
|
|
4881
|
+
size: 4
|
|
4882
|
+
}), React__default.createElement(CheckCircleIcon, {
|
|
4883
|
+
color: "primary"
|
|
4811
4884
|
}), React__default.createElement(Description, {
|
|
4812
|
-
variant: "
|
|
4813
|
-
},
|
|
4885
|
+
variant: "body3"
|
|
4886
|
+
}, React__default.createElement(StyledAnchor, {
|
|
4814
4887
|
href: item.url,
|
|
4815
4888
|
target: "_blank",
|
|
4816
4889
|
rel: "noreferrer",
|
|
4817
4890
|
key: index
|
|
4818
|
-
}, "
|
|
4819
|
-
}), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
|
|
4891
|
+
}, !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")))));
|
|
4892
|
+
})), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
|
|
4820
4893
|
color: "error"
|
|
4821
|
-
}), React__default.createElement(
|
|
4822
|
-
variant: "
|
|
4894
|
+
}), React__default.createElement(Description, {
|
|
4895
|
+
variant: "body3",
|
|
4896
|
+
color: "$error500"
|
|
4823
4897
|
}, "Step failed")))))), index + 1 === pendingSwap.steps.length && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
|
|
4824
4898
|
logo: step.toLogo,
|
|
4825
4899
|
symbol: step.toSymbol,
|
|
4826
|
-
|
|
4827
|
-
chainLogo: step.toBlockchainLogo,
|
|
4900
|
+
chainLogo: step.toBlockchainLogo || '',
|
|
4828
4901
|
blockchain: step.toBlockchain,
|
|
4829
|
-
amount: step.outputAmount || ''
|
|
4902
|
+
amount: step.outputAmount || '',
|
|
4903
|
+
estimatedAmount: step.expectedOutputAmountHumanReadable || '',
|
|
4904
|
+
success: step.status === 'success'
|
|
4830
4905
|
}));
|
|
4831
4906
|
}), React__default.createElement(Divider, {
|
|
4832
4907
|
size: 32
|
|
@@ -4838,10 +4913,9 @@ function SwapHistory(props) {
|
|
|
4838
4913
|
title: "Cancel Progress",
|
|
4839
4914
|
content: React__default.createElement(Alert, {
|
|
4840
4915
|
type: "warning"
|
|
4841
|
-
}, React__default.createElement(
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
}), React__default.createElement("p", null, "If you have already signed your transaction to blockchain, you should wait for that to complete or rollback")),
|
|
4916
|
+
}, React__default.createElement(Typography, {
|
|
4917
|
+
variant: "body2"
|
|
4918
|
+
}, "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.")),
|
|
4845
4919
|
footer: React__default.createElement("div", {
|
|
4846
4920
|
style: {
|
|
4847
4921
|
display: 'flex',
|
|
@@ -4866,5 +4940,5 @@ function SwapHistory(props) {
|
|
|
4866
4940
|
}));
|
|
4867
4941
|
}
|
|
4868
4942
|
|
|
4869
|
-
export { AddCircleIcon, AddIcon, AddWalletIcon, Alert, AngleDownIcon, AngleLeftIcon, AngleRightIcon, AngleUpIcon, ArrowRightIcon, BagIcon, BanIcon, BestRoute, BlockchainSelector, Button, CheckCircleIcon, CheckIcon, CheckSquareIcon, CheckWalletIcon, Checkbox, ChevronRightIcon, Chip, CloseIcon, ColorPicker, ConfirmSwap, ConnectWalletsModal, CopyIcon, DeleteCircleIcon, DeleteWalletIcon, DisconnectIcon, Divider, DownloadIcon, Drawer, FilledCircle, GasIcon, Header, History, HistoryIcon, HorizontalSwapIcon, InfoCircleIcon, LiquiditySourcesSelector, LoadingFailedAlert, MinusCircleIcon, Modal, Radio, RetryIcon, RetryLeftIcon, RetryRightIcon, SearchIcon, SearchMinusIcon, SecondaryPage, SelectableWalletList, Settings, SettingsIcon, SignatureIcon, Spacer, Spinner, StepDetail, SwapContainer, SwapDetail, SwapHistory, SwapWalletIcon, Switch, TextField, TimeIcon, TokenList, TokenSelector, Tooltip, TrashIcon, TryAgainIcon, Typography, VerticalSwapIcon, Wallet, WalletIcon, WalletState, WarningIcon, createTheme, css, darkTheme, globalCss, keyframes, lightTheme, styled };
|
|
4943
|
+
export { AddCircleIcon, AddIcon, AddWalletIcon, Alert, AngleDownIcon, AngleLeftIcon, AngleRightIcon, AngleUpIcon, ArrowRightIcon, BagIcon, BanIcon, BestRoute, BlockchainSelector, Button, CheckCircleIcon, CheckIcon, CheckSquareIcon, CheckWalletIcon, Checkbox, ChevronRightIcon, Chip, CloseIcon, ColorPicker, ConfirmSwap, ConnectWalletsModal, CopyIcon, DeleteCircleIcon, DeleteWalletIcon, DisconnectIcon, Divider, DownloadIcon, Drawer, FilledCircle, GasIcon, Header, History, HistoryIcon, HorizontalSwapIcon, Image, InfoCircleIcon, LiquiditySourcesSelector, LoadingFailedAlert, MinusCircleIcon, Modal, Radio, RetryIcon, RetryLeftIcon, RetryRightIcon, SearchIcon, SearchMinusIcon, SecondaryPage, SelectableWalletList, Settings, SettingsIcon, SignatureIcon, Spacer, Spinner, StepDetail, SwapContainer, SwapDetail, SwapHistory, SwapWalletIcon, SwapsGroup, Switch, TextField, TimeIcon, TokenList, TokenSelector, Tooltip, TrashIcon, TryAgainIcon, Typography, VerticalSwapIcon, Wallet, WalletIcon, WalletState, WarningIcon, createTheme, css, darkTheme, globalCss, keyframes, lightTheme, styled };
|
|
4870
4944
|
//# sourceMappingURL=ui.esm.js.map
|