@rango-dev/ui 0.1.11-next.3 → 0.1.11-next.5
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/StepDetail/StepDetail.d.ts +3 -1
- 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 +1 -1
- package/dist/ui.cjs.development.js +166 -130
- 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 +166 -131
- 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 +42 -12
- package/src/components/SwapDetail/Token.tsx +7 -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 +84 -101
|
@@ -2,5 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
export interface IconProps extends React.SVGAttributes<SVGElement> {
|
|
3
3
|
size?: 12 | 16 | 18 | 20 | 24 | 28 | 32 | 36 | 40;
|
|
4
4
|
color?: 'primary' | 'error' | 'warning' | 'success' | 'black' | 'white';
|
|
5
|
+
disabled?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare type Icon = 'DeleteCircleIcon' | 'CheckSquareIcon' | 'AddIcon' | 'InfoCircleIcon' | 'AddCircleIcon' | 'MinusCircleIcon' | 'CheckCircleIcon' | 'CheckIcon' | 'BanIcon' | 'WarningIcon' | 'HistoryIcon' | 'GasIcon' | 'SettingsIcon' | 'TrashIcon' | 'SearchMinusIcon' | 'SearchIcon' | 'AngleRightIcon' | 'AngleUpIcon' | 'AngleDownIcon' | 'AngleLeftIcon' | 'DownloadIcon' | 'RetryRightIcon' | 'RetryLeftIcon' | 'TryAgainIcon' | 'VerticalSwapIcon' | 'HorizontalSwapIcon' | 'RetryIcon' | 'WalletIcon' | 'AddWalletIcon' | 'DeleteWalletIcon' | 'CheckWalletIcon' | 'SwapWalletIcon' | 'BagIcon' | 'TimeIcon' | 'CloseIcon' | 'SignatureIcon' | 'CopyIcon';
|
|
@@ -5,6 +5,8 @@ export interface PropTypes {
|
|
|
5
5
|
amount: string;
|
|
6
6
|
symbol: string;
|
|
7
7
|
blockchain: string;
|
|
8
|
+
estimatedAmount?: string;
|
|
8
9
|
direction?: 'horizontal' | 'vertical';
|
|
10
|
+
success?: boolean;
|
|
9
11
|
}
|
|
10
|
-
export declare function StepDetail(
|
|
12
|
+
export declare function StepDetail(props: PropsWithChildren<PropTypes>): JSX.Element;
|
|
@@ -4,8 +4,8 @@ import { PropTypes as SwapMessagesPropTypes } from './SwapMessages';
|
|
|
4
4
|
export declare const SwapperContainer: any;
|
|
5
5
|
export declare const BodyError: any;
|
|
6
6
|
export declare const ErrorMsg: any;
|
|
7
|
+
export declare const FeeContainer: any;
|
|
7
8
|
export declare const Fee: any;
|
|
8
|
-
export declare const SwapperLogo: any;
|
|
9
9
|
export declare const RelativeContainer: any;
|
|
10
10
|
export declare const Footer: any;
|
|
11
11
|
export declare const Dot: any;
|
|
@@ -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
|
});
|
|
@@ -1649,6 +1659,14 @@ var StepContainer = /*#__PURE__*/styled('div', {
|
|
|
1649
1659
|
textAlign: 'center',
|
|
1650
1660
|
justifyContent: 'center'
|
|
1651
1661
|
}
|
|
1662
|
+
},
|
|
1663
|
+
success: {
|
|
1664
|
+
"true": {
|
|
1665
|
+
filter: 'none'
|
|
1666
|
+
},
|
|
1667
|
+
"false": {
|
|
1668
|
+
filter: 'grayscale(100%)'
|
|
1669
|
+
}
|
|
1652
1670
|
}
|
|
1653
1671
|
}
|
|
1654
1672
|
});
|
|
@@ -1669,18 +1687,23 @@ var Detail = /*#__PURE__*/styled('div', {
|
|
|
1669
1687
|
});
|
|
1670
1688
|
var SubTitle = /*#__PURE__*/styled(Typography, {
|
|
1671
1689
|
color: '$neutrals600',
|
|
1672
|
-
display: 'block'
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1690
|
+
display: 'block',
|
|
1691
|
+
paddingLeft: '$8'
|
|
1692
|
+
});
|
|
1693
|
+
function StepDetail(props) {
|
|
1694
|
+
var logo = props.logo,
|
|
1695
|
+
chainLogo = props.chainLogo,
|
|
1696
|
+
amount = props.amount,
|
|
1697
|
+
symbol = props.symbol,
|
|
1698
|
+
blockchain = props.blockchain,
|
|
1699
|
+
estimatedAmount = props.estimatedAmount,
|
|
1700
|
+
_props$success = props.success,
|
|
1701
|
+
success = _props$success === void 0 ? true : _props$success,
|
|
1702
|
+
_props$direction = props.direction,
|
|
1703
|
+
direction = _props$direction === void 0 ? 'horizontal' : _props$direction;
|
|
1682
1704
|
return React__default.createElement(StepContainer, {
|
|
1683
|
-
direction: direction
|
|
1705
|
+
direction: direction,
|
|
1706
|
+
success: success
|
|
1684
1707
|
}, React__default.createElement(StepLogoContainer, {
|
|
1685
1708
|
direction: direction
|
|
1686
1709
|
}, React__default.createElement(Logo, {
|
|
@@ -1691,13 +1714,20 @@ function StepDetail(_ref) {
|
|
|
1691
1714
|
alt: blockchain
|
|
1692
1715
|
}))), React__default.createElement(Detail, {
|
|
1693
1716
|
pl: direction === 'horizontal'
|
|
1694
|
-
}, React__default.createElement(Typography, {
|
|
1717
|
+
}, amount && React__default.createElement(Typography, {
|
|
1695
1718
|
noWrap: true,
|
|
1696
1719
|
variant: direction === 'vertical' ? 'body2' : 'h6'
|
|
1697
|
-
}, amount
|
|
1720
|
+
}, amount), !amount && estimatedAmount && React__default.createElement(Typography, {
|
|
1721
|
+
noWrap: true,
|
|
1722
|
+
variant: direction === 'vertical' ? 'body2' : 'h6',
|
|
1723
|
+
color: '$neutrals500'
|
|
1724
|
+
}, estimatedAmount), "\xA0", React__default.createElement(Typography, {
|
|
1725
|
+
variant: direction === 'vertical' ? 'body2' : 'h6',
|
|
1726
|
+
noWrap: true
|
|
1727
|
+
}, symbol), React__default.createElement(SubTitle, {
|
|
1698
1728
|
noWrap: true,
|
|
1699
1729
|
variant: "caption",
|
|
1700
|
-
color: "neutrals800"
|
|
1730
|
+
color: "$neutrals800"
|
|
1701
1731
|
}, "on ", blockchain)));
|
|
1702
1732
|
}
|
|
1703
1733
|
|
|
@@ -1919,6 +1949,37 @@ function Tooltip(_ref) {
|
|
|
1919
1949
|
})))));
|
|
1920
1950
|
}
|
|
1921
1951
|
|
|
1952
|
+
var FilledCircle = /*#__PURE__*/styled('span', {
|
|
1953
|
+
width: '10px',
|
|
1954
|
+
height: '10px',
|
|
1955
|
+
backgroundColor: '$primary',
|
|
1956
|
+
borderRadius: '99999px'
|
|
1957
|
+
});
|
|
1958
|
+
|
|
1959
|
+
var _excluded$E = ["size"];
|
|
1960
|
+
var ImageContainer = /*#__PURE__*/styled('div', {
|
|
1961
|
+
display: 'flex',
|
|
1962
|
+
justifyContent: 'center',
|
|
1963
|
+
alignItems: 'center',
|
|
1964
|
+
'.image': {
|
|
1965
|
+
width: '100%',
|
|
1966
|
+
height: '100%',
|
|
1967
|
+
objectFit: 'contain'
|
|
1968
|
+
}
|
|
1969
|
+
});
|
|
1970
|
+
function Image(props) {
|
|
1971
|
+
var size = props.size,
|
|
1972
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$E);
|
|
1973
|
+
return React__default.createElement(ImageContainer, {
|
|
1974
|
+
css: {
|
|
1975
|
+
width: size + 'px',
|
|
1976
|
+
height: size + 'px'
|
|
1977
|
+
}
|
|
1978
|
+
}, React__default.createElement("img", Object.assign({
|
|
1979
|
+
className: "image"
|
|
1980
|
+
}, otherProps)));
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1922
1983
|
var Container = /*#__PURE__*/styled('div', {
|
|
1923
1984
|
borderRadius: '$5',
|
|
1924
1985
|
border: '1px solid $neutrals300',
|
|
@@ -1956,10 +2017,6 @@ var HR = /*#__PURE__*/styled('hr', {
|
|
|
1956
2017
|
border: '1px solid $neutrals400',
|
|
1957
2018
|
margin: '$8 0'
|
|
1958
2019
|
});
|
|
1959
|
-
var SwapperLogo = /*#__PURE__*/styled('img', {
|
|
1960
|
-
width: '$16',
|
|
1961
|
-
height: '$16'
|
|
1962
|
-
});
|
|
1963
2020
|
var RelativeContainer = /*#__PURE__*/styled('div', {
|
|
1964
2021
|
position: 'relative'
|
|
1965
2022
|
});
|
|
@@ -2091,9 +2148,10 @@ function BestRoute(props) {
|
|
|
2091
2148
|
chainLogo: swap.from.blockchainLogo,
|
|
2092
2149
|
blockchain: swap.from.blockchain,
|
|
2093
2150
|
amount: swap.fromAmount
|
|
2094
|
-
}), React__default.createElement(Dot, null)), React__default.createElement(SwapperContainer, null, React__default.createElement(Line, null), React__default.createElement(
|
|
2151
|
+
}), React__default.createElement(Dot, null)), React__default.createElement(SwapperContainer, null, React__default.createElement(Line, null), React__default.createElement(Image, {
|
|
2095
2152
|
src: swap.swapperLogo,
|
|
2096
|
-
alt: swap.swapperId
|
|
2153
|
+
alt: swap.swapperId,
|
|
2154
|
+
size: 20
|
|
2097
2155
|
}), React__default.createElement(Line, null)), index + 1 === ((_data$result2 = data.result) == null ? void 0 : _data$result2.swaps.length) && React__default.createElement(ArrowRight, null), React__default.createElement(StepDetail, {
|
|
2098
2156
|
direction: "vertical",
|
|
2099
2157
|
logo: swap.to.logo,
|
|
@@ -2107,7 +2165,7 @@ function BestRoute(props) {
|
|
|
2107
2165
|
}, "No routes found")));
|
|
2108
2166
|
}
|
|
2109
2167
|
|
|
2110
|
-
var _excluded$
|
|
2168
|
+
var _excluded$F = ["children", "loading", "disabled", "prefix", "suffix", "align", "flexContent"];
|
|
2111
2169
|
var _ghost, _css, _css2, _css3;
|
|
2112
2170
|
var ButtonContainer = /*#__PURE__*/styled('button', {
|
|
2113
2171
|
borderRadius: '$5',
|
|
@@ -2452,7 +2510,7 @@ function Button(_ref) {
|
|
|
2452
2510
|
suffix = _ref.suffix,
|
|
2453
2511
|
align = _ref.align,
|
|
2454
2512
|
flexContent = _ref.flexContent,
|
|
2455
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2513
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
2456
2514
|
var isDisabled = loading || disabled;
|
|
2457
2515
|
return React__default.createElement(ButtonContainer, Object.assign({
|
|
2458
2516
|
disabled: isDisabled
|
|
@@ -2470,13 +2528,6 @@ function Button(_ref) {
|
|
|
2470
2528
|
}), suffix);
|
|
2471
2529
|
}
|
|
2472
2530
|
|
|
2473
|
-
var FilledCircle = /*#__PURE__*/styled('span', {
|
|
2474
|
-
width: '10px',
|
|
2475
|
-
height: '10px',
|
|
2476
|
-
backgroundColor: '$primary',
|
|
2477
|
-
borderRadius: '99999px'
|
|
2478
|
-
});
|
|
2479
|
-
|
|
2480
2531
|
var ListContainer = /*#__PURE__*/styled('div', {
|
|
2481
2532
|
display: 'grid',
|
|
2482
2533
|
gap: '.5rem',
|
|
@@ -2485,10 +2536,8 @@ var ListContainer = /*#__PURE__*/styled('div', {
|
|
|
2485
2536
|
width: '100%',
|
|
2486
2537
|
height: '100%'
|
|
2487
2538
|
});
|
|
2488
|
-
var
|
|
2489
|
-
|
|
2490
|
-
maxHeight: '1.5rem',
|
|
2491
|
-
marginRight: '$4'
|
|
2539
|
+
var ImageContainer$1 = /*#__PURE__*/styled('div', {
|
|
2540
|
+
paddingRight: '$4'
|
|
2492
2541
|
});
|
|
2493
2542
|
function BlockchainsList(props) {
|
|
2494
2543
|
var list = props.list,
|
|
@@ -2515,9 +2564,10 @@ function BlockchainsList(props) {
|
|
|
2515
2564
|
type: isSelect(blockchain.name) ? 'primary' : undefined,
|
|
2516
2565
|
variant: "outlined",
|
|
2517
2566
|
size: "large",
|
|
2518
|
-
prefix: React__default.createElement(Image, {
|
|
2567
|
+
prefix: React__default.createElement(ImageContainer$1, null, React__default.createElement(Image, {
|
|
2568
|
+
size: 24,
|
|
2519
2569
|
src: blockchain.logo
|
|
2520
|
-
}),
|
|
2570
|
+
})),
|
|
2521
2571
|
suffix: isSelect(blockchain.name) ? React__default.createElement(FilledCircle, null) : undefined,
|
|
2522
2572
|
align: "start",
|
|
2523
2573
|
onClick: changeSelectedBlockchain.bind(null, blockchain),
|
|
@@ -2588,7 +2638,7 @@ function Header(props) {
|
|
|
2588
2638
|
}, props.title), props.suffix || React__default.createElement("div", null));
|
|
2589
2639
|
}
|
|
2590
2640
|
|
|
2591
|
-
var _excluded$
|
|
2641
|
+
var _excluded$G = ["label", "prefix", "suffix", "children", "size", "style"];
|
|
2592
2642
|
var InputContainer = /*#__PURE__*/styled('div', {
|
|
2593
2643
|
backgroundColor: '$background',
|
|
2594
2644
|
padding: '1px',
|
|
@@ -2675,7 +2725,7 @@ var TextField = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
2675
2725
|
suffix = props.suffix,
|
|
2676
2726
|
size = props.size,
|
|
2677
2727
|
style = props.style,
|
|
2678
|
-
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$
|
|
2728
|
+
inputAttributes = _objectWithoutPropertiesLoose(props, _excluded$G);
|
|
2679
2729
|
return React__default.createElement(React__default.Fragment, null, label && React__default.createElement(Label, Object.assign({
|
|
2680
2730
|
className: "_text"
|
|
2681
2731
|
}, inputAttributes.id && {
|
|
@@ -3020,10 +3070,8 @@ function VirtualizedList(props) {
|
|
|
3020
3070
|
});
|
|
3021
3071
|
}
|
|
3022
3072
|
|
|
3023
|
-
var
|
|
3024
|
-
|
|
3025
|
-
maxHeight: '$32',
|
|
3026
|
-
marginRight: '$16'
|
|
3073
|
+
var TokenImageContainer = /*#__PURE__*/styled('div', {
|
|
3074
|
+
paddingRight: '$16'
|
|
3027
3075
|
});
|
|
3028
3076
|
var TokenNameContainer = /*#__PURE__*/styled('div', {
|
|
3029
3077
|
display: 'flex',
|
|
@@ -3056,9 +3104,10 @@ function TokenItem(props) {
|
|
|
3056
3104
|
align: "start",
|
|
3057
3105
|
onClick: onClick.bind(null, token),
|
|
3058
3106
|
type: selected ? 'primary' : undefined,
|
|
3059
|
-
prefix: React__default.createElement(
|
|
3060
|
-
src: token.image
|
|
3061
|
-
|
|
3107
|
+
prefix: React__default.createElement(TokenImageContainer, null, React__default.createElement(Image, {
|
|
3108
|
+
src: token.image,
|
|
3109
|
+
size: 32
|
|
3110
|
+
})),
|
|
3062
3111
|
suffix: ((_token$balance = token.balance) == null ? void 0 : _token$balance.amount) && React__default.createElement(TokenAmountContainer, null, React__default.createElement(Typography, {
|
|
3063
3112
|
variant: "body2"
|
|
3064
3113
|
}, token.balance.amount), React__default.createElement(Typography, {
|
|
@@ -3072,7 +3121,7 @@ function TokenItem(props) {
|
|
|
3072
3121
|
}, token.name))));
|
|
3073
3122
|
}
|
|
3074
3123
|
|
|
3075
|
-
var _excluded$
|
|
3124
|
+
var _excluded$H = ["style"];
|
|
3076
3125
|
var PAGE_SIZE = 20;
|
|
3077
3126
|
function TokenList(props) {
|
|
3078
3127
|
var list = props.list,
|
|
@@ -3112,7 +3161,7 @@ function TokenList(props) {
|
|
|
3112
3161
|
}, [tokens.length]);
|
|
3113
3162
|
var innerElementType = React.forwardRef(function (_ref, ref) {
|
|
3114
3163
|
var style = _ref.style,
|
|
3115
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3164
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
3116
3165
|
return React__default.createElement("div", Object.assign({
|
|
3117
3166
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3118
3167
|
ref: ref,
|
|
@@ -3227,7 +3276,7 @@ function BlockchainSelector(props) {
|
|
|
3227
3276
|
});
|
|
3228
3277
|
}
|
|
3229
3278
|
|
|
3230
|
-
var _excluded$
|
|
3279
|
+
var _excluded$I = ["label", "id"];
|
|
3231
3280
|
var CheckboxContainer = /*#__PURE__*/styled('div', {
|
|
3232
3281
|
display: 'flex',
|
|
3233
3282
|
alignItems: 'center'
|
|
@@ -3252,7 +3301,7 @@ var Label$1 = /*#__PURE__*/styled('label', {
|
|
|
3252
3301
|
function Checkbox(_ref) {
|
|
3253
3302
|
var label = _ref.label,
|
|
3254
3303
|
id = _ref.id,
|
|
3255
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3304
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
3256
3305
|
return React__default.createElement(CheckboxContainer, null, React__default.createElement(CheckboxRoot, Object.assign({
|
|
3257
3306
|
id: id
|
|
3258
3307
|
}, props), React__default.createElement(RadixCheckbox.Indicator, null, React__default.createElement(CheckIcon, {
|
|
@@ -3384,10 +3433,8 @@ var State = function State(_ref) {
|
|
|
3384
3433
|
})), walletState === exports.WalletState.CONNECTING && React__default.createElement(Spinner, null), walletState === exports.WalletState.CONNECTED && React__default.createElement(DisconnectIcon, null)));
|
|
3385
3434
|
};
|
|
3386
3435
|
|
|
3387
|
-
var
|
|
3388
|
-
|
|
3389
|
-
height: '$24',
|
|
3390
|
-
marginRight: '$12'
|
|
3436
|
+
var WalletImageContainer = /*#__PURE__*/styled('div', {
|
|
3437
|
+
paddingRight: '$12'
|
|
3391
3438
|
});
|
|
3392
3439
|
var Text = /*#__PURE__*/styled('div', {
|
|
3393
3440
|
display: 'flex',
|
|
@@ -3424,9 +3471,10 @@ function Wallet(props) {
|
|
|
3424
3471
|
align: "start",
|
|
3425
3472
|
variant: "outlined",
|
|
3426
3473
|
size: "large",
|
|
3427
|
-
prefix: React__default.createElement(
|
|
3428
|
-
src: image
|
|
3429
|
-
|
|
3474
|
+
prefix: React__default.createElement(WalletImageContainer, null, React__default.createElement(Image, {
|
|
3475
|
+
src: image,
|
|
3476
|
+
size: 24
|
|
3477
|
+
})),
|
|
3430
3478
|
suffix: React__default.createElement(State, {
|
|
3431
3479
|
walletState: state,
|
|
3432
3480
|
installLink: installLink
|
|
@@ -3542,10 +3590,8 @@ var LiquiditySourceType = /*#__PURE__*/styled('div', {
|
|
|
3542
3590
|
paddingTop: '$8',
|
|
3543
3591
|
paddingBottom: '$8'
|
|
3544
3592
|
});
|
|
3545
|
-
var
|
|
3546
|
-
|
|
3547
|
-
maxHeight: '$20',
|
|
3548
|
-
marginRight: '$16'
|
|
3593
|
+
var LiquidityImageContainer = /*#__PURE__*/styled('div', {
|
|
3594
|
+
paddingRight: '$16'
|
|
3549
3595
|
});
|
|
3550
3596
|
var LoaderContainer$1 = /*#__PURE__*/styled('div', {
|
|
3551
3597
|
display: 'flex',
|
|
@@ -3643,9 +3689,10 @@ var LiquiditySourceItem = function LiquiditySourceItem(_ref) {
|
|
|
3643
3689
|
size: "large",
|
|
3644
3690
|
align: "start",
|
|
3645
3691
|
variant: "outlined",
|
|
3646
|
-
prefix: React__default.createElement(
|
|
3647
|
-
src: liquiditySource.logo
|
|
3648
|
-
|
|
3692
|
+
prefix: React__default.createElement(LiquidityImageContainer, null, React__default.createElement(Image, {
|
|
3693
|
+
src: liquiditySource.logo,
|
|
3694
|
+
size: 20
|
|
3695
|
+
})),
|
|
3649
3696
|
suffix: React__default.createElement(Switch, {
|
|
3650
3697
|
checked: selected
|
|
3651
3698
|
}),
|
|
@@ -3785,11 +3832,10 @@ function SelectableWalletList(_ref) {
|
|
|
3785
3832
|
checked: checked,
|
|
3786
3833
|
onClick: onClick.bind(null, w),
|
|
3787
3834
|
key: index
|
|
3788
|
-
}, React__default.createElement(
|
|
3835
|
+
}, React__default.createElement(Image, {
|
|
3789
3836
|
src: w.image,
|
|
3790
3837
|
alt: w.walletType,
|
|
3791
|
-
|
|
3792
|
-
height: 24
|
|
3838
|
+
size: 24
|
|
3793
3839
|
}), React__default.createElement(Typography, {
|
|
3794
3840
|
variant: "body2"
|
|
3795
3841
|
}, w.name), React__default.createElement(Typography, {
|
|
@@ -4074,14 +4120,8 @@ var TokenContainer = /*#__PURE__*/styled('div', {
|
|
|
4074
4120
|
fontWeight: 'bold'
|
|
4075
4121
|
}
|
|
4076
4122
|
});
|
|
4077
|
-
var TokenImage
|
|
4123
|
+
var TokenImage = /*#__PURE__*/styled('div', {
|
|
4078
4124
|
position: 'relative',
|
|
4079
|
-
width: '$24',
|
|
4080
|
-
height: '$24',
|
|
4081
|
-
img: {
|
|
4082
|
-
width: '100%',
|
|
4083
|
-
display: 'block'
|
|
4084
|
-
},
|
|
4085
4125
|
'.overlay': {
|
|
4086
4126
|
position: 'absolute',
|
|
4087
4127
|
right: -4,
|
|
@@ -4090,19 +4130,24 @@ var TokenImage$1 = /*#__PURE__*/styled('div', {
|
|
|
4090
4130
|
height: '$16',
|
|
4091
4131
|
padding: '$2',
|
|
4092
4132
|
borderRadius: '50%',
|
|
4133
|
+
display: 'flex',
|
|
4134
|
+
justifyContent: 'center',
|
|
4135
|
+
alignItems: 'center',
|
|
4093
4136
|
backgroundColor: '$background',
|
|
4094
4137
|
border: '1px solid $neutrals400'
|
|
4095
4138
|
}
|
|
4096
4139
|
});
|
|
4097
4140
|
function Token(props) {
|
|
4098
|
-
return React__default.createElement(TokenContainer, null, React__default.createElement(TokenImage
|
|
4141
|
+
return React__default.createElement(TokenContainer, null, React__default.createElement(TokenImage, null, React__default.createElement(Image, {
|
|
4099
4142
|
src: props.data.token.logo,
|
|
4100
|
-
alt: ""
|
|
4143
|
+
alt: "",
|
|
4144
|
+
size: 24
|
|
4101
4145
|
}), React__default.createElement("div", {
|
|
4102
4146
|
className: "overlay"
|
|
4103
|
-
}, React__default.createElement(
|
|
4147
|
+
}, React__default.createElement(Image, {
|
|
4104
4148
|
src: props.data.blockchain.logo,
|
|
4105
|
-
alt: props.data.blockchain.name
|
|
4149
|
+
alt: props.data.blockchain.name,
|
|
4150
|
+
size: 12
|
|
4106
4151
|
}))), React__default.createElement(Spacer, {
|
|
4107
4152
|
size: 8
|
|
4108
4153
|
}), React__default.createElement("span", {
|
|
@@ -4536,7 +4581,7 @@ function History(_ref) {
|
|
|
4536
4581
|
return React__default.createElement(SecondaryPage, {
|
|
4537
4582
|
onBack: onBack,
|
|
4538
4583
|
textField: true,
|
|
4539
|
-
textFieldPlaceholder: "Search
|
|
4584
|
+
textFieldPlaceholder: "Search by Blockchain/Token/Request Id",
|
|
4540
4585
|
title: "Swaps"
|
|
4541
4586
|
}, function (searchedFor) {
|
|
4542
4587
|
var filterSwaps = filteredHistory(list, searchedFor);
|
|
@@ -4608,20 +4653,31 @@ var SwapMessages = function SwapMessages(props) {
|
|
|
4608
4653
|
}, "wallet"))));
|
|
4609
4654
|
};
|
|
4610
4655
|
|
|
4611
|
-
var _excluded$
|
|
4656
|
+
var _excluded$J = ["pendingSwap", "onBack", "onCopy", "isCopied", "onCancel", "date", "onRetry", "previewInputs"];
|
|
4612
4657
|
var SwapperContainer$1 = /*#__PURE__*/styled('div', {
|
|
4613
4658
|
display: 'flex',
|
|
4614
4659
|
alignItems: 'center',
|
|
4615
|
-
|
|
4660
|
+
paddingLeft: '$4',
|
|
4661
|
+
variants: {
|
|
4662
|
+
created: {
|
|
4663
|
+
"true": {
|
|
4664
|
+
filter: 'grayscale(100%)'
|
|
4665
|
+
}
|
|
4666
|
+
},
|
|
4667
|
+
running: {
|
|
4668
|
+
"true": {
|
|
4669
|
+
animation: pulse + " 2s ease-in-out infinite"
|
|
4670
|
+
}
|
|
4671
|
+
}
|
|
4672
|
+
}
|
|
4673
|
+
});
|
|
4674
|
+
var FeeContainer = /*#__PURE__*/styled('div', {
|
|
4675
|
+
paddingLeft: '$4'
|
|
4616
4676
|
});
|
|
4617
4677
|
var Fee = /*#__PURE__*/styled('div', {
|
|
4618
4678
|
display: 'flex',
|
|
4619
4679
|
alignItems: 'center'
|
|
4620
4680
|
});
|
|
4621
|
-
var SwapperLogo$1 = /*#__PURE__*/styled('img', {
|
|
4622
|
-
width: '$16',
|
|
4623
|
-
height: '$16'
|
|
4624
|
-
});
|
|
4625
4681
|
var RelativeContainer$1 = /*#__PURE__*/styled('div', {
|
|
4626
4682
|
position: 'relative'
|
|
4627
4683
|
});
|
|
@@ -4630,7 +4686,7 @@ var Dot$1 = /*#__PURE__*/styled('div', {
|
|
|
4630
4686
|
height: '$8',
|
|
4631
4687
|
backgroundColor: '$foreground',
|
|
4632
4688
|
borderRadius: '4px',
|
|
4633
|
-
marginLeft: '
|
|
4689
|
+
marginLeft: '11px'
|
|
4634
4690
|
});
|
|
4635
4691
|
var ArrowDown = /*#__PURE__*/styled('div', {
|
|
4636
4692
|
width: '0px',
|
|
@@ -4638,7 +4694,7 @@ var ArrowDown = /*#__PURE__*/styled('div', {
|
|
|
4638
4694
|
borderLeft: '5px solid transparent',
|
|
4639
4695
|
borderRight: '5px solid transparent',
|
|
4640
4696
|
borderTop: '5px solid $foreground',
|
|
4641
|
-
marginLeft: '$
|
|
4697
|
+
marginLeft: '$10'
|
|
4642
4698
|
});
|
|
4643
4699
|
var StyledAnchor = /*#__PURE__*/styled('a', {
|
|
4644
4700
|
color: '$primary',
|
|
@@ -4666,13 +4722,10 @@ var Description = /*#__PURE__*/styled(Typography, {
|
|
|
4666
4722
|
color: '$success',
|
|
4667
4723
|
marginLeft: '$8'
|
|
4668
4724
|
});
|
|
4669
|
-
var Error = /*#__PURE__*/styled(Description, {
|
|
4670
|
-
color: '$error'
|
|
4671
|
-
});
|
|
4672
4725
|
var Line$1 = /*#__PURE__*/styled('div', {
|
|
4673
4726
|
width: '0',
|
|
4674
4727
|
minHeight: '$16',
|
|
4675
|
-
marginLeft: '
|
|
4728
|
+
marginLeft: '14px',
|
|
4676
4729
|
border: '1px dashed $foreground',
|
|
4677
4730
|
borderRadius: 'inherit'
|
|
4678
4731
|
});
|
|
@@ -4715,22 +4768,9 @@ var ExtraDetails = /*#__PURE__*/styled('div', {
|
|
|
4715
4768
|
color: '$neutrals600',
|
|
4716
4769
|
fontSize: '$12'
|
|
4717
4770
|
});
|
|
4718
|
-
var StepContainer$1 = /*#__PURE__*/styled('div', {
|
|
4719
|
-
variants: {
|
|
4720
|
-
hasNotStarted: {
|
|
4721
|
-
"true": {
|
|
4722
|
-
filter: 'grayscale(100%)'
|
|
4723
|
-
}
|
|
4724
|
-
},
|
|
4725
|
-
isRunning: {
|
|
4726
|
-
"true": {
|
|
4727
|
-
animation: pulse + " 2s ease-in-out infinite"
|
|
4728
|
-
}
|
|
4729
|
-
}
|
|
4730
|
-
}
|
|
4731
|
-
});
|
|
4732
4771
|
var SwapFlowContainer = /*#__PURE__*/styled('div', {
|
|
4733
|
-
overflowY: 'auto'
|
|
4772
|
+
overflowY: 'auto',
|
|
4773
|
+
paddingTop: '$8'
|
|
4734
4774
|
});
|
|
4735
4775
|
function SwapHistory(props) {
|
|
4736
4776
|
var pendingSwap = props.pendingSwap,
|
|
@@ -4740,7 +4780,7 @@ function SwapHistory(props) {
|
|
|
4740
4780
|
onCancel = props.onCancel,
|
|
4741
4781
|
date = props.date,
|
|
4742
4782
|
onRetry = props.onRetry,
|
|
4743
|
-
extraMessageProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
4783
|
+
extraMessageProps = _objectWithoutPropertiesLoose(props, _excluded$J);
|
|
4744
4784
|
var _useState = React.useState(false),
|
|
4745
4785
|
showDrawer = _useState[0],
|
|
4746
4786
|
setShowDrawer = _useState[1];
|
|
@@ -4780,37 +4820,30 @@ function SwapHistory(props) {
|
|
|
4780
4820
|
}))), React__default.createElement(ExtraDetails, null, date))), React__default.createElement(SwapFlowContainer, null, extraMessageProps.shortMessage && React__default.createElement(SwapMessages, Object.assign({}, extraMessageProps)), React__default.createElement(Divider, {
|
|
4781
4821
|
size: 32
|
|
4782
4822
|
}), pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
|
|
4783
|
-
return React__default.createElement(
|
|
4784
|
-
key: index
|
|
4785
|
-
hasNotStarted: step.status === 'created',
|
|
4786
|
-
isRunning: step.status != 'failed' && step.status != 'success' && step.status != 'created'
|
|
4823
|
+
return React__default.createElement("div", {
|
|
4824
|
+
key: index
|
|
4787
4825
|
}, index === 0 && React__default.createElement(RelativeContainer$1, null, React__default.createElement(StepDetail, {
|
|
4788
4826
|
logo: step.fromLogo,
|
|
4789
4827
|
symbol: step.fromSymbol,
|
|
4790
|
-
// @ts-ignore
|
|
4791
4828
|
chainLogo: step.fromBlockchainLogo || '',
|
|
4792
4829
|
blockchain: step.fromBlockchain,
|
|
4793
4830
|
amount: pendingSwap.inputAmount
|
|
4794
|
-
}), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1,
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4831
|
+
}), React__default.createElement(Dot$1, null)), React__default.createElement(Line$1, null), React__default.createElement(SwapperContainer$1, {
|
|
4832
|
+
created: step.status === 'created',
|
|
4833
|
+
running: !['created', 'success', 'failed'].includes(step.status)
|
|
4834
|
+
}, React__default.createElement(Image, {
|
|
4835
|
+
src: step.swapperLogo || '',
|
|
4836
|
+
alt: step.swapperId,
|
|
4837
|
+
size: 20
|
|
4838
|
+
}), React__default.createElement(FeeContainer, null, React__default.createElement(Typography, {
|
|
4801
4839
|
variant: "caption"
|
|
4802
|
-
},
|
|
4803
|
-
// @ts-ignore
|
|
4804
|
-
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, {
|
|
4805
|
-
ml: 4,
|
|
4840
|
+
}, step.swapperType, " from ", step.fromSymbol, " to ", step.toSymbol, "\xA0 via ", step.swapperId), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
|
|
4806
4841
|
variant: "caption"
|
|
4807
|
-
}, "$",
|
|
4808
|
-
// @ts-ignore
|
|
4809
|
-
step.feeInUsd, ' ', "estimated gas fee")))), React__default.createElement("div", {
|
|
4842
|
+
}, "\xA0 $", step.feeInUsd, " estimated gas fee")))), React__default.createElement("div", {
|
|
4810
4843
|
style: {
|
|
4811
4844
|
display: 'flex'
|
|
4812
4845
|
}
|
|
4813
|
-
}, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
|
|
4846
|
+
}, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), React__default.createElement("div", null, !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
|
|
4814
4847
|
return React__default.createElement(InternalDetail, {
|
|
4815
4848
|
key: index
|
|
4816
4849
|
}, React__default.createElement(DescriptionContainer, null, React__default.createElement(CheckCircleIcon, {
|
|
@@ -4823,17 +4856,19 @@ function SwapHistory(props) {
|
|
|
4823
4856
|
rel: "noreferrer",
|
|
4824
4857
|
key: index
|
|
4825
4858
|
}, "TX-Link"));
|
|
4826
|
-
}), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
|
|
4859
|
+
})), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
|
|
4827
4860
|
color: "error"
|
|
4828
|
-
}), React__default.createElement(
|
|
4829
|
-
variant: "body2"
|
|
4861
|
+
}), React__default.createElement(Description, {
|
|
4862
|
+
variant: "body2",
|
|
4863
|
+
color: "$error500"
|
|
4830
4864
|
}, "Step failed")))))), index + 1 === pendingSwap.steps.length && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
|
|
4831
4865
|
logo: step.toLogo,
|
|
4832
4866
|
symbol: step.toSymbol,
|
|
4833
|
-
// @ts-ignore
|
|
4834
4867
|
chainLogo: step.toBlockchainLogo || '',
|
|
4835
4868
|
blockchain: step.toBlockchain,
|
|
4836
|
-
amount: step.outputAmount || ''
|
|
4869
|
+
amount: step.outputAmount || '',
|
|
4870
|
+
estimatedAmount: step.expectedOutputAmountHumanReadable || '',
|
|
4871
|
+
success: step.status === 'success'
|
|
4837
4872
|
}));
|
|
4838
4873
|
}), React__default.createElement(Divider, {
|
|
4839
4874
|
size: 32
|
|
@@ -4911,6 +4946,7 @@ exports.Header = Header;
|
|
|
4911
4946
|
exports.History = History;
|
|
4912
4947
|
exports.HistoryIcon = HistoryIcon;
|
|
4913
4948
|
exports.HorizontalSwapIcon = HorizontalSwapIcon;
|
|
4949
|
+
exports.Image = Image;
|
|
4914
4950
|
exports.InfoCircleIcon = InfoCircleIcon;
|
|
4915
4951
|
exports.LiquiditySourcesSelector = LiquiditySourcesSelector;
|
|
4916
4952
|
exports.LoadingFailedAlert = LoadingFailedAlert;
|