@rango-dev/ui 0.1.11-next.5 → 0.1.11-next.8
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/SwapDetail/Token.d.ts +1 -0
- package/dist/components/TextField/TextField.d.ts +1 -1
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/containers/ConfirmSwap/ConfirmSwap.d.ts +4 -2
- package/dist/ui.cjs.development.js +97 -72
- 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 +97 -72
- package/dist/ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Alert/Alert.tsx +1 -1
- package/src/components/BlockchainSelector/BlockchainSelector.tsx +1 -0
- package/src/components/Drawer/Drawer.tsx +1 -1
- package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +1 -0
- package/src/components/Settings/Settings.tsx +4 -3
- package/src/components/StepDetail/StepDetail.tsx +7 -4
- package/src/components/SwapContainer/SwapContainer.tsx +1 -2
- package/src/components/SwapDetail/SwapDetail.tsx +4 -14
- package/src/components/SwapDetail/Token.tsx +14 -8
- package/src/components/TextField/TextField.tsx +1 -0
- package/src/components/Typography/Typography.tsx +8 -0
- package/src/containers/ConfirmSwap/ConfirmSwap.tsx +9 -9
- package/src/containers/History/History.tsx +2 -6
- package/src/containers/SwapHistory/SwapHistory.tsx +60 -63
- package/src/containers/SwapHistory/SwapMessages.tsx +8 -8
|
@@ -7,4 +7,4 @@ export declare type PropTypes = {
|
|
|
7
7
|
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'size'> & {
|
|
8
8
|
ref?: ((instance: HTMLInputElement | null) => void) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
9
9
|
};
|
|
10
|
-
export declare const TextField: React.ForwardRefExoticComponent<Pick<React.PropsWithChildren<PropTypes>, "color" | "content" | "height" | "translate" | "width" | "label" | "prefix" | "size" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "pattern" | "placeholder" | "readOnly" | "required" | "src" | "step" | "type" | "value" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "
|
|
10
|
+
export declare const TextField: React.ForwardRefExoticComponent<Pick<React.PropsWithChildren<PropTypes>, "color" | "content" | "height" | "translate" | "width" | "hidden" | "label" | "prefix" | "size" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "pattern" | "placeholder" | "readOnly" | "required" | "src" | "step" | "type" | "value" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "suffix"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties } from '@stitches/react';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
export interface PropTypes {
|
|
4
|
-
variant: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body1' | 'body2' | 'body3' | 'caption';
|
|
4
|
+
variant: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'title' | 'body1' | 'body2' | 'body3' | 'caption';
|
|
5
5
|
align?: 'center' | 'left' | 'right';
|
|
6
6
|
noWrap?: boolean;
|
|
7
7
|
mt?: 2 | 4 | 8 | 12;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { SelectableWallet } from '../../types';
|
|
3
|
+
declare type Message = string | ReactNode;
|
|
3
4
|
export interface PropTypes {
|
|
4
5
|
onBack: () => void;
|
|
5
6
|
onConfirm?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
@@ -13,8 +14,9 @@ export interface PropTypes {
|
|
|
13
14
|
previewInputs?: ReactNode;
|
|
14
15
|
previewRoutes?: ReactNode;
|
|
15
16
|
confirmButtonTitle: string;
|
|
16
|
-
errors?:
|
|
17
|
-
warnings?:
|
|
17
|
+
errors?: Message[];
|
|
18
|
+
warnings?: Message[];
|
|
18
19
|
extraMessages?: ReactNode;
|
|
19
20
|
}
|
|
20
21
|
export declare function ConfirmSwap(props: PropsWithChildren<PropTypes>): JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -1492,6 +1492,13 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
|
|
|
1492
1492
|
fontSize: '$18'
|
|
1493
1493
|
}
|
|
1494
1494
|
},
|
|
1495
|
+
title: {
|
|
1496
|
+
fontSize: '$14',
|
|
1497
|
+
fontWeight: '$500',
|
|
1498
|
+
'@md': {
|
|
1499
|
+
fontSize: '$15'
|
|
1500
|
+
}
|
|
1501
|
+
},
|
|
1495
1502
|
body1: {
|
|
1496
1503
|
fontSize: '$14',
|
|
1497
1504
|
fontWeight: '$400',
|
|
@@ -1716,13 +1723,13 @@ function StepDetail(props) {
|
|
|
1716
1723
|
pl: direction === 'horizontal'
|
|
1717
1724
|
}, amount && React__default.createElement(Typography, {
|
|
1718
1725
|
noWrap: true,
|
|
1719
|
-
variant: direction === 'vertical' ? 'body2' : '
|
|
1726
|
+
variant: direction === 'vertical' ? 'body2' : 'title'
|
|
1720
1727
|
}, amount), !amount && estimatedAmount && React__default.createElement(Typography, {
|
|
1721
1728
|
noWrap: true,
|
|
1722
|
-
variant: direction === 'vertical' ? 'body2' : '
|
|
1723
|
-
color: '$
|
|
1729
|
+
variant: direction === 'vertical' ? 'body2' : 'title',
|
|
1730
|
+
color: '$neutrals600'
|
|
1724
1731
|
}, estimatedAmount), "\xA0", React__default.createElement(Typography, {
|
|
1725
|
-
variant: direction === 'vertical' ? 'body2' : '
|
|
1732
|
+
variant: direction === 'vertical' ? 'body2' : 'title',
|
|
1726
1733
|
noWrap: true
|
|
1727
1734
|
}, symbol), React__default.createElement(SubTitle, {
|
|
1728
1735
|
noWrap: true,
|
|
@@ -2651,6 +2658,7 @@ var InputContainer = /*#__PURE__*/styled('div', {
|
|
|
2651
2658
|
position: 'relative',
|
|
2652
2659
|
alignItems: 'center',
|
|
2653
2660
|
color: '$foreground',
|
|
2661
|
+
overflowX: 'hidden',
|
|
2654
2662
|
transition: 'border-color ease .3s',
|
|
2655
2663
|
'&:focus-within': {
|
|
2656
2664
|
borderColor: '$success',
|
|
@@ -3001,7 +3009,7 @@ function Alert(props) {
|
|
|
3001
3009
|
}
|
|
3002
3010
|
}, title && React__default.createElement(React__default.Fragment, null, React__default.createElement(Typography, {
|
|
3003
3011
|
className: "title",
|
|
3004
|
-
variant: "
|
|
3012
|
+
variant: "title",
|
|
3005
3013
|
color: type
|
|
3006
3014
|
}, title), !!children && React__default.createElement(Spacer, {
|
|
3007
3015
|
size: 8,
|
|
@@ -3232,7 +3240,8 @@ function TokenSelector(props) {
|
|
|
3232
3240
|
}
|
|
3233
3241
|
|
|
3234
3242
|
var ListContainer$1 = /*#__PURE__*/styled('div', {
|
|
3235
|
-
overflowY: 'auto'
|
|
3243
|
+
overflowY: 'auto',
|
|
3244
|
+
padding: '0 $4'
|
|
3236
3245
|
});
|
|
3237
3246
|
var filterBlockchains = function filterBlockchains(list, searchedFor) {
|
|
3238
3247
|
return list.filter(function (blockchain) {
|
|
@@ -3574,7 +3583,8 @@ var MainContainer$1 = /*#__PURE__*/styled('div', {
|
|
|
3574
3583
|
variants: {
|
|
3575
3584
|
loaded: {
|
|
3576
3585
|
"true": {
|
|
3577
|
-
overflowY: 'auto'
|
|
3586
|
+
overflowY: 'auto',
|
|
3587
|
+
padding: '0 $4'
|
|
3578
3588
|
}
|
|
3579
3589
|
}
|
|
3580
3590
|
}
|
|
@@ -3946,13 +3956,13 @@ var SlippageChipsContainer = /*#__PURE__*/styled('div', {
|
|
|
3946
3956
|
var LiquiditySourceContainer = /*#__PURE__*/styled(BaseContainer, {
|
|
3947
3957
|
display: 'flex',
|
|
3948
3958
|
justifyContent: 'space-between',
|
|
3949
|
-
marginTop: '$
|
|
3959
|
+
marginTop: '$16',
|
|
3950
3960
|
cursor: 'pointer'
|
|
3951
3961
|
});
|
|
3952
3962
|
var InfiniteContainer = /*#__PURE__*/styled(BaseContainer, {
|
|
3953
3963
|
display: 'flex',
|
|
3954
3964
|
justifyContent: 'space-between',
|
|
3955
|
-
marginTop: '$
|
|
3965
|
+
marginTop: '$16'
|
|
3956
3966
|
});
|
|
3957
3967
|
var StyledAngleRight = /*#__PURE__*/styled(AngleRightIcon, {
|
|
3958
3968
|
marginLeft: '$8'
|
|
@@ -3963,7 +3973,7 @@ var LiquiditySourceNumber = /*#__PURE__*/styled('div', {
|
|
|
3963
3973
|
justifyContent: 'center'
|
|
3964
3974
|
});
|
|
3965
3975
|
var ThemesContainer = /*#__PURE__*/styled(BaseContainer, {
|
|
3966
|
-
marginTop: '$
|
|
3976
|
+
marginTop: '$16'
|
|
3967
3977
|
});
|
|
3968
3978
|
var Head = /*#__PURE__*/styled('div', {
|
|
3969
3979
|
display: 'flex',
|
|
@@ -4085,14 +4095,14 @@ var MainContainer$2 = /*#__PURE__*/styled('div', {
|
|
|
4085
4095
|
width: '100%',
|
|
4086
4096
|
minWidth: '375px',
|
|
4087
4097
|
maxWidth: '512px',
|
|
4088
|
-
maxHeight: '595px',
|
|
4089
4098
|
padding: '$16',
|
|
4090
4099
|
boxSizing: 'border-box',
|
|
4091
4100
|
backgroundColor: '$background',
|
|
4092
4101
|
variants: {
|
|
4093
4102
|
fixedHeight: {
|
|
4094
4103
|
"true": {
|
|
4095
|
-
height: '595px'
|
|
4104
|
+
height: '595px',
|
|
4105
|
+
maxHeight: '595px'
|
|
4096
4106
|
},
|
|
4097
4107
|
"false": {
|
|
4098
4108
|
height: 'auto'
|
|
@@ -4118,6 +4128,9 @@ var TokenContainer = /*#__PURE__*/styled('div', {
|
|
|
4118
4128
|
width: '160px',
|
|
4119
4129
|
'& .amount': {
|
|
4120
4130
|
fontWeight: 'bold'
|
|
4131
|
+
},
|
|
4132
|
+
'& .estimated': {
|
|
4133
|
+
color: '$neutrals600'
|
|
4121
4134
|
}
|
|
4122
4135
|
});
|
|
4123
4136
|
var TokenImage = /*#__PURE__*/styled('div', {
|
|
@@ -4138,23 +4151,30 @@ var TokenImage = /*#__PURE__*/styled('div', {
|
|
|
4138
4151
|
}
|
|
4139
4152
|
});
|
|
4140
4153
|
function Token(props) {
|
|
4154
|
+
var _props$data = props.data,
|
|
4155
|
+
token = _props$data.token,
|
|
4156
|
+
blockchain = _props$data.blockchain,
|
|
4157
|
+
amount = _props$data.amount,
|
|
4158
|
+
estimatedAmount = _props$data.estimatedAmount;
|
|
4141
4159
|
return React__default.createElement(TokenContainer, null, React__default.createElement(TokenImage, null, React__default.createElement(Image, {
|
|
4142
|
-
src:
|
|
4160
|
+
src: token.logo,
|
|
4143
4161
|
alt: "",
|
|
4144
4162
|
size: 24
|
|
4145
4163
|
}), React__default.createElement("div", {
|
|
4146
4164
|
className: "overlay"
|
|
4147
4165
|
}, React__default.createElement(Image, {
|
|
4148
|
-
src:
|
|
4149
|
-
alt:
|
|
4166
|
+
src: blockchain.logo,
|
|
4167
|
+
alt: blockchain.name,
|
|
4150
4168
|
size: 12
|
|
4151
4169
|
}))), React__default.createElement(Spacer, {
|
|
4152
4170
|
size: 8
|
|
4153
|
-
}), React__default.createElement("span", {
|
|
4171
|
+
}), !!amount && React__default.createElement("span", {
|
|
4154
4172
|
className: "amount"
|
|
4155
|
-
}, props.data.amount), React__default.createElement(
|
|
4173
|
+
}, props.data.amount), !amount && estimatedAmount && React__default.createElement("span", {
|
|
4174
|
+
className: "amount estimated"
|
|
4175
|
+
}, props.data.estimatedAmount), React__default.createElement(Spacer, {
|
|
4156
4176
|
size: 4
|
|
4157
|
-
}),
|
|
4177
|
+
}), token.symbol);
|
|
4158
4178
|
}
|
|
4159
4179
|
|
|
4160
4180
|
var Container$3 = /*#__PURE__*/styled('div', {
|
|
@@ -4173,12 +4193,6 @@ var Container$3 = /*#__PURE__*/styled('div', {
|
|
|
4173
4193
|
fontWeight: 'bold',
|
|
4174
4194
|
fontSize: '$12'
|
|
4175
4195
|
},
|
|
4176
|
-
'&.running': {
|
|
4177
|
-
color: '$foreground'
|
|
4178
|
-
},
|
|
4179
|
-
'&.failed,&.success': {
|
|
4180
|
-
color: '$neutrals600'
|
|
4181
|
-
},
|
|
4182
4196
|
'&.failed .status': {
|
|
4183
4197
|
color: '$error'
|
|
4184
4198
|
},
|
|
@@ -4208,7 +4222,6 @@ function SwapDetail(_ref) {
|
|
|
4208
4222
|
symbol: firstStep.fromSymbol
|
|
4209
4223
|
},
|
|
4210
4224
|
blockchain: {
|
|
4211
|
-
// @ts-ignore
|
|
4212
4225
|
logo: firstStep.fromBlockchainLogo || '',
|
|
4213
4226
|
name: firstStep.fromBlockchain
|
|
4214
4227
|
},
|
|
@@ -4227,11 +4240,11 @@ function SwapDetail(_ref) {
|
|
|
4227
4240
|
symbol: lastStep.toSymbol
|
|
4228
4241
|
},
|
|
4229
4242
|
blockchain: {
|
|
4230
|
-
|
|
4231
|
-
logo: lastStep.toBlockchainLogo,
|
|
4243
|
+
logo: lastStep.toBlockchainLogo || '',
|
|
4232
4244
|
name: lastStep.toBlockchain
|
|
4233
4245
|
},
|
|
4234
|
-
amount: limitDecimalPlaces(lastStep.outputAmount ||
|
|
4246
|
+
amount: limitDecimalPlaces(lastStep.outputAmount || ''),
|
|
4247
|
+
estimatedAmount: limitDecimalPlaces(lastStep.expectedOutputAmountHumanReadable || '')
|
|
4235
4248
|
}
|
|
4236
4249
|
})), React__default.createElement("div", {
|
|
4237
4250
|
className: "status"
|
|
@@ -4405,7 +4418,7 @@ function Drawer(props) {
|
|
|
4405
4418
|
anchor: anchor,
|
|
4406
4419
|
style: containerStyle
|
|
4407
4420
|
}, React__default.createElement(DrawerHeader, null, React__default.createElement(Typography, {
|
|
4408
|
-
variant: "
|
|
4421
|
+
variant: "h6"
|
|
4409
4422
|
}, title), showClose && React__default.createElement(CloseIcon, {
|
|
4410
4423
|
size: 24,
|
|
4411
4424
|
onClick: onClose
|
|
@@ -4482,17 +4495,25 @@ function ConfirmSwap(props) {
|
|
|
4482
4495
|
}, 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) {
|
|
4483
4496
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4484
4497
|
direction: "vertical"
|
|
4485
|
-
}), React__default.createElement(Alert, {
|
|
4498
|
+
}), React__default.createElement(Alert, Object.assign({
|
|
4486
4499
|
type: "error",
|
|
4487
4500
|
key: index
|
|
4488
|
-
}, error
|
|
4501
|
+
}, typeof error === 'string' ? {
|
|
4502
|
+
title: error
|
|
4503
|
+
} : {
|
|
4504
|
+
children: error
|
|
4505
|
+
})));
|
|
4489
4506
|
}), warnings == null ? void 0 : warnings.map(function (warning, index) {
|
|
4490
4507
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4491
4508
|
direction: "vertical"
|
|
4492
|
-
}), React__default.createElement(Alert, {
|
|
4509
|
+
}), React__default.createElement(Alert, Object.assign({
|
|
4493
4510
|
type: "warning",
|
|
4494
4511
|
key: index
|
|
4495
|
-
}, warning
|
|
4512
|
+
}, typeof warning === 'string' ? {
|
|
4513
|
+
title: warning
|
|
4514
|
+
} : {
|
|
4515
|
+
children: warning
|
|
4516
|
+
})));
|
|
4496
4517
|
}))), props.previewInputs || props.previewRoutes ? React__default.createElement(Section, null, props.previewInputs, !!props.previewRoutes ? React__default.createElement(Spacer, {
|
|
4497
4518
|
size: 16,
|
|
4498
4519
|
direction: "vertical"
|
|
@@ -4512,7 +4533,7 @@ function ConfirmSwap(props) {
|
|
|
4512
4533
|
variant: "body2"
|
|
4513
4534
|
}, "Your ", wallet, " Wallet")), list.length === 0 && React__default.createElement(React__default.Fragment, null, React__default.createElement(AlertContainer, null, React__default.createElement(Alert, {
|
|
4514
4535
|
type: "error"
|
|
4515
|
-
}, "You need to connect a compatible wallet with ", wallet)), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
|
|
4536
|
+
}, "You need to connect a compatible wallet with ", wallet, ".")), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
|
|
4516
4537
|
variant: "contained",
|
|
4517
4538
|
type: "primary",
|
|
4518
4539
|
align: "grow",
|
|
@@ -4556,7 +4577,6 @@ var SwapsGroup = function SwapsGroup(props) {
|
|
|
4556
4577
|
key: index
|
|
4557
4578
|
}, React__default.createElement(Typography, {
|
|
4558
4579
|
variant: "body2",
|
|
4559
|
-
color: "neutrals600",
|
|
4560
4580
|
className: "group-title"
|
|
4561
4581
|
}, group.title), group.swaps.map(function (swap, index) {
|
|
4562
4582
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(SwapDetail, {
|
|
@@ -4581,7 +4601,7 @@ function History(_ref) {
|
|
|
4581
4601
|
return React__default.createElement(SecondaryPage, {
|
|
4582
4602
|
onBack: onBack,
|
|
4583
4603
|
textField: true,
|
|
4584
|
-
textFieldPlaceholder: "Search by
|
|
4604
|
+
textFieldPlaceholder: "Search by Network, Token or Request ID",
|
|
4585
4605
|
title: "Swaps"
|
|
4586
4606
|
}, function (searchedFor) {
|
|
4587
4607
|
var filterSwaps = filteredHistory(list, searchedFor);
|
|
@@ -4635,21 +4655,21 @@ var SwapMessages = function SwapMessages(props) {
|
|
|
4635
4655
|
onClick: props.switchNetwork
|
|
4636
4656
|
}, "Change network to ", currentStepBlockchain)
|
|
4637
4657
|
}), !!detailedMessage.content ? React__default.createElement(DetailedMessage, null, React__default.createElement(Typography, {
|
|
4638
|
-
variant: "
|
|
4658
|
+
variant: "body3"
|
|
4639
4659
|
}, 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, {
|
|
4640
|
-
variant: "
|
|
4660
|
+
variant: "body3"
|
|
4641
4661
|
}, "Don't worry, your fund is\xA0"), React__default.createElement(SuccessText, {
|
|
4642
|
-
variant: "
|
|
4662
|
+
variant: "body3"
|
|
4643
4663
|
}, React__default.createElement("b", null, "Safe"))), React__default.createElement("p", null, React__default.createElement(Typography, {
|
|
4644
|
-
variant: "
|
|
4664
|
+
variant: "body3"
|
|
4645
4665
|
}, "It is converted to \xA0", React__default.createElement("u", null, lastConvertedTokenInFailedSwap.outputAmount), "\xA0"), React__default.createElement(SuccessText, {
|
|
4646
|
-
variant: "
|
|
4666
|
+
variant: "body3"
|
|
4647
4667
|
}, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.symbol, "\xA0")), React__default.createElement(Typography, {
|
|
4648
|
-
variant: "
|
|
4668
|
+
variant: "body3"
|
|
4649
4669
|
}, "on your\xA0"), React__default.createElement(SuccessText, {
|
|
4650
|
-
variant: "
|
|
4670
|
+
variant: "body3"
|
|
4651
4671
|
}, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.blockchain, "\xA0")), React__default.createElement(Typography, {
|
|
4652
|
-
variant: "
|
|
4672
|
+
variant: "body3"
|
|
4653
4673
|
}, "wallet"))));
|
|
4654
4674
|
};
|
|
4655
4675
|
|
|
@@ -4672,7 +4692,7 @@ var SwapperContainer$1 = /*#__PURE__*/styled('div', {
|
|
|
4672
4692
|
}
|
|
4673
4693
|
});
|
|
4674
4694
|
var FeeContainer = /*#__PURE__*/styled('div', {
|
|
4675
|
-
paddingLeft: '$
|
|
4695
|
+
paddingLeft: '$16'
|
|
4676
4696
|
});
|
|
4677
4697
|
var Fee = /*#__PURE__*/styled('div', {
|
|
4678
4698
|
display: 'flex',
|
|
@@ -4698,8 +4718,7 @@ var ArrowDown = /*#__PURE__*/styled('div', {
|
|
|
4698
4718
|
});
|
|
4699
4719
|
var StyledAnchor = /*#__PURE__*/styled('a', {
|
|
4700
4720
|
color: '$primary',
|
|
4701
|
-
fontWeight: '$600'
|
|
4702
|
-
marginLeft: '$12'
|
|
4721
|
+
fontWeight: '$600'
|
|
4703
4722
|
});
|
|
4704
4723
|
var SwapInfoContainer = /*#__PURE__*/styled('div', {
|
|
4705
4724
|
display: 'flex',
|
|
@@ -4708,11 +4727,14 @@ var SwapInfoContainer = /*#__PURE__*/styled('div', {
|
|
|
4708
4727
|
borderBottom: '1px solid $neutrals300'
|
|
4709
4728
|
});
|
|
4710
4729
|
var InternalDetailsContainer = /*#__PURE__*/styled('div', {
|
|
4711
|
-
display: 'flex'
|
|
4730
|
+
display: 'flex',
|
|
4731
|
+
'.details': {
|
|
4732
|
+
padding: '$8 0'
|
|
4733
|
+
}
|
|
4712
4734
|
});
|
|
4713
4735
|
var InternalDetail = /*#__PURE__*/styled('div', {
|
|
4714
4736
|
display: 'flex',
|
|
4715
|
-
|
|
4737
|
+
margin: '$12 0 $12 $20'
|
|
4716
4738
|
});
|
|
4717
4739
|
var DescriptionContainer = /*#__PURE__*/styled('div', {
|
|
4718
4740
|
display: 'flex',
|
|
@@ -4720,7 +4742,7 @@ var DescriptionContainer = /*#__PURE__*/styled('div', {
|
|
|
4720
4742
|
});
|
|
4721
4743
|
var Description = /*#__PURE__*/styled(Typography, {
|
|
4722
4744
|
color: '$success',
|
|
4723
|
-
|
|
4745
|
+
paddingLeft: '$4'
|
|
4724
4746
|
});
|
|
4725
4747
|
var Line$1 = /*#__PURE__*/styled('div', {
|
|
4726
4748
|
width: '0',
|
|
@@ -4741,7 +4763,8 @@ var Row$2 = /*#__PURE__*/styled('div', {
|
|
|
4741
4763
|
'.value': {
|
|
4742
4764
|
display: 'flex',
|
|
4743
4765
|
alignItems: 'center',
|
|
4744
|
-
color: '$neutrals800'
|
|
4766
|
+
color: '$neutrals800',
|
|
4767
|
+
justifyContent: 'flex-end'
|
|
4745
4768
|
},
|
|
4746
4769
|
'.status': {
|
|
4747
4770
|
fontWeight: 'bold',
|
|
@@ -4755,7 +4778,6 @@ var Row$2 = /*#__PURE__*/styled('div', {
|
|
|
4755
4778
|
}
|
|
4756
4779
|
});
|
|
4757
4780
|
var RequestId = /*#__PURE__*/styled('div', {
|
|
4758
|
-
width: '150px',
|
|
4759
4781
|
whiteSpace: 'nowrap',
|
|
4760
4782
|
overflow: 'hidden',
|
|
4761
4783
|
textOverflow: 'ellipsis',
|
|
@@ -4764,13 +4786,13 @@ var RequestId = /*#__PURE__*/styled('div', {
|
|
|
4764
4786
|
}
|
|
4765
4787
|
});
|
|
4766
4788
|
var ExtraDetails = /*#__PURE__*/styled('div', {
|
|
4767
|
-
padding: '
|
|
4789
|
+
padding: '0',
|
|
4768
4790
|
color: '$neutrals600',
|
|
4769
|
-
fontSize: '$
|
|
4791
|
+
fontSize: '$10'
|
|
4770
4792
|
});
|
|
4771
4793
|
var SwapFlowContainer = /*#__PURE__*/styled('div', {
|
|
4772
4794
|
overflowY: 'auto',
|
|
4773
|
-
|
|
4795
|
+
padding: '$8 $4 $2 $4'
|
|
4774
4796
|
});
|
|
4775
4797
|
function SwapHistory(props) {
|
|
4776
4798
|
var pendingSwap = props.pendingSwap,
|
|
@@ -4801,7 +4823,7 @@ function SwapHistory(props) {
|
|
|
4801
4823
|
}, "Try again"))
|
|
4802
4824
|
}, React__default.createElement("div", null, React__default.createElement(SwapInfoContainer, null, React__default.createElement(Row$2, null, React__default.createElement("div", {
|
|
4803
4825
|
className: "name"
|
|
4804
|
-
}, "Request
|
|
4826
|
+
}, "Request Id:", React__default.createElement("span", {
|
|
4805
4827
|
className: "value requestId",
|
|
4806
4828
|
onClick: onCopy.bind(null, pendingSwap == null ? void 0 : pendingSwap.requestId)
|
|
4807
4829
|
}, React__default.createElement(RequestId, null, pendingSwap == null ? void 0 : pendingSwap.requestId), React__default.createElement(Spacer, {
|
|
@@ -4810,15 +4832,15 @@ function SwapHistory(props) {
|
|
|
4810
4832
|
type: "primary",
|
|
4811
4833
|
variant: "ghost",
|
|
4812
4834
|
size: "compact"
|
|
4813
|
-
}, isCopied ? 'Copied!' : 'Copy'))), React__default.createElement(
|
|
4835
|
+
}, isCopied ? 'Copied!' : 'Copy'))), React__default.createElement("div", {
|
|
4814
4836
|
className: "name"
|
|
4815
|
-
},
|
|
4837
|
+
}, React__default.createElement("span", {
|
|
4816
4838
|
className: "value status " + ((pendingSwap == null ? void 0 : pendingSwap.status) || '')
|
|
4817
4839
|
}, pendingSwap == null ? void 0 : pendingSwap.status, (pendingSwap == null ? void 0 : pendingSwap.status) === 'running' && React__default.createElement(Spinner, {
|
|
4818
4840
|
size: 16,
|
|
4819
4841
|
color: "primary"
|
|
4820
|
-
}))
|
|
4821
|
-
size:
|
|
4842
|
+
})), React__default.createElement(ExtraDetails, null, date))))), React__default.createElement(SwapFlowContainer, null, extraMessageProps.shortMessage && React__default.createElement(SwapMessages, Object.assign({}, extraMessageProps)), React__default.createElement(Divider, {
|
|
4843
|
+
size: 16
|
|
4822
4844
|
}), pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
|
|
4823
4845
|
return React__default.createElement("div", {
|
|
4824
4846
|
key: index
|
|
@@ -4837,29 +4859,33 @@ function SwapHistory(props) {
|
|
|
4837
4859
|
size: 20
|
|
4838
4860
|
}), React__default.createElement(FeeContainer, null, React__default.createElement(Typography, {
|
|
4839
4861
|
variant: "caption"
|
|
4840
|
-
}, step.swapperType
|
|
4862
|
+
}, step.swapperType === 'DEX' ? 'Swap' : 'Bridge', " via", ' ', step.swapperId), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
|
|
4841
4863
|
variant: "caption"
|
|
4842
4864
|
}, "\xA0 $", step.feeInUsd, " estimated gas fee")))), React__default.createElement("div", {
|
|
4843
4865
|
style: {
|
|
4844
4866
|
display: 'flex'
|
|
4845
4867
|
}
|
|
4846
|
-
}, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), React__default.createElement("div",
|
|
4868
|
+
}, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), React__default.createElement("div", {
|
|
4869
|
+
className: "details"
|
|
4870
|
+
}, !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
|
|
4847
4871
|
return React__default.createElement(InternalDetail, {
|
|
4848
4872
|
key: index
|
|
4849
|
-
}, React__default.createElement(DescriptionContainer, null, React__default.createElement(
|
|
4850
|
-
|
|
4873
|
+
}, React__default.createElement(DescriptionContainer, null, React__default.createElement(Divider, {
|
|
4874
|
+
size: 4
|
|
4875
|
+
}), React__default.createElement(CheckCircleIcon, {
|
|
4876
|
+
color: "primary"
|
|
4851
4877
|
}), React__default.createElement(Description, {
|
|
4852
|
-
variant: "
|
|
4853
|
-
},
|
|
4878
|
+
variant: "body3"
|
|
4879
|
+
}, React__default.createElement(StyledAnchor, {
|
|
4854
4880
|
href: item.url,
|
|
4855
4881
|
target: "_blank",
|
|
4856
4882
|
rel: "noreferrer",
|
|
4857
4883
|
key: index
|
|
4858
|
-
}, "
|
|
4884
|
+
}, !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")))));
|
|
4859
4885
|
})), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
|
|
4860
4886
|
color: "error"
|
|
4861
4887
|
}), React__default.createElement(Description, {
|
|
4862
|
-
variant: "
|
|
4888
|
+
variant: "body3",
|
|
4863
4889
|
color: "$error500"
|
|
4864
4890
|
}, "Step failed")))))), index + 1 === pendingSwap.steps.length && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
|
|
4865
4891
|
logo: step.toLogo,
|
|
@@ -4880,10 +4906,9 @@ function SwapHistory(props) {
|
|
|
4880
4906
|
title: "Cancel Progress",
|
|
4881
4907
|
content: React__default.createElement(Alert, {
|
|
4882
4908
|
type: "warning"
|
|
4883
|
-
}, React__default.createElement(
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
}), React__default.createElement("p", null, "If you have already signed your transaction to blockchain, you should wait for that to complete or rollback")),
|
|
4909
|
+
}, React__default.createElement(Typography, {
|
|
4910
|
+
variant: "body2"
|
|
4911
|
+
}, "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.")),
|
|
4887
4912
|
footer: React__default.createElement("div", {
|
|
4888
4913
|
style: {
|
|
4889
4914
|
display: 'flex',
|