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