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