@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
package/dist/ui.esm.js
CHANGED
|
@@ -1485,6 +1485,13 @@ var TypographyContainer = /*#__PURE__*/styled('span', {
|
|
|
1485
1485
|
fontSize: '$18'
|
|
1486
1486
|
}
|
|
1487
1487
|
},
|
|
1488
|
+
title: {
|
|
1489
|
+
fontSize: '$14',
|
|
1490
|
+
fontWeight: '$500',
|
|
1491
|
+
'@md': {
|
|
1492
|
+
fontSize: '$15'
|
|
1493
|
+
}
|
|
1494
|
+
},
|
|
1488
1495
|
body1: {
|
|
1489
1496
|
fontSize: '$14',
|
|
1490
1497
|
fontWeight: '$400',
|
|
@@ -1709,13 +1716,13 @@ function StepDetail(props) {
|
|
|
1709
1716
|
pl: direction === 'horizontal'
|
|
1710
1717
|
}, amount && React__default.createElement(Typography, {
|
|
1711
1718
|
noWrap: true,
|
|
1712
|
-
variant: direction === 'vertical' ? 'body2' : '
|
|
1719
|
+
variant: direction === 'vertical' ? 'body2' : 'title'
|
|
1713
1720
|
}, amount), !amount && estimatedAmount && React__default.createElement(Typography, {
|
|
1714
1721
|
noWrap: true,
|
|
1715
|
-
variant: direction === 'vertical' ? 'body2' : '
|
|
1716
|
-
color: '$
|
|
1722
|
+
variant: direction === 'vertical' ? 'body2' : 'title',
|
|
1723
|
+
color: '$neutrals600'
|
|
1717
1724
|
}, estimatedAmount), "\xA0", React__default.createElement(Typography, {
|
|
1718
|
-
variant: direction === 'vertical' ? 'body2' : '
|
|
1725
|
+
variant: direction === 'vertical' ? 'body2' : 'title',
|
|
1719
1726
|
noWrap: true
|
|
1720
1727
|
}, symbol), React__default.createElement(SubTitle, {
|
|
1721
1728
|
noWrap: true,
|
|
@@ -2644,6 +2651,7 @@ var InputContainer = /*#__PURE__*/styled('div', {
|
|
|
2644
2651
|
position: 'relative',
|
|
2645
2652
|
alignItems: 'center',
|
|
2646
2653
|
color: '$foreground',
|
|
2654
|
+
overflowX: 'hidden',
|
|
2647
2655
|
transition: 'border-color ease .3s',
|
|
2648
2656
|
'&:focus-within': {
|
|
2649
2657
|
borderColor: '$success',
|
|
@@ -2994,7 +3002,7 @@ function Alert(props) {
|
|
|
2994
3002
|
}
|
|
2995
3003
|
}, title && React__default.createElement(React__default.Fragment, null, React__default.createElement(Typography, {
|
|
2996
3004
|
className: "title",
|
|
2997
|
-
variant: "
|
|
3005
|
+
variant: "title",
|
|
2998
3006
|
color: type
|
|
2999
3007
|
}, title), !!children && React__default.createElement(Spacer, {
|
|
3000
3008
|
size: 8,
|
|
@@ -3225,7 +3233,8 @@ function TokenSelector(props) {
|
|
|
3225
3233
|
}
|
|
3226
3234
|
|
|
3227
3235
|
var ListContainer$1 = /*#__PURE__*/styled('div', {
|
|
3228
|
-
overflowY: 'auto'
|
|
3236
|
+
overflowY: 'auto',
|
|
3237
|
+
padding: '0 $4'
|
|
3229
3238
|
});
|
|
3230
3239
|
var filterBlockchains = function filterBlockchains(list, searchedFor) {
|
|
3231
3240
|
return list.filter(function (blockchain) {
|
|
@@ -3568,7 +3577,8 @@ var MainContainer$1 = /*#__PURE__*/styled('div', {
|
|
|
3568
3577
|
variants: {
|
|
3569
3578
|
loaded: {
|
|
3570
3579
|
"true": {
|
|
3571
|
-
overflowY: 'auto'
|
|
3580
|
+
overflowY: 'auto',
|
|
3581
|
+
padding: '0 $4'
|
|
3572
3582
|
}
|
|
3573
3583
|
}
|
|
3574
3584
|
}
|
|
@@ -3940,13 +3950,13 @@ var SlippageChipsContainer = /*#__PURE__*/styled('div', {
|
|
|
3940
3950
|
var LiquiditySourceContainer = /*#__PURE__*/styled(BaseContainer, {
|
|
3941
3951
|
display: 'flex',
|
|
3942
3952
|
justifyContent: 'space-between',
|
|
3943
|
-
marginTop: '$
|
|
3953
|
+
marginTop: '$16',
|
|
3944
3954
|
cursor: 'pointer'
|
|
3945
3955
|
});
|
|
3946
3956
|
var InfiniteContainer = /*#__PURE__*/styled(BaseContainer, {
|
|
3947
3957
|
display: 'flex',
|
|
3948
3958
|
justifyContent: 'space-between',
|
|
3949
|
-
marginTop: '$
|
|
3959
|
+
marginTop: '$16'
|
|
3950
3960
|
});
|
|
3951
3961
|
var StyledAngleRight = /*#__PURE__*/styled(AngleRightIcon, {
|
|
3952
3962
|
marginLeft: '$8'
|
|
@@ -3957,7 +3967,7 @@ var LiquiditySourceNumber = /*#__PURE__*/styled('div', {
|
|
|
3957
3967
|
justifyContent: 'center'
|
|
3958
3968
|
});
|
|
3959
3969
|
var ThemesContainer = /*#__PURE__*/styled(BaseContainer, {
|
|
3960
|
-
marginTop: '$
|
|
3970
|
+
marginTop: '$16'
|
|
3961
3971
|
});
|
|
3962
3972
|
var Head = /*#__PURE__*/styled('div', {
|
|
3963
3973
|
display: 'flex',
|
|
@@ -4079,14 +4089,14 @@ var MainContainer$2 = /*#__PURE__*/styled('div', {
|
|
|
4079
4089
|
width: '100%',
|
|
4080
4090
|
minWidth: '375px',
|
|
4081
4091
|
maxWidth: '512px',
|
|
4082
|
-
maxHeight: '595px',
|
|
4083
4092
|
padding: '$16',
|
|
4084
4093
|
boxSizing: 'border-box',
|
|
4085
4094
|
backgroundColor: '$background',
|
|
4086
4095
|
variants: {
|
|
4087
4096
|
fixedHeight: {
|
|
4088
4097
|
"true": {
|
|
4089
|
-
height: '595px'
|
|
4098
|
+
height: '595px',
|
|
4099
|
+
maxHeight: '595px'
|
|
4090
4100
|
},
|
|
4091
4101
|
"false": {
|
|
4092
4102
|
height: 'auto'
|
|
@@ -4112,6 +4122,9 @@ var TokenContainer = /*#__PURE__*/styled('div', {
|
|
|
4112
4122
|
width: '160px',
|
|
4113
4123
|
'& .amount': {
|
|
4114
4124
|
fontWeight: 'bold'
|
|
4125
|
+
},
|
|
4126
|
+
'& .estimated': {
|
|
4127
|
+
color: '$neutrals600'
|
|
4115
4128
|
}
|
|
4116
4129
|
});
|
|
4117
4130
|
var TokenImage = /*#__PURE__*/styled('div', {
|
|
@@ -4132,23 +4145,30 @@ var TokenImage = /*#__PURE__*/styled('div', {
|
|
|
4132
4145
|
}
|
|
4133
4146
|
});
|
|
4134
4147
|
function Token(props) {
|
|
4148
|
+
var _props$data = props.data,
|
|
4149
|
+
token = _props$data.token,
|
|
4150
|
+
blockchain = _props$data.blockchain,
|
|
4151
|
+
amount = _props$data.amount,
|
|
4152
|
+
estimatedAmount = _props$data.estimatedAmount;
|
|
4135
4153
|
return React__default.createElement(TokenContainer, null, React__default.createElement(TokenImage, null, React__default.createElement(Image, {
|
|
4136
|
-
src:
|
|
4154
|
+
src: token.logo,
|
|
4137
4155
|
alt: "",
|
|
4138
4156
|
size: 24
|
|
4139
4157
|
}), React__default.createElement("div", {
|
|
4140
4158
|
className: "overlay"
|
|
4141
4159
|
}, React__default.createElement(Image, {
|
|
4142
|
-
src:
|
|
4143
|
-
alt:
|
|
4160
|
+
src: blockchain.logo,
|
|
4161
|
+
alt: blockchain.name,
|
|
4144
4162
|
size: 12
|
|
4145
4163
|
}))), React__default.createElement(Spacer, {
|
|
4146
4164
|
size: 8
|
|
4147
|
-
}), React__default.createElement("span", {
|
|
4165
|
+
}), !!amount && React__default.createElement("span", {
|
|
4148
4166
|
className: "amount"
|
|
4149
|
-
}, props.data.amount), React__default.createElement(
|
|
4167
|
+
}, props.data.amount), !amount && estimatedAmount && React__default.createElement("span", {
|
|
4168
|
+
className: "amount estimated"
|
|
4169
|
+
}, props.data.estimatedAmount), React__default.createElement(Spacer, {
|
|
4150
4170
|
size: 4
|
|
4151
|
-
}),
|
|
4171
|
+
}), token.symbol);
|
|
4152
4172
|
}
|
|
4153
4173
|
|
|
4154
4174
|
var Container$3 = /*#__PURE__*/styled('div', {
|
|
@@ -4167,12 +4187,6 @@ var Container$3 = /*#__PURE__*/styled('div', {
|
|
|
4167
4187
|
fontWeight: 'bold',
|
|
4168
4188
|
fontSize: '$12'
|
|
4169
4189
|
},
|
|
4170
|
-
'&.running': {
|
|
4171
|
-
color: '$foreground'
|
|
4172
|
-
},
|
|
4173
|
-
'&.failed,&.success': {
|
|
4174
|
-
color: '$neutrals600'
|
|
4175
|
-
},
|
|
4176
4190
|
'&.failed .status': {
|
|
4177
4191
|
color: '$error'
|
|
4178
4192
|
},
|
|
@@ -4202,7 +4216,6 @@ function SwapDetail(_ref) {
|
|
|
4202
4216
|
symbol: firstStep.fromSymbol
|
|
4203
4217
|
},
|
|
4204
4218
|
blockchain: {
|
|
4205
|
-
// @ts-ignore
|
|
4206
4219
|
logo: firstStep.fromBlockchainLogo || '',
|
|
4207
4220
|
name: firstStep.fromBlockchain
|
|
4208
4221
|
},
|
|
@@ -4221,11 +4234,11 @@ function SwapDetail(_ref) {
|
|
|
4221
4234
|
symbol: lastStep.toSymbol
|
|
4222
4235
|
},
|
|
4223
4236
|
blockchain: {
|
|
4224
|
-
|
|
4225
|
-
logo: lastStep.toBlockchainLogo,
|
|
4237
|
+
logo: lastStep.toBlockchainLogo || '',
|
|
4226
4238
|
name: lastStep.toBlockchain
|
|
4227
4239
|
},
|
|
4228
|
-
amount: limitDecimalPlaces(lastStep.outputAmount ||
|
|
4240
|
+
amount: limitDecimalPlaces(lastStep.outputAmount || ''),
|
|
4241
|
+
estimatedAmount: limitDecimalPlaces(lastStep.expectedOutputAmountHumanReadable || '')
|
|
4229
4242
|
}
|
|
4230
4243
|
})), React__default.createElement("div", {
|
|
4231
4244
|
className: "status"
|
|
@@ -4399,7 +4412,7 @@ function Drawer(props) {
|
|
|
4399
4412
|
anchor: anchor,
|
|
4400
4413
|
style: containerStyle
|
|
4401
4414
|
}, React__default.createElement(DrawerHeader, null, React__default.createElement(Typography, {
|
|
4402
|
-
variant: "
|
|
4415
|
+
variant: "h6"
|
|
4403
4416
|
}, title), showClose && React__default.createElement(CloseIcon, {
|
|
4404
4417
|
size: 24,
|
|
4405
4418
|
onClick: onClose
|
|
@@ -4476,17 +4489,25 @@ function ConfirmSwap(props) {
|
|
|
4476
4489
|
}, 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) {
|
|
4477
4490
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4478
4491
|
direction: "vertical"
|
|
4479
|
-
}), React__default.createElement(Alert, {
|
|
4492
|
+
}), React__default.createElement(Alert, Object.assign({
|
|
4480
4493
|
type: "error",
|
|
4481
4494
|
key: index
|
|
4482
|
-
}, error
|
|
4495
|
+
}, typeof error === 'string' ? {
|
|
4496
|
+
title: error
|
|
4497
|
+
} : {
|
|
4498
|
+
children: error
|
|
4499
|
+
})));
|
|
4483
4500
|
}), warnings == null ? void 0 : warnings.map(function (warning, index) {
|
|
4484
4501
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Spacer, {
|
|
4485
4502
|
direction: "vertical"
|
|
4486
|
-
}), React__default.createElement(Alert, {
|
|
4503
|
+
}), React__default.createElement(Alert, Object.assign({
|
|
4487
4504
|
type: "warning",
|
|
4488
4505
|
key: index
|
|
4489
|
-
}, warning
|
|
4506
|
+
}, typeof warning === 'string' ? {
|
|
4507
|
+
title: warning
|
|
4508
|
+
} : {
|
|
4509
|
+
children: warning
|
|
4510
|
+
})));
|
|
4490
4511
|
}))), props.previewInputs || props.previewRoutes ? React__default.createElement(Section, null, props.previewInputs, !!props.previewRoutes ? React__default.createElement(Spacer, {
|
|
4491
4512
|
size: 16,
|
|
4492
4513
|
direction: "vertical"
|
|
@@ -4506,7 +4527,7 @@ function ConfirmSwap(props) {
|
|
|
4506
4527
|
variant: "body2"
|
|
4507
4528
|
}, "Your ", wallet, " Wallet")), list.length === 0 && React__default.createElement(React__default.Fragment, null, React__default.createElement(AlertContainer, null, React__default.createElement(Alert, {
|
|
4508
4529
|
type: "error"
|
|
4509
|
-
}, "You need to connect a compatible wallet with ", wallet)), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
|
|
4530
|
+
}, "You need to connect a compatible wallet with ", wallet, ".")), (isExperimentalChain == null ? void 0 : isExperimentalChain(wallet)) && React__default.createElement(Button, {
|
|
4510
4531
|
variant: "contained",
|
|
4511
4532
|
type: "primary",
|
|
4512
4533
|
align: "grow",
|
|
@@ -4550,7 +4571,6 @@ var SwapsGroup = function SwapsGroup(props) {
|
|
|
4550
4571
|
key: index
|
|
4551
4572
|
}, React__default.createElement(Typography, {
|
|
4552
4573
|
variant: "body2",
|
|
4553
|
-
color: "neutrals600",
|
|
4554
4574
|
className: "group-title"
|
|
4555
4575
|
}, group.title), group.swaps.map(function (swap, index) {
|
|
4556
4576
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(SwapDetail, {
|
|
@@ -4575,7 +4595,7 @@ function History(_ref) {
|
|
|
4575
4595
|
return React__default.createElement(SecondaryPage, {
|
|
4576
4596
|
onBack: onBack,
|
|
4577
4597
|
textField: true,
|
|
4578
|
-
textFieldPlaceholder: "Search by
|
|
4598
|
+
textFieldPlaceholder: "Search by Network, Token or Request ID",
|
|
4579
4599
|
title: "Swaps"
|
|
4580
4600
|
}, function (searchedFor) {
|
|
4581
4601
|
var filterSwaps = filteredHistory(list, searchedFor);
|
|
@@ -4629,21 +4649,21 @@ var SwapMessages = function SwapMessages(props) {
|
|
|
4629
4649
|
onClick: props.switchNetwork
|
|
4630
4650
|
}, "Change network to ", currentStepBlockchain)
|
|
4631
4651
|
}), !!detailedMessage.content ? React__default.createElement(DetailedMessage, null, React__default.createElement(Typography, {
|
|
4632
|
-
variant: "
|
|
4652
|
+
variant: "body3"
|
|
4633
4653
|
}, 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, {
|
|
4634
|
-
variant: "
|
|
4654
|
+
variant: "body3"
|
|
4635
4655
|
}, "Don't worry, your fund is\xA0"), React__default.createElement(SuccessText, {
|
|
4636
|
-
variant: "
|
|
4656
|
+
variant: "body3"
|
|
4637
4657
|
}, React__default.createElement("b", null, "Safe"))), React__default.createElement("p", null, React__default.createElement(Typography, {
|
|
4638
|
-
variant: "
|
|
4658
|
+
variant: "body3"
|
|
4639
4659
|
}, "It is converted to \xA0", React__default.createElement("u", null, lastConvertedTokenInFailedSwap.outputAmount), "\xA0"), React__default.createElement(SuccessText, {
|
|
4640
|
-
variant: "
|
|
4660
|
+
variant: "body3"
|
|
4641
4661
|
}, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.symbol, "\xA0")), React__default.createElement(Typography, {
|
|
4642
|
-
variant: "
|
|
4662
|
+
variant: "body3"
|
|
4643
4663
|
}, "on your\xA0"), React__default.createElement(SuccessText, {
|
|
4644
|
-
variant: "
|
|
4664
|
+
variant: "body3"
|
|
4645
4665
|
}, React__default.createElement("b", null, lastConvertedTokenInFailedSwap.blockchain, "\xA0")), React__default.createElement(Typography, {
|
|
4646
|
-
variant: "
|
|
4666
|
+
variant: "body3"
|
|
4647
4667
|
}, "wallet"))));
|
|
4648
4668
|
};
|
|
4649
4669
|
|
|
@@ -4666,7 +4686,7 @@ var SwapperContainer$1 = /*#__PURE__*/styled('div', {
|
|
|
4666
4686
|
}
|
|
4667
4687
|
});
|
|
4668
4688
|
var FeeContainer = /*#__PURE__*/styled('div', {
|
|
4669
|
-
paddingLeft: '$
|
|
4689
|
+
paddingLeft: '$16'
|
|
4670
4690
|
});
|
|
4671
4691
|
var Fee = /*#__PURE__*/styled('div', {
|
|
4672
4692
|
display: 'flex',
|
|
@@ -4692,8 +4712,7 @@ var ArrowDown = /*#__PURE__*/styled('div', {
|
|
|
4692
4712
|
});
|
|
4693
4713
|
var StyledAnchor = /*#__PURE__*/styled('a', {
|
|
4694
4714
|
color: '$primary',
|
|
4695
|
-
fontWeight: '$600'
|
|
4696
|
-
marginLeft: '$12'
|
|
4715
|
+
fontWeight: '$600'
|
|
4697
4716
|
});
|
|
4698
4717
|
var SwapInfoContainer = /*#__PURE__*/styled('div', {
|
|
4699
4718
|
display: 'flex',
|
|
@@ -4702,11 +4721,14 @@ var SwapInfoContainer = /*#__PURE__*/styled('div', {
|
|
|
4702
4721
|
borderBottom: '1px solid $neutrals300'
|
|
4703
4722
|
});
|
|
4704
4723
|
var InternalDetailsContainer = /*#__PURE__*/styled('div', {
|
|
4705
|
-
display: 'flex'
|
|
4724
|
+
display: 'flex',
|
|
4725
|
+
'.details': {
|
|
4726
|
+
padding: '$8 0'
|
|
4727
|
+
}
|
|
4706
4728
|
});
|
|
4707
4729
|
var InternalDetail = /*#__PURE__*/styled('div', {
|
|
4708
4730
|
display: 'flex',
|
|
4709
|
-
|
|
4731
|
+
margin: '$12 0 $12 $20'
|
|
4710
4732
|
});
|
|
4711
4733
|
var DescriptionContainer = /*#__PURE__*/styled('div', {
|
|
4712
4734
|
display: 'flex',
|
|
@@ -4714,7 +4736,7 @@ var DescriptionContainer = /*#__PURE__*/styled('div', {
|
|
|
4714
4736
|
});
|
|
4715
4737
|
var Description = /*#__PURE__*/styled(Typography, {
|
|
4716
4738
|
color: '$success',
|
|
4717
|
-
|
|
4739
|
+
paddingLeft: '$4'
|
|
4718
4740
|
});
|
|
4719
4741
|
var Line$1 = /*#__PURE__*/styled('div', {
|
|
4720
4742
|
width: '0',
|
|
@@ -4735,7 +4757,8 @@ var Row$2 = /*#__PURE__*/styled('div', {
|
|
|
4735
4757
|
'.value': {
|
|
4736
4758
|
display: 'flex',
|
|
4737
4759
|
alignItems: 'center',
|
|
4738
|
-
color: '$neutrals800'
|
|
4760
|
+
color: '$neutrals800',
|
|
4761
|
+
justifyContent: 'flex-end'
|
|
4739
4762
|
},
|
|
4740
4763
|
'.status': {
|
|
4741
4764
|
fontWeight: 'bold',
|
|
@@ -4749,7 +4772,6 @@ var Row$2 = /*#__PURE__*/styled('div', {
|
|
|
4749
4772
|
}
|
|
4750
4773
|
});
|
|
4751
4774
|
var RequestId = /*#__PURE__*/styled('div', {
|
|
4752
|
-
width: '150px',
|
|
4753
4775
|
whiteSpace: 'nowrap',
|
|
4754
4776
|
overflow: 'hidden',
|
|
4755
4777
|
textOverflow: 'ellipsis',
|
|
@@ -4758,13 +4780,13 @@ var RequestId = /*#__PURE__*/styled('div', {
|
|
|
4758
4780
|
}
|
|
4759
4781
|
});
|
|
4760
4782
|
var ExtraDetails = /*#__PURE__*/styled('div', {
|
|
4761
|
-
padding: '
|
|
4783
|
+
padding: '0',
|
|
4762
4784
|
color: '$neutrals600',
|
|
4763
|
-
fontSize: '$
|
|
4785
|
+
fontSize: '$10'
|
|
4764
4786
|
});
|
|
4765
4787
|
var SwapFlowContainer = /*#__PURE__*/styled('div', {
|
|
4766
4788
|
overflowY: 'auto',
|
|
4767
|
-
|
|
4789
|
+
padding: '$8 $4 $2 $4'
|
|
4768
4790
|
});
|
|
4769
4791
|
function SwapHistory(props) {
|
|
4770
4792
|
var pendingSwap = props.pendingSwap,
|
|
@@ -4795,7 +4817,7 @@ function SwapHistory(props) {
|
|
|
4795
4817
|
}, "Try again"))
|
|
4796
4818
|
}, React__default.createElement("div", null, React__default.createElement(SwapInfoContainer, null, React__default.createElement(Row$2, null, React__default.createElement("div", {
|
|
4797
4819
|
className: "name"
|
|
4798
|
-
}, "Request
|
|
4820
|
+
}, "Request Id:", React__default.createElement("span", {
|
|
4799
4821
|
className: "value requestId",
|
|
4800
4822
|
onClick: onCopy.bind(null, pendingSwap == null ? void 0 : pendingSwap.requestId)
|
|
4801
4823
|
}, React__default.createElement(RequestId, null, pendingSwap == null ? void 0 : pendingSwap.requestId), React__default.createElement(Spacer, {
|
|
@@ -4804,15 +4826,15 @@ function SwapHistory(props) {
|
|
|
4804
4826
|
type: "primary",
|
|
4805
4827
|
variant: "ghost",
|
|
4806
4828
|
size: "compact"
|
|
4807
|
-
}, isCopied ? 'Copied!' : 'Copy'))), React__default.createElement(
|
|
4829
|
+
}, isCopied ? 'Copied!' : 'Copy'))), React__default.createElement("div", {
|
|
4808
4830
|
className: "name"
|
|
4809
|
-
},
|
|
4831
|
+
}, React__default.createElement("span", {
|
|
4810
4832
|
className: "value status " + ((pendingSwap == null ? void 0 : pendingSwap.status) || '')
|
|
4811
4833
|
}, pendingSwap == null ? void 0 : pendingSwap.status, (pendingSwap == null ? void 0 : pendingSwap.status) === 'running' && React__default.createElement(Spinner, {
|
|
4812
4834
|
size: 16,
|
|
4813
4835
|
color: "primary"
|
|
4814
|
-
}))
|
|
4815
|
-
size:
|
|
4836
|
+
})), React__default.createElement(ExtraDetails, null, date))))), React__default.createElement(SwapFlowContainer, null, extraMessageProps.shortMessage && React__default.createElement(SwapMessages, Object.assign({}, extraMessageProps)), React__default.createElement(Divider, {
|
|
4837
|
+
size: 16
|
|
4816
4838
|
}), pendingSwap == null ? void 0 : pendingSwap.steps.map(function (step, index) {
|
|
4817
4839
|
return React__default.createElement("div", {
|
|
4818
4840
|
key: index
|
|
@@ -4831,29 +4853,33 @@ function SwapHistory(props) {
|
|
|
4831
4853
|
size: 20
|
|
4832
4854
|
}), React__default.createElement(FeeContainer, null, React__default.createElement(Typography, {
|
|
4833
4855
|
variant: "caption"
|
|
4834
|
-
}, step.swapperType
|
|
4856
|
+
}, step.swapperType === 'DEX' ? 'Swap' : 'Bridge', " via", ' ', step.swapperId), React__default.createElement(Fee, null, React__default.createElement(GasIcon, null), React__default.createElement(Typography, {
|
|
4835
4857
|
variant: "caption"
|
|
4836
4858
|
}, "\xA0 $", step.feeInUsd, " estimated gas fee")))), React__default.createElement("div", {
|
|
4837
4859
|
style: {
|
|
4838
4860
|
display: 'flex'
|
|
4839
4861
|
}
|
|
4840
|
-
}, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), React__default.createElement("div",
|
|
4862
|
+
}, React__default.createElement(InternalDetailsContainer, null, React__default.createElement(Line$1, null), React__default.createElement("div", {
|
|
4863
|
+
className: "details"
|
|
4864
|
+
}, !!step.explorerUrl && React__default.createElement("div", null, step.explorerUrl.map(function (item, index) {
|
|
4841
4865
|
return React__default.createElement(InternalDetail, {
|
|
4842
4866
|
key: index
|
|
4843
|
-
}, React__default.createElement(DescriptionContainer, null, React__default.createElement(
|
|
4844
|
-
|
|
4867
|
+
}, React__default.createElement(DescriptionContainer, null, React__default.createElement(Divider, {
|
|
4868
|
+
size: 4
|
|
4869
|
+
}), React__default.createElement(CheckCircleIcon, {
|
|
4870
|
+
color: "primary"
|
|
4845
4871
|
}), React__default.createElement(Description, {
|
|
4846
|
-
variant: "
|
|
4847
|
-
},
|
|
4872
|
+
variant: "body3"
|
|
4873
|
+
}, React__default.createElement(StyledAnchor, {
|
|
4848
4874
|
href: item.url,
|
|
4849
4875
|
target: "_blank",
|
|
4850
4876
|
rel: "noreferrer",
|
|
4851
4877
|
key: index
|
|
4852
|
-
}, "
|
|
4878
|
+
}, !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")))));
|
|
4853
4879
|
})), step.status === 'failed' && React__default.createElement(InternalDetail, null, React__default.createElement(DescriptionContainer, null, React__default.createElement(InfoCircleIcon, {
|
|
4854
4880
|
color: "error"
|
|
4855
4881
|
}), React__default.createElement(Description, {
|
|
4856
|
-
variant: "
|
|
4882
|
+
variant: "body3",
|
|
4857
4883
|
color: "$error500"
|
|
4858
4884
|
}, "Step failed")))))), index + 1 === pendingSwap.steps.length && React__default.createElement(ArrowDown, null), React__default.createElement(StepDetail, {
|
|
4859
4885
|
logo: step.toLogo,
|
|
@@ -4874,10 +4900,9 @@ function SwapHistory(props) {
|
|
|
4874
4900
|
title: "Cancel Progress",
|
|
4875
4901
|
content: React__default.createElement(Alert, {
|
|
4876
4902
|
type: "warning"
|
|
4877
|
-
}, React__default.createElement(
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
}), React__default.createElement("p", null, "If you have already signed your transaction to blockchain, you should wait for that to complete or rollback")),
|
|
4903
|
+
}, React__default.createElement(Typography, {
|
|
4904
|
+
variant: "body2"
|
|
4905
|
+
}, "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.")),
|
|
4881
4906
|
footer: React__default.createElement("div", {
|
|
4882
4907
|
style: {
|
|
4883
4908
|
display: 'flex',
|