@rango-dev/widget-embedded 0.14.1-next.19 → 0.14.1-next.20
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/ConfirmWalletsModal/ConfirmWalletsModal.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/WalletList.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.Placeholder.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
- package/dist/constants/errors.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
- package/dist/pages/Home.d.ts.map +1 -1
- package/dist/utils/swap.d.ts.map +1 -1
- package/dist/utils/time.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +4 -10
- package/src/components/ConfirmWalletsModal/WalletList.tsx +7 -17
- package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +1 -2
- package/src/components/SwapDetails/SwapDetails.tsx +2 -6
- package/src/constants/errors.ts +3 -2
- package/src/pages/ConfirmSwapPage.tsx +8 -17
- package/src/pages/Home.tsx +1 -2
- package/src/utils/swap.ts +5 -10
- package/src/utils/time.ts +2 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmSwapPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConfirmSwapPage.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAoB7C,OAAO,KAA8B,MAAM,OAAO,CAAC;AA6EnD,KAAK,SAAS,GAAG;IACf,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"ConfirmSwapPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConfirmSwapPage.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAoB7C,OAAO,KAA8B,MAAM,OAAO,CAAC;AA6EnD,KAAK,SAAS,GAAG;IACf,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,qBAoa/C"}
|
package/dist/pages/Home.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../../src/pages/Home.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA+E3D,wBAAgB,IAAI,
|
|
1
|
+
{"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../../src/pages/Home.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA+E3D,wBAAgB,IAAI,sBA0YnB"}
|
package/dist/utils/swap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swap.d.ts","sourceRoot":"","sources":["../../src/utils/swap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EAChB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,KAAK,EACN,MAAM,WAAW,CAAC;AAInB,OAAO,SAAS,MAAM,cAAc,CAAC;AAoBrC,wBAAgB,cAAc,CAC5B,aAAa,EAAE,SAAS,GAAG,IA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E,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAqDrD;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/utils/time.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAWzE,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAqDrD;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,WAAW,UAUnD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/widget-embedded",
|
|
3
|
-
"version": "0.14.1-next.
|
|
3
|
+
"version": "0.14.1-next.20",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@rango-dev/queue-manager-core": "^0.17.0",
|
|
24
24
|
"@rango-dev/queue-manager-rango-preset": "^0.17.1-next.3",
|
|
25
25
|
"@rango-dev/queue-manager-react": "^0.17.0",
|
|
26
|
-
"@rango-dev/ui": "^0.17.1-next.
|
|
26
|
+
"@rango-dev/ui": "^0.17.1-next.13",
|
|
27
27
|
"@rango-dev/wallets-react": "^0.3.1-next.2",
|
|
28
28
|
"@rango-dev/wallets-shared": "^0.17.1-next.1",
|
|
29
29
|
"bignumber.js": "^9.1.1",
|
|
@@ -290,8 +290,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
290
290
|
</NavigateBack>
|
|
291
291
|
<Typography variant="headline" size="small">
|
|
292
292
|
{i18n.t({
|
|
293
|
-
id: '
|
|
294
|
-
message: 'Your {blockchainName} wallets',
|
|
293
|
+
id: 'Your {blockchainName} wallets',
|
|
295
294
|
values: { blockchainName: showMoreWalletFor },
|
|
296
295
|
})}
|
|
297
296
|
</Typography>
|
|
@@ -364,8 +363,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
364
363
|
<Title>
|
|
365
364
|
<Typography variant="title" size="xmedium">
|
|
366
365
|
{i18n.t({
|
|
367
|
-
id: '
|
|
368
|
-
message: 'Your {blockchainName} wallets',
|
|
366
|
+
id: 'Your {blockchainName} wallets',
|
|
369
367
|
values: { blockchainName: blockchain?.displayName },
|
|
370
368
|
})}
|
|
371
369
|
</Typography>
|
|
@@ -374,9 +372,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
374
372
|
color="$neutral700"
|
|
375
373
|
size="medium">
|
|
376
374
|
{i18n.t({
|
|
377
|
-
id: '
|
|
378
|
-
message:
|
|
379
|
-
'You need to connect a {blockchainName} wallet.',
|
|
375
|
+
id: 'You need to connect a {blockchainName} wallet.',
|
|
380
376
|
values: { blockchainName: blockchain?.displayName },
|
|
381
377
|
})}
|
|
382
378
|
</Typography>
|
|
@@ -473,10 +469,8 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
473
469
|
variant="alarm"
|
|
474
470
|
type="error"
|
|
475
471
|
title={i18n.t({
|
|
476
|
-
id: 'addressMatch',
|
|
477
472
|
values: { destination },
|
|
478
|
-
|
|
479
|
-
"Address {destination} doesn't match the blockchain address pattern.",
|
|
473
|
+
id: "Address {destination} doesn't match the blockchain address pattern.",
|
|
480
474
|
})}
|
|
481
475
|
/>
|
|
482
476
|
</div>
|
|
@@ -149,8 +149,7 @@ export function WalletList(props: PropTypes) {
|
|
|
149
149
|
|
|
150
150
|
const connectedWalletDescription = couldAddExperimentalChain
|
|
151
151
|
? i18n.t({
|
|
152
|
-
id: '
|
|
153
|
-
message: 'Add {chain} chain',
|
|
152
|
+
id: 'Add {chain} chain',
|
|
154
153
|
values: { chain },
|
|
155
154
|
})
|
|
156
155
|
: conciseAddress;
|
|
@@ -199,15 +198,12 @@ export function WalletList(props: PropTypes) {
|
|
|
199
198
|
}}>
|
|
200
199
|
<MessageBox
|
|
201
200
|
title={i18n.t({
|
|
202
|
-
id: '
|
|
203
|
-
message: 'Add {blockchainDisplayName} Chain',
|
|
201
|
+
id: 'Add {blockchainDisplayName} Chain',
|
|
204
202
|
values: { blockchainDisplayName },
|
|
205
203
|
})}
|
|
206
204
|
type="warning"
|
|
207
205
|
description={i18n.t({
|
|
208
|
-
id: '
|
|
209
|
-
message:
|
|
210
|
-
'You should connect a {blockchainDisplayName} supported wallet or choose a different {blockchainDisplayName} address',
|
|
206
|
+
id: 'You should connect a {blockchainDisplayName} supported wallet or choose a different {blockchainDisplayName} address',
|
|
211
207
|
values: { blockchainDisplayName },
|
|
212
208
|
})}>
|
|
213
209
|
<Divider size={18} />
|
|
@@ -235,14 +231,11 @@ export function WalletList(props: PropTypes) {
|
|
|
235
231
|
<MessageBox
|
|
236
232
|
type="loading"
|
|
237
233
|
title={i18n.t({
|
|
238
|
-
id: '
|
|
239
|
-
message: 'Add {blockchainDisplayName} Chain',
|
|
234
|
+
id: 'Add {blockchainDisplayName} Chain',
|
|
240
235
|
values: { blockchainDisplayName },
|
|
241
236
|
})}
|
|
242
237
|
description={i18n.t({
|
|
243
|
-
id: '
|
|
244
|
-
message:
|
|
245
|
-
'You should connect a {blockchainDisplayName} supported wallet or choose a different {blockchainDisplayName} address',
|
|
238
|
+
id: 'You should connect a {blockchainDisplayName} supported wallet or choose a different {blockchainDisplayName} address',
|
|
246
239
|
values: { blockchainDisplayName },
|
|
247
240
|
})}
|
|
248
241
|
icon={
|
|
@@ -258,14 +251,11 @@ export function WalletList(props: PropTypes) {
|
|
|
258
251
|
<MessageBox
|
|
259
252
|
type="success"
|
|
260
253
|
title={i18n.t({
|
|
261
|
-
id: '
|
|
262
|
-
message: '{blockchainDisplayName} Chain Added',
|
|
254
|
+
id: '{blockchainDisplayName} Chain Added',
|
|
263
255
|
values: { blockchainDisplayName },
|
|
264
256
|
})}
|
|
265
257
|
description={i18n.t({
|
|
266
|
-
id: '
|
|
267
|
-
message:
|
|
268
|
-
'{blockchainDisplayName} is added to your wallet, you can use it to swap.',
|
|
258
|
+
id: '{blockchainDisplayName} is added to your wallet, you can use it to swap.',
|
|
269
259
|
values: { blockchainDisplayName },
|
|
270
260
|
})}
|
|
271
261
|
/>
|
|
@@ -67,9 +67,8 @@ export function SwapDetailsPlaceholder(props: SwapDetailsPlaceholderPropTypes) {
|
|
|
67
67
|
<NotFound
|
|
68
68
|
title={i18n.t('Not found')}
|
|
69
69
|
description={i18n.t({
|
|
70
|
-
id: '
|
|
70
|
+
id: 'Swap with request ID = {requestId} not found.',
|
|
71
71
|
values: { requestId },
|
|
72
|
-
message: 'Swap with request ID = {requestId} not found.',
|
|
73
72
|
})}
|
|
74
73
|
/>
|
|
75
74
|
</PlaceholderContainer>
|
|
@@ -206,9 +206,7 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
206
206
|
const completeModalDesc =
|
|
207
207
|
swap.status === 'success'
|
|
208
208
|
? i18n.t({
|
|
209
|
-
id: '
|
|
210
|
-
message:
|
|
211
|
-
'You have received {amount} {token} in {conciseAddress} wallet on {chain} chain.',
|
|
209
|
+
id: 'You have received {amount} {token} in {conciseAddress} wallet on {chain} chain.',
|
|
212
210
|
values: {
|
|
213
211
|
amount: numberToString(
|
|
214
212
|
outputAmount,
|
|
@@ -226,9 +224,7 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
226
224
|
: `${i18n.t('Transaction was not sent.')} ${
|
|
227
225
|
lastConvertedTokenInFailedSwap
|
|
228
226
|
? i18n.t({
|
|
229
|
-
id: '
|
|
230
|
-
message:
|
|
231
|
-
'{amount} {symbol} on {blockchain} remain in your wallet',
|
|
227
|
+
id: '{amount} {symbol} on {blockchain} remain in your wallet',
|
|
232
228
|
values: {
|
|
233
229
|
amount: lastConvertedTokenInFailedSwap.outputAmount,
|
|
234
230
|
symbol: lastConvertedTokenInFailedSwap.symbol,
|
package/src/constants/errors.ts
CHANGED
|
@@ -15,8 +15,9 @@ export const errorMessages = () => {
|
|
|
15
15
|
},
|
|
16
16
|
noRoutesError: {
|
|
17
17
|
title: i18n.t('No Routes Found'),
|
|
18
|
-
description:
|
|
19
|
-
"Reasons why Rango couldn't find a route: low liquidity on token, very low input amount or no routes available for the selected input/output token combination."
|
|
18
|
+
description: i18n.t(
|
|
19
|
+
"Reasons why Rango couldn't find a route: low liquidity on token, very low input amount or no routes available for the selected input/output token combination."
|
|
20
|
+
),
|
|
20
21
|
},
|
|
21
22
|
bridgeLimitErrors: {
|
|
22
23
|
increaseAmount: i18n.t('Bridge Limit Error: Please increase your amount'),
|
|
@@ -382,26 +382,17 @@ export function ConfirmSwapPage(props: PropTypes) {
|
|
|
382
382
|
description={
|
|
383
383
|
confirmSwapResult.warnings.slippage.type ===
|
|
384
384
|
SlippageWarningType.HIGH_SLIPPAGE
|
|
385
|
-
? i18n.t(
|
|
386
|
-
'
|
|
387
|
-
{ selectedSlippage },
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
)
|
|
393
|
-
: i18n.t(
|
|
394
|
-
'increaseSlippage',
|
|
395
|
-
|
|
396
|
-
{
|
|
385
|
+
? i18n.t({
|
|
386
|
+
id: ' Caution, your slippage is high (={selectedSlippage}). Your trade may be front run.',
|
|
387
|
+
values: { selectedSlippage },
|
|
388
|
+
})
|
|
389
|
+
: i18n.t({
|
|
390
|
+
id: 'We recommend you to increase slippage to at least {minRequiredSlippage} for this route.',
|
|
391
|
+
values: {
|
|
397
392
|
minRequiredSlippage:
|
|
398
393
|
confirmSwapResult.warnings.slippage.slippage,
|
|
399
394
|
},
|
|
400
|
-
|
|
401
|
-
message:
|
|
402
|
-
'We recommend you to increase slippage to at least {minRequiredSlippage} for this route.',
|
|
403
|
-
}
|
|
404
|
-
)
|
|
395
|
+
})
|
|
405
396
|
}>
|
|
406
397
|
<Divider size={18} />
|
|
407
398
|
<Divider size={32} />
|
package/src/pages/Home.tsx
CHANGED
|
@@ -255,8 +255,7 @@ export function Home() {
|
|
|
255
255
|
<Divider direction="horizontal" size={8} />
|
|
256
256
|
<Typography size="xsmall" variant="body" color="neutral700">
|
|
257
257
|
{i18n.t({
|
|
258
|
-
id: '
|
|
259
|
-
message: 'Yours: {amount} {symbol}',
|
|
258
|
+
id: 'Yours: {amount} {symbol}',
|
|
260
259
|
values: {
|
|
261
260
|
amount: numberToString(
|
|
262
261
|
swapHasError?.fromAmount || null,
|
package/src/utils/swap.ts
CHANGED
|
@@ -120,8 +120,7 @@ export function LimitErrorMessage(bestRoute: BestRouteResponse | null): {
|
|
|
120
120
|
let recommendation = '';
|
|
121
121
|
if (!isExclusive && !!minimum && minimum.gt(swap.fromAmount)) {
|
|
122
122
|
fromAmountRangeError = i18n.t({
|
|
123
|
-
id: '
|
|
124
|
-
message: 'Required: >= {min} {symbol}',
|
|
123
|
+
id: 'Required: >= {min} {symbol}',
|
|
125
124
|
values: {
|
|
126
125
|
min: numberToString(
|
|
127
126
|
minimum,
|
|
@@ -134,8 +133,7 @@ export function LimitErrorMessage(bestRoute: BestRouteResponse | null): {
|
|
|
134
133
|
recommendation = errorMessages().bridgeLimitErrors.increaseAmount;
|
|
135
134
|
} else if (isExclusive && !!minimum && minimum.gte(swap.fromAmount)) {
|
|
136
135
|
fromAmountRangeError = i18n.t({
|
|
137
|
-
id: '
|
|
138
|
-
message: 'Required: > {min} {symbol}',
|
|
136
|
+
id: 'Required: > {min} {symbol}',
|
|
139
137
|
values: {
|
|
140
138
|
min: numberToString(
|
|
141
139
|
minimum,
|
|
@@ -150,8 +148,7 @@ export function LimitErrorMessage(bestRoute: BestRouteResponse | null): {
|
|
|
150
148
|
|
|
151
149
|
if (!isExclusive && !!maximum && maximum.lt(swap.fromAmount)) {
|
|
152
150
|
fromAmountRangeError = i18n.t({
|
|
153
|
-
id: '
|
|
154
|
-
message: 'Required: <= {max} {symbol}',
|
|
151
|
+
id: 'Required: <= {max} {symbol}',
|
|
155
152
|
values: {
|
|
156
153
|
max: numberToString(
|
|
157
154
|
maximum,
|
|
@@ -164,8 +161,7 @@ export function LimitErrorMessage(bestRoute: BestRouteResponse | null): {
|
|
|
164
161
|
recommendation = errorMessages().bridgeLimitErrors.decreaseAmount;
|
|
165
162
|
} else if (isExclusive && !!maximum && maximum.lte(swap.fromAmount)) {
|
|
166
163
|
fromAmountRangeError = i18n.t({
|
|
167
|
-
id: '
|
|
168
|
-
message: 'Required: < {max} {symbol}',
|
|
164
|
+
id: 'Required: < {max} {symbol}',
|
|
169
165
|
values: {
|
|
170
166
|
max: numberToString(
|
|
171
167
|
maximum,
|
|
@@ -608,8 +604,7 @@ export function getBalanceWarnings(
|
|
|
608
604
|
reason = i18n.t(' for input and network fee');
|
|
609
605
|
}
|
|
610
606
|
const warningMessage = i18n.t({
|
|
611
|
-
id:
|
|
612
|
-
message: `Needs ≈ {requiredAmount} {symbol}{reason}, but you have {currentAmount} {symbol} in your {blockchain} wallet.`,
|
|
607
|
+
id: `Needs ≈ {requiredAmount} {symbol}{reason}, but you have {currentAmount} {symbol} in your {blockchain} wallet.`,
|
|
613
608
|
values: {
|
|
614
609
|
requiredAmount,
|
|
615
610
|
symbol,
|
package/src/utils/time.ts
CHANGED
|
@@ -67,13 +67,11 @@ export function timeSince(millisecond: number): string {
|
|
|
67
67
|
export function getSwapDate(pendingSwap: PendingSwap) {
|
|
68
68
|
return pendingSwap.finishTime
|
|
69
69
|
? i18n.t({
|
|
70
|
-
id: '
|
|
71
|
-
message: '{time} ago',
|
|
70
|
+
id: '{time} ago',
|
|
72
71
|
values: { time: timeSince(parseInt(pendingSwap.finishTime)) },
|
|
73
72
|
})
|
|
74
73
|
: i18n.t({
|
|
75
|
-
id: '
|
|
76
|
-
message: '{time} ago',
|
|
74
|
+
id: '{time} ago',
|
|
77
75
|
values: { time: timeSince(parseInt(pendingSwap.creationTime)) },
|
|
78
76
|
});
|
|
79
77
|
}
|