@rango-dev/ui 0.1.11-next.2 → 0.1.11-next.4
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/dist/components/Icon/types.d.ts +1 -0
- package/dist/components/common/Image.d.ts +6 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/containers/SwapHistory/SwapHistory.d.ts +0 -1
- package/dist/helper/index.d.ts +3 -2
- package/dist/ui.cjs.development.js +126 -94
- 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 +126 -95
- package/dist/ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/BestRoute/BestRoute.tsx +2 -5
- package/src/components/BlockchainsList/BlockchainsList.tsx +8 -6
- package/src/components/Icon/common.ts +10 -0
- package/src/components/Icon/types.tsx +1 -0
- package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +8 -5
- package/src/components/SelectableWalletList/SelectableWalletList.tsx +2 -1
- package/src/components/StepDetail/StepDetail.tsx +6 -13
- package/src/components/SwapDetail/SwapDetail.tsx +6 -4
- package/src/components/SwapDetail/Token.tsx +8 -9
- package/src/components/TokenList/TokenItem.tsx +8 -5
- 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/History/History.tsx +1 -1
- package/src/containers/SwapHistory/SwapHistory.tsx +5 -10
- 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
|
});
|
|
@@ -1597,6 +1607,37 @@ Typography.toString = function () {
|
|
|
1597
1607
|
return '._typography';
|
|
1598
1608
|
};
|
|
1599
1609
|
|
|
1610
|
+
var FilledCircle = /*#__PURE__*/styled('span', {
|
|
1611
|
+
width: '10px',
|
|
1612
|
+
height: '10px',
|
|
1613
|
+
backgroundColor: '$primary',
|
|
1614
|
+
borderRadius: '99999px'
|
|
1615
|
+
});
|
|
1616
|
+
|
|
1617
|
+
var _excluded$E = ["size"];
|
|
1618
|
+
var ImageContainer = /*#__PURE__*/styled('div', {
|
|
1619
|
+
display: 'flex',
|
|
1620
|
+
justifyContent: 'center',
|
|
1621
|
+
alignItems: 'center',
|
|
1622
|
+
'.image': {
|
|
1623
|
+
width: '100%',
|
|
1624
|
+
height: '100%',
|
|
1625
|
+
objectFit: 'contain'
|
|
1626
|
+
}
|
|
1627
|
+
});
|
|
1628
|
+
function Image(props) {
|
|
1629
|
+
var size = props.size,
|
|
1630
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$E);
|
|
1631
|
+
return React__default.createElement(ImageContainer, {
|
|
1632
|
+
css: {
|
|
1633
|
+
width: size + 'px',
|
|
1634
|
+
height: size + 'px'
|
|
1635
|
+
}
|
|
1636
|
+
}, React__default.createElement("img", Object.assign({
|
|
1637
|
+
className: "image"
|
|
1638
|
+
}, otherProps)));
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1600
1641
|
var StepLogoContainer = /*#__PURE__*/styled('div', {
|
|
1601
1642
|
position: 'relative',
|
|
1602
1643
|
width: '$28',
|
|
@@ -1610,25 +1651,18 @@ var StepLogoContainer = /*#__PURE__*/styled('div', {
|
|
|
1610
1651
|
}
|
|
1611
1652
|
}
|
|
1612
1653
|
});
|
|
1613
|
-
var Logo = /*#__PURE__*/styled('img', {
|
|
1614
|
-
width: '$28',
|
|
1615
|
-
height: '$28',
|
|
1616
|
-
borderRadius: '50%'
|
|
1617
|
-
});
|
|
1618
1654
|
var ChainLogo = /*#__PURE__*/styled('div', {
|
|
1619
1655
|
position: 'absolute',
|
|
1620
1656
|
right: -4,
|
|
1621
1657
|
bottom: -4,
|
|
1622
1658
|
width: '$16',
|
|
1623
1659
|
height: '$16',
|
|
1624
|
-
padding: '$2',
|
|
1625
1660
|
borderRadius: '50%',
|
|
1661
|
+
display: 'flex',
|
|
1662
|
+
justifyContent: 'center',
|
|
1663
|
+
alignItems: 'center',
|
|
1626
1664
|
backgroundColor: '$background',
|
|
1627
|
-
border: '1px solid $neutrals400'
|
|
1628
|
-
img: {
|
|
1629
|
-
width: '100%',
|
|
1630
|
-
display: 'block'
|
|
1631
|
-
}
|
|
1665
|
+
border: '1px solid $neutrals400'
|
|
1632
1666
|
});
|
|
1633
1667
|
var StepContainer = /*#__PURE__*/styled('div', {
|
|
1634
1668
|
display: 'flex',
|
|
@@ -1676,12 +1710,14 @@ function StepDetail(_ref) {
|
|
|
1676
1710
|
direction: direction
|
|
1677
1711
|
}, React__default.createElement(StepLogoContainer, {
|
|
1678
1712
|
direction: direction
|
|
1679
|
-
}, React__default.createElement(
|
|
1713
|
+
}, React__default.createElement(Image, {
|
|
1680
1714
|
src: logo,
|
|
1681
|
-
alt: symbol
|
|
1682
|
-
|
|
1715
|
+
alt: symbol,
|
|
1716
|
+
size: 28
|
|
1717
|
+
}), React__default.createElement(ChainLogo, null, React__default.createElement(Image, {
|
|
1683
1718
|
src: chainLogo,
|
|
1684
|
-
alt: blockchain
|
|
1719
|
+
alt: blockchain,
|
|
1720
|
+
size: 12
|
|
1685
1721
|
}))), React__default.createElement(Detail, {
|
|
1686
1722
|
pl: direction === 'horizontal'
|
|
1687
1723
|
}, React__default.createElement(Typography, {
|
|
@@ -1949,10 +1985,6 @@ var HR = /*#__PURE__*/styled('hr', {
|
|
|
1949
1985
|
border: '1px solid $neutrals400',
|
|
1950
1986
|
margin: '$8 0'
|
|
1951
1987
|
});
|
|
1952
|
-
var SwapperLogo = /*#__PURE__*/styled('img', {
|
|
1953
|
-
width: '$16',
|
|
1954
|
-
height: '$16'
|
|
1955
|
-
});
|
|
1956
1988
|
var RelativeContainer = /*#__PURE__*/styled('div', {
|
|
1957
1989
|
position: 'relative'
|
|
1958
1990
|
});
|
|
@@ -2084,9 +2116,10 @@ function BestRoute(props) {
|
|
|
2084
2116
|
chainLogo: swap.from.blockchainLogo,
|
|
2085
2117
|
blockchain: swap.from.blockchain,
|
|
2086
2118
|
amount: swap.fromAmount
|
|
2087
|
-
}), React__default.createElement(Dot, null)), React__default.createElement(SwapperContainer, null, React__default.createElement(Line, null), React__default.createElement(
|
|
2119
|
+
}), React__default.createElement(Dot, null)), React__default.createElement(SwapperContainer, null, React__default.createElement(Line, null), React__default.createElement(Image, {
|
|
2088
2120
|
src: swap.swapperLogo,
|
|
2089
|
-
alt: swap.swapperId
|
|
2121
|
+
alt: swap.swapperId,
|
|
2122
|
+
size: 20
|
|
2090
2123
|
}), 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
2124
|
direction: "vertical",
|
|
2092
2125
|
logo: swap.to.logo,
|
|
@@ -2100,7 +2133,7 @@ function BestRoute(props) {
|
|
|
2100
2133
|
}, "No routes found")));
|
|
2101
2134
|
}
|
|
2102
2135
|
|
|
2103
|
-
var _excluded$
|
|
2136
|
+
var _excluded$F = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
|
|
2104
2137
|
var _ghost, _css, _css2, _css3;
|
|
2105
2138
|
var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
2106
2139
|
borderRadius: '$5',
|
|
@@ -2445,7 +2478,7 @@ function Button(_ref) {
|
|
|
2445
2478
|
suffix = _ref.suffix,
|
|
2446
2479
|
align = _ref.align,
|
|
2447
2480
|
flexContent = _ref.flexContent,
|
|
2448
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2481
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
2449
2482
|
var isDisabled = loading || disabled;
|
|
2450
2483
|
return React__default.createElement(ButtonContainer, Object.assign({
|
|
2451
2484
|
disabled: isDisabled
|
|
@@ -2463,13 +2496,6 @@ function Button(_ref) {
|
|
|
2463
2496
|
}), suffix);
|
|
2464
2497
|
}
|
|
2465
2498
|
|
|
2466
|
-
var FilledCircle = /*#__PURE__*/styled('span', {
|
|
2467
|
-
width: '10px',
|
|
2468
|
-
height: '10px',
|
|
2469
|
-
backgroundColor: '$primary',
|
|
2470
|
-
borderRadius: '99999px'
|
|
2471
|
-
});
|
|
2472
|
-
|
|
2473
2499
|
var ListContainer = /*#__PURE__*/styled('div', {
|
|
2474
2500
|
display: 'grid',
|
|
2475
2501
|
gap: '.5rem',
|
|
@@ -2478,10 +2504,8 @@ var ListContainer = /*#__PURE__*/styled('div', {
|
|
|
2478
2504
|
width: '100%',
|
|
2479
2505
|
height: '100%'
|
|
2480
2506
|
});
|
|
2481
|
-
var
|
|
2482
|
-
|
|
2483
|
-
maxHeight: '1.5rem',
|
|
2484
|
-
marginRight: '$4'
|
|
2507
|
+
var ImageContainer$1 = /*#__PURE__*/styled('div', {
|
|
2508
|
+
paddingRight: '$4'
|
|
2485
2509
|
});
|
|
2486
2510
|
function BlockchainsList(props) {
|
|
2487
2511
|
var list = props.list,
|
|
@@ -2508,9 +2532,10 @@ function BlockchainsList(props) {
|
|
|
2508
2532
|
type: isSelect(blockchain.name) ? 'primary' : undefined,
|
|
2509
2533
|
variant: "outlined",
|
|
2510
2534
|
size: "large",
|
|
2511
|
-
prefix: React__default.createElement(Image, {
|
|
2535
|
+
prefix: React__default.createElement(ImageContainer$1, null, React__default.createElement(Image, {
|
|
2536
|
+
size: 24,
|
|
2512
2537
|
src: blockchain.logo
|
|
2513
|
-
}),
|
|
2538
|
+
})),
|
|
2514
2539
|
suffix: isSelect(blockchain.name) ? React__default.createElement(FilledCircle, null) : undefined,
|
|
2515
2540
|
align: "start",
|
|
2516
2541
|
onClick: changeSelectedBlockchain.bind(null, blockchain),
|
|
@@ -2581,7 +2606,7 @@ function Header(props) {
|
|
|
2581
2606
|
}, props.title), props.suffix || React__default.createElement("div", null));
|
|
2582
2607
|
}
|
|
2583
2608
|
|
|
2584
|
-
var _excluded$
|
|
2609
|
+
var _excluded$G = ["label", "prefix", "suffix", "children", "size", "style"];
|
|
2585
2610
|
var InputContainer = /*#__PURE__*/styled('div', {
|
|
2586
2611
|
backgroundColor: '$background',
|
|
2587
2612
|
padding: '1px',
|
|
@@ -2668,7 +2693,7 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
2668
2693
|
suffix = props.suffix,
|
|
2669
2694
|
size = props.size,
|
|
2670
2695
|
style = props.style,
|
|
2671
|
-
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$
|
|
2696
|
+
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$G);
|
|
2672
2697
|
return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({
|
|
2673
2698
|
className: "_text"
|
|
2674
2699
|
}, inputAttributes.id && {
|
|
@@ -2728,10 +2753,10 @@ function SecondaryPage(props) {
|
|
|
2728
2753
|
})), props.textField && (props.children == null ? void 0 : props.children(searchedFor)), !props.textField && props.children), Footer);
|
|
2729
2754
|
}
|
|
2730
2755
|
|
|
2731
|
-
|
|
2756
|
+
function containsText(text, searchText) {
|
|
2732
2757
|
return text.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
|
|
2733
|
-
}
|
|
2734
|
-
|
|
2758
|
+
}
|
|
2759
|
+
function getConciseAddress(address, maxChars, ellipsisLength) {
|
|
2735
2760
|
if (maxChars === void 0) {
|
|
2736
2761
|
maxChars = 8;
|
|
2737
2762
|
}
|
|
@@ -2743,7 +2768,19 @@ var getConciseAddress = function getConciseAddress(address, maxChars, ellipsisLe
|
|
|
2743
2768
|
var start = Math.ceil((address.length - maxChars) / 2);
|
|
2744
2769
|
var end = address.length - maxChars;
|
|
2745
2770
|
return "" + address.substr(start, maxChars) + '.'.repeat(ellipsisLength) + address.substr(end);
|
|
2746
|
-
}
|
|
2771
|
+
}
|
|
2772
|
+
function limitDecimalPlaces(numberString, maxDecimalPlaces) {
|
|
2773
|
+
if (maxDecimalPlaces === void 0) {
|
|
2774
|
+
maxDecimalPlaces = 4;
|
|
2775
|
+
}
|
|
2776
|
+
var number = parseFloat(numberString);
|
|
2777
|
+
if (isNaN(number)) return numberString; // Return the original string if it's not a valid number
|
|
2778
|
+
else {
|
|
2779
|
+
var multiplier = Math.pow(10, maxDecimalPlaces);
|
|
2780
|
+
var roundedNumber = Math.round(number * multiplier) / multiplier;
|
|
2781
|
+
return roundedNumber.toString();
|
|
2782
|
+
}
|
|
2783
|
+
}
|
|
2747
2784
|
|
|
2748
2785
|
var SpacerContainer = /*#__PURE__*/styled('div', {
|
|
2749
2786
|
variants: {
|
|
@@ -3001,10 +3038,8 @@ function VirtualizedList(props) {
|
|
|
3001
3038
|
});
|
|
3002
3039
|
}
|
|
3003
3040
|
|
|
3004
|
-
var
|
|
3005
|
-
|
|
3006
|
-
maxHeight: '$32',
|
|
3007
|
-
marginRight: '$16'
|
|
3041
|
+
var TokenImageContainer = /*#__PURE__*/styled('div', {
|
|
3042
|
+
paddingRight: '$16'
|
|
3008
3043
|
});
|
|
3009
3044
|
var TokenNameContainer = /*#__PURE__*/styled('div', {
|
|
3010
3045
|
display: 'flex',
|
|
@@ -3037,9 +3072,10 @@ function TokenItem(props) {
|
|
|
3037
3072
|
align: "start",
|
|
3038
3073
|
onClick: onClick.bind(null, token),
|
|
3039
3074
|
type: selected ? 'primary' : undefined,
|
|
3040
|
-
prefix: React__default.createElement(
|
|
3041
|
-
src: token.image
|
|
3042
|
-
|
|
3075
|
+
prefix: React__default.createElement(TokenImageContainer, null, React__default.createElement(Image, {
|
|
3076
|
+
src: token.image,
|
|
3077
|
+
size: 32
|
|
3078
|
+
})),
|
|
3043
3079
|
suffix: ((_token$balance = token.balance) == null ? void 0 : _token$balance.amount) && React__default.createElement(TokenAmountContainer, null, React__default.createElement(Typography, {
|
|
3044
3080
|
variant: "body2"
|
|
3045
3081
|
}, token.balance.amount), React__default.createElement(Typography, {
|
|
@@ -3053,7 +3089,7 @@ function TokenItem(props) {
|
|
|
3053
3089
|
}, token.name))));
|
|
3054
3090
|
}
|
|
3055
3091
|
|
|
3056
|
-
var _excluded$
|
|
3092
|
+
var _excluded$H = ["style"];
|
|
3057
3093
|
var PAGE_SIZE = 20;
|
|
3058
3094
|
function TokenList(props) {
|
|
3059
3095
|
var list = props.list,
|
|
@@ -3093,7 +3129,7 @@ function TokenList(props) {
|
|
|
3093
3129
|
}, [tokens.length]);
|
|
3094
3130
|
var innerElementType = forwardRef(function (_ref, ref) {
|
|
3095
3131
|
var style = _ref.style,
|
|
3096
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3132
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
3097
3133
|
return React__default.createElement("div", Object.assign({
|
|
3098
3134
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3099
3135
|
ref: ref,
|
|
@@ -3208,7 +3244,7 @@ function BlockchainSelector(props) {
|
|
|
3208
3244
|
});
|
|
3209
3245
|
}
|
|
3210
3246
|
|
|
3211
|
-
var _excluded$
|
|
3247
|
+
var _excluded$I = ["label", "id"];
|
|
3212
3248
|
var CheckboxContainer = /*#__PURE__*/styled('div', {
|
|
3213
3249
|
display: 'flex',
|
|
3214
3250
|
alignItems: 'center'
|
|
@@ -3233,7 +3269,7 @@ var Label$1 = /*#__PURE__*/styled('label', {
|
|
|
3233
3269
|
function Checkbox(_ref) {
|
|
3234
3270
|
var label = _ref.label,
|
|
3235
3271
|
id = _ref.id,
|
|
3236
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3272
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
3237
3273
|
return React__default.createElement(CheckboxContainer, null, React__default.createElement(CheckboxRoot, Object.assign({
|
|
3238
3274
|
id: id
|
|
3239
3275
|
}, props), React__default.createElement(Indicator, null, React__default.createElement(CheckIcon, {
|
|
@@ -3366,10 +3402,8 @@ var State = function State(_ref) {
|
|
|
3366
3402
|
})), walletState === WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === WalletState.CONNECTED && React__default.createElement(DisconnectIcon, null)));
|
|
3367
3403
|
};
|
|
3368
3404
|
|
|
3369
|
-
var
|
|
3370
|
-
|
|
3371
|
-
height: '$24',
|
|
3372
|
-
marginRight: '$12'
|
|
3405
|
+
var WalletImageContainer = /*#__PURE__*/styled('div', {
|
|
3406
|
+
paddingRight: '$12'
|
|
3373
3407
|
});
|
|
3374
3408
|
var Text = /*#__PURE__*/styled('div', {
|
|
3375
3409
|
display: 'flex',
|
|
@@ -3406,9 +3440,10 @@ function Wallet(props) {
|
|
|
3406
3440
|
align: "start",
|
|
3407
3441
|
variant: "outlined",
|
|
3408
3442
|
size: "large",
|
|
3409
|
-
prefix: React__default.createElement(
|
|
3410
|
-
src: image
|
|
3411
|
-
|
|
3443
|
+
prefix: React__default.createElement(WalletImageContainer, null, React__default.createElement(Image, {
|
|
3444
|
+
src: image,
|
|
3445
|
+
size: 24
|
|
3446
|
+
})),
|
|
3412
3447
|
suffix: React__default.createElement(State, {
|
|
3413
3448
|
walletState: state,
|
|
3414
3449
|
installLink: installLink
|
|
@@ -3524,10 +3559,8 @@ var LiquiditySourceType = /*#__PURE__*/styled('div', {
|
|
|
3524
3559
|
paddingTop: '$8',
|
|
3525
3560
|
paddingBottom: '$8'
|
|
3526
3561
|
});
|
|
3527
|
-
var
|
|
3528
|
-
|
|
3529
|
-
maxHeight: '$20',
|
|
3530
|
-
marginRight: '$16'
|
|
3562
|
+
var LiquidityImageContainer = /*#__PURE__*/styled('div', {
|
|
3563
|
+
paddingRight: '$16'
|
|
3531
3564
|
});
|
|
3532
3565
|
var LoaderContainer$1 = /*#__PURE__*/styled('div', {
|
|
3533
3566
|
display: 'flex',
|
|
@@ -3625,9 +3658,10 @@ var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
|
|
|
3625
3658
|
size: "large",
|
|
3626
3659
|
align: "start",
|
|
3627
3660
|
variant: "outlined",
|
|
3628
|
-
prefix: React__default.createElement(
|
|
3629
|
-
src: liquiditySource.logo
|
|
3630
|
-
|
|
3661
|
+
prefix: React__default.createElement(LiquidityImageContainer, null, React__default.createElement(Image, {
|
|
3662
|
+
src: liquiditySource.logo,
|
|
3663
|
+
size: 20
|
|
3664
|
+
})),
|
|
3631
3665
|
suffix: React__default.createElement(Switch, {
|
|
3632
3666
|
checked: selected
|
|
3633
3667
|
}),
|
|
@@ -3767,11 +3801,10 @@ function SelectableWalletList(_ref) {
|
|
|
3767
3801
|
checked: checked,
|
|
3768
3802
|
onClick: onClick.bind(null, w),
|
|
3769
3803
|
key: index
|
|
3770
|
-
}, React__default.createElement(
|
|
3804
|
+
}, React__default.createElement(Image, {
|
|
3771
3805
|
src: w.image,
|
|
3772
3806
|
alt: w.walletType,
|
|
3773
|
-
|
|
3774
|
-
height: 24
|
|
3807
|
+
size: 24
|
|
3775
3808
|
}), React__default.createElement(Typography, {
|
|
3776
3809
|
variant: "body2"
|
|
3777
3810
|
}, w.name), React__default.createElement(Typography, {
|
|
@@ -4051,18 +4084,13 @@ function SwapContainer(props) {
|
|
|
4051
4084
|
var TokenContainer = /*#__PURE__*/styled('div', {
|
|
4052
4085
|
display: 'flex',
|
|
4053
4086
|
alignItems: 'center',
|
|
4087
|
+
width: '160px',
|
|
4054
4088
|
'& .amount': {
|
|
4055
4089
|
fontWeight: 'bold'
|
|
4056
4090
|
}
|
|
4057
4091
|
});
|
|
4058
|
-
var TokenImage
|
|
4092
|
+
var TokenImage = /*#__PURE__*/styled('div', {
|
|
4059
4093
|
position: 'relative',
|
|
4060
|
-
width: '$24',
|
|
4061
|
-
height: '$24',
|
|
4062
|
-
img: {
|
|
4063
|
-
width: '100%',
|
|
4064
|
-
display: 'block'
|
|
4065
|
-
},
|
|
4066
4094
|
'.overlay': {
|
|
4067
4095
|
position: 'absolute',
|
|
4068
4096
|
right: -4,
|
|
@@ -4071,19 +4099,24 @@ var TokenImage$1 = /*#__PURE__*/styled('div', {
|
|
|
4071
4099
|
height: '$16',
|
|
4072
4100
|
padding: '$2',
|
|
4073
4101
|
borderRadius: '50%',
|
|
4102
|
+
display: 'flex',
|
|
4103
|
+
justifyContent: 'center',
|
|
4104
|
+
alignItems: 'center',
|
|
4074
4105
|
backgroundColor: '$background',
|
|
4075
4106
|
border: '1px solid $neutrals400'
|
|
4076
4107
|
}
|
|
4077
4108
|
});
|
|
4078
4109
|
function Token(props) {
|
|
4079
|
-
return React__default.createElement(TokenContainer, null, React__default.createElement(TokenImage
|
|
4110
|
+
return React__default.createElement(TokenContainer, null, React__default.createElement(TokenImage, null, React__default.createElement(Image, {
|
|
4080
4111
|
src: props.data.token.logo,
|
|
4081
|
-
alt: ""
|
|
4112
|
+
alt: "",
|
|
4113
|
+
size: 24
|
|
4082
4114
|
}), React__default.createElement("div", {
|
|
4083
4115
|
className: "overlay"
|
|
4084
|
-
}, React__default.createElement(
|
|
4116
|
+
}, React__default.createElement(Image, {
|
|
4085
4117
|
src: props.data.blockchain.logo,
|
|
4086
|
-
alt: props.data.blockchain.name
|
|
4118
|
+
alt: props.data.blockchain.name,
|
|
4119
|
+
size: 12
|
|
4087
4120
|
}))), React__default.createElement(Spacer, {
|
|
4088
4121
|
size: 8
|
|
4089
4122
|
}), React__default.createElement("span", {
|
|
@@ -4148,7 +4181,7 @@ function SwapDetail(_ref) {
|
|
|
4148
4181
|
logo: firstStep.fromBlockchainLogo || '',
|
|
4149
4182
|
name: firstStep.fromBlockchain
|
|
4150
4183
|
},
|
|
4151
|
-
amount: swap.inputAmount
|
|
4184
|
+
amount: limitDecimalPlaces(swap.inputAmount)
|
|
4152
4185
|
}
|
|
4153
4186
|
}), React__default.createElement(Spacer, {
|
|
4154
4187
|
size: 12
|
|
@@ -4167,7 +4200,7 @@ function SwapDetail(_ref) {
|
|
|
4167
4200
|
logo: lastStep.toBlockchainLogo,
|
|
4168
4201
|
name: lastStep.toBlockchain
|
|
4169
4202
|
},
|
|
4170
|
-
amount: lastStep.outputAmount || lastStep.expectedOutputAmountHumanReadable || ''
|
|
4203
|
+
amount: limitDecimalPlaces(lastStep.outputAmount || lastStep.expectedOutputAmountHumanReadable || '')
|
|
4171
4204
|
}
|
|
4172
4205
|
})), React__default.createElement("div", {
|
|
4173
4206
|
className: "status"
|
|
@@ -4517,7 +4550,7 @@ function History(_ref) {
|
|
|
4517
4550
|
return React__default.createElement(SecondaryPage, {
|
|
4518
4551
|
onBack: onBack,
|
|
4519
4552
|
textField: true,
|
|
4520
|
-
textFieldPlaceholder: "Search
|
|
4553
|
+
textFieldPlaceholder: "Search by Blockchain/Token/Request Id",
|
|
4521
4554
|
title: "Swaps"
|
|
4522
4555
|
}, function (searchedFor) {
|
|
4523
4556
|
var filterSwaps = filteredHistory(list, searchedFor);
|
|
@@ -4589,7 +4622,7 @@ var SwapMessages = function SwapMessages(props) {
|
|
|
4589
4622
|
}, "wallet"))));
|
|
4590
4623
|
};
|
|
4591
4624
|
|
|
4592
|
-
var _excluded$
|
|
4625
|
+
var _excluded$J = ["pendingSwap", "onBack", "onCopy", "isCopied", "onCancel", "date", "onRetry", "previewInputs"];
|
|
4593
4626
|
var SwapperContainer$1 = /*#__PURE__*/styled('div', {
|
|
4594
4627
|
display: 'flex',
|
|
4595
4628
|
alignItems: 'center',
|
|
@@ -4599,10 +4632,6 @@ var Fee = /*#__PURE__*/styled('div', {
|
|
|
4599
4632
|
display: 'flex',
|
|
4600
4633
|
alignItems: 'center'
|
|
4601
4634
|
});
|
|
4602
|
-
var SwapperLogo$1 = /*#__PURE__*/styled('img', {
|
|
4603
|
-
width: '$16',
|
|
4604
|
-
height: '$16'
|
|
4605
|
-
});
|
|
4606
4635
|
var RelativeContainer$1 = /*#__PURE__*/styled('div', {
|
|
4607
4636
|
position: 'relative'
|
|
4608
4637
|
});
|
|
@@ -4721,7 +4750,7 @@ function SwapHistory(props) {
|
|
|
4721
4750
|
onCancel = props.onCancel,
|
|
4722
4751
|
date = props.date,
|
|
4723
4752
|
onRetry = props.onRetry,
|
|
4724
|
-
extraMessageProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
4753
|
+
extraMessageProps = _objectWithoutPropertiesLoose(props, _excluded$J);
|
|
4725
4754
|
var _useState = useState(false),
|
|
4726
4755
|
showDrawer = _useState[0],
|
|
4727
4756
|
setShowDrawer = _useState[1];
|
|
@@ -4772,11 +4801,13 @@ function SwapHistory(props) {
|
|
|
4772
4801
|
chainLogo: step.fromBlockchainLogo || '',
|
|
4773
4802
|
blockchain: step.fromBlockchain,
|
|
4774
4803
|
amount: pendingSwap.inputAmount
|
|
4775
|
-
}), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1, null, React__default.createElement(
|
|
4776
|
-
|
|
4804
|
+
}), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1, null, React__default.createElement(Image
|
|
4805
|
+
// @ts-ignore
|
|
4806
|
+
, {
|
|
4777
4807
|
// @ts-ignore
|
|
4778
|
-
step.swapperLogo
|
|
4779
|
-
alt: step.swapperId
|
|
4808
|
+
src: step.swapperLogo,
|
|
4809
|
+
alt: step.swapperId,
|
|
4810
|
+
size: 16
|
|
4780
4811
|
}), React__default.createElement("div", null, React__default.createElement(Typography, {
|
|
4781
4812
|
ml: 4,
|
|
4782
4813
|
variant: "caption"
|
|
@@ -4854,5 +4885,5 @@ function SwapHistory(props) {
|
|
|
4854
4885
|
}));
|
|
4855
4886
|
}
|
|
4856
4887
|
|
|
4857
|
-
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 };
|
|
4888
|
+
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, Switch, TextField, TimeIcon, TokenList, TokenSelector, Tooltip, TrashIcon, TryAgainIcon, Typography, VerticalSwapIcon, Wallet, WalletIcon, WalletState, WarningIcon, createTheme, css, darkTheme, globalCss, keyframes, lightTheme, styled };
|
|
4858
4889
|
//# sourceMappingURL=ui.esm.js.map
|