@rhinestone/deposit-modal 0.1.64 → 0.1.65
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/{DepositModalReown-3KQE4YU6.cjs → DepositModalReown-6ZMLUWWD.cjs} +3 -3
- package/dist/{DepositModalReown-XOLZ62BQ.mjs → DepositModalReown-Y4M3RA73.mjs} +2 -2
- package/dist/{WithdrawModalReown-TD2NYW5M.mjs → WithdrawModalReown-HVBMAUPM.mjs} +2 -2
- package/dist/{WithdrawModalReown-YBEUOYSV.cjs → WithdrawModalReown-WJ5SHBV4.cjs} +3 -3
- package/dist/{chunk-5SR5N75I.cjs → chunk-4CZ7W3RS.cjs} +75 -73
- package/dist/{chunk-TDTBAZNO.mjs → chunk-GAHX5RAT.mjs} +2 -0
- package/dist/{chunk-XVCPUB6K.mjs → chunk-IYZGLNY6.mjs} +4 -2
- package/dist/{chunk-P4ULLROO.cjs → chunk-MGV75YLV.cjs} +38 -37
- package/dist/{chunk-N3BZTUSJ.cjs → chunk-OWV4KVBM.cjs} +88 -86
- package/dist/{chunk-MYI5WSWL.mjs → chunk-RKRF7ANK.mjs} +3 -2
- package/dist/deposit.cjs +3 -3
- package/dist/deposit.mjs +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +3 -3
- package/dist/reown.cjs +4 -4
- package/dist/reown.mjs +3 -3
- package/dist/withdraw.cjs +3 -3
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkOWV4KVBMcjs = require('./chunk-OWV4KVBM.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkN2Y34LQOcjs = require('./chunk-N2Y34LQO.cjs');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-4CZ7W3RS.cjs');
|
|
9
9
|
require('./chunk-R6U6BHCV.cjs');
|
|
10
10
|
|
|
11
11
|
// src/DepositModalReown.tsx
|
|
@@ -32,7 +32,7 @@ function DepositModalWithReown(props) {
|
|
|
32
32
|
reown.disconnect();
|
|
33
33
|
}, [reown.disconnect]);
|
|
34
34
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
35
|
-
|
|
35
|
+
_chunkOWV4KVBMcjs.DepositModalInner,
|
|
36
36
|
{
|
|
37
37
|
...props,
|
|
38
38
|
reownWallet: reownWithSolana,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IYZGLNY6.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ReownWalletProvider,
|
|
6
6
|
useReownWallet
|
|
7
7
|
} from "./chunk-MBURQ26S.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-GAHX5RAT.mjs";
|
|
9
9
|
import "./chunk-CIXHTOO3.mjs";
|
|
10
10
|
|
|
11
11
|
// src/DepositModalReown.tsx
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RKRF7ANK.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ReownWalletProvider,
|
|
6
6
|
useReownWallet
|
|
7
7
|
} from "./chunk-MBURQ26S.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-GAHX5RAT.mjs";
|
|
9
9
|
import "./chunk-CIXHTOO3.mjs";
|
|
10
10
|
|
|
11
11
|
// src/WithdrawModalReown.tsx
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkMGV75YLVcjs = require('./chunk-MGV75YLV.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkN2Y34LQOcjs = require('./chunk-N2Y34LQO.cjs');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-4CZ7W3RS.cjs');
|
|
9
9
|
require('./chunk-R6U6BHCV.cjs');
|
|
10
10
|
|
|
11
11
|
// src/WithdrawModalReown.tsx
|
|
@@ -20,7 +20,7 @@ function WithdrawModalWithReown(props) {
|
|
|
20
20
|
reown.disconnect();
|
|
21
21
|
}, [reown.disconnect]);
|
|
22
22
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
23
|
-
|
|
23
|
+
_chunkMGV75YLVcjs.WithdrawModalInner,
|
|
24
24
|
{
|
|
25
25
|
...props,
|
|
26
26
|
reownWallet: reown,
|
|
@@ -304,6 +304,8 @@ function createDepositService(baseUrl, options) {
|
|
|
304
304
|
ownerAddress: params.ownerAddress,
|
|
305
305
|
targetChain: params.targetChain,
|
|
306
306
|
targetToken: params.targetToken,
|
|
307
|
+
recipient: params.recipient ? shortRef(params.recipient) : void 0,
|
|
308
|
+
postBridgeActionCount: _nullishCoalesce(_optionalChain([params, 'access', _4 => _4.postBridgeActions, 'optionalAccess', _5 => _5.length]), () => ( 0)),
|
|
307
309
|
forceRegister: params.forceRegister
|
|
308
310
|
});
|
|
309
311
|
const response = await fetch(url, {
|
|
@@ -372,8 +374,8 @@ function createDepositService(baseUrl, options) {
|
|
|
372
374
|
const result = await response.json();
|
|
373
375
|
debugLog(debug, scope, "registerAccount:success", {
|
|
374
376
|
address: params.address,
|
|
375
|
-
evmDepositAddress: _optionalChain([result, 'optionalAccess',
|
|
376
|
-
hasSolanaDepositAddress: Boolean(_optionalChain([result, 'optionalAccess',
|
|
377
|
+
evmDepositAddress: _optionalChain([result, 'optionalAccess', _6 => _6.evmDepositAddress]),
|
|
378
|
+
hasSolanaDepositAddress: Boolean(_optionalChain([result, 'optionalAccess', _7 => _7.solanaDepositAddress]))
|
|
377
379
|
});
|
|
378
380
|
return result;
|
|
379
381
|
},
|
|
@@ -471,9 +473,9 @@ function createDepositService(baseUrl, options) {
|
|
|
471
473
|
}
|
|
472
474
|
const data = await response.json();
|
|
473
475
|
const result = {
|
|
474
|
-
isRegistered: _optionalChain([data, 'optionalAccess',
|
|
475
|
-
targetChain: _optionalChain([data, 'optionalAccess',
|
|
476
|
-
targetToken: _optionalChain([data, 'optionalAccess',
|
|
476
|
+
isRegistered: _optionalChain([data, 'optionalAccess', _8 => _8.isRegistered]) === true,
|
|
477
|
+
targetChain: _optionalChain([data, 'optionalAccess', _9 => _9.targetChain]),
|
|
478
|
+
targetToken: _optionalChain([data, 'optionalAccess', _10 => _10.targetToken])
|
|
477
479
|
};
|
|
478
480
|
debugLog(debug, scope, "checkAccount:success", {
|
|
479
481
|
address,
|
|
@@ -507,7 +509,7 @@ function createDepositService(baseUrl, options) {
|
|
|
507
509
|
debugLog(debug, scope, "fetchStatus:success", {
|
|
508
510
|
address,
|
|
509
511
|
txHash: shortRef(normalized),
|
|
510
|
-
eventType: _optionalChain([result, 'optionalAccess',
|
|
512
|
+
eventType: _optionalChain([result, 'optionalAccess', _11 => _11.lastEvent, 'optionalAccess', _12 => _12.type])
|
|
511
513
|
});
|
|
512
514
|
return result;
|
|
513
515
|
},
|
|
@@ -528,7 +530,7 @@ function createDepositService(baseUrl, options) {
|
|
|
528
530
|
const result = await response.json();
|
|
529
531
|
debugLog(debug, scope, "fetchLatestStatus:success", {
|
|
530
532
|
address,
|
|
531
|
-
eventType: _optionalChain([result, 'optionalAccess',
|
|
533
|
+
eventType: _optionalChain([result, 'optionalAccess', _13 => _13.lastEvent, 'optionalAccess', _14 => _14.type])
|
|
532
534
|
});
|
|
533
535
|
return result;
|
|
534
536
|
},
|
|
@@ -590,7 +592,7 @@ function createDepositService(baseUrl, options) {
|
|
|
590
592
|
smartAccount,
|
|
591
593
|
chainId,
|
|
592
594
|
safeAddress,
|
|
593
|
-
txHash: _optionalChain([result, 'optionalAccess',
|
|
595
|
+
txHash: _optionalChain([result, 'optionalAccess', _15 => _15.txHash]) ? shortRef(result.txHash) : void 0
|
|
594
596
|
});
|
|
595
597
|
return result;
|
|
596
598
|
}
|
|
@@ -598,16 +600,16 @@ function createDepositService(baseUrl, options) {
|
|
|
598
600
|
}
|
|
599
601
|
function normalizeDirectPortfolio(data) {
|
|
600
602
|
const rawTokens = _nullishCoalesce(_nullishCoalesce(extractArray(data, "tokens"), () => ( extractArray(
|
|
601
|
-
_optionalChain([data, 'optionalAccess',
|
|
603
|
+
_optionalChain([data, 'optionalAccess', _16 => _16.data]),
|
|
602
604
|
"tokens"
|
|
603
605
|
))), () => ( []));
|
|
604
|
-
const totalUsd = _nullishCoalesce(_nullishCoalesce(extractNumber(data, "totalUsd"), () => ( extractNumber(_optionalChain([data, 'optionalAccess',
|
|
606
|
+
const totalUsd = _nullishCoalesce(_nullishCoalesce(extractNumber(data, "totalUsd"), () => ( extractNumber(_optionalChain([data, 'optionalAccess', _17 => _17.data]), "totalUsd"))), () => ( 0));
|
|
605
607
|
const tokens = rawTokens.map((token) => normalizeDirectToken(token)).filter((token) => Boolean(token));
|
|
606
608
|
return { tokens, totalUsd };
|
|
607
609
|
}
|
|
608
610
|
function extractOrchestratorPortfolio(data) {
|
|
609
611
|
const portfolio = _nullishCoalesce(extractArray(data, "portfolio"), () => ( extractArray(
|
|
610
|
-
_optionalChain([data, 'optionalAccess',
|
|
612
|
+
_optionalChain([data, 'optionalAccess', _18 => _18.data]),
|
|
611
613
|
"portfolio"
|
|
612
614
|
)));
|
|
613
615
|
if (!portfolio || !Array.isArray(portfolio)) return null;
|
|
@@ -618,7 +620,7 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
618
620
|
for (const tokenData of data.portfolio || []) {
|
|
619
621
|
const chainBalances = _nullishCoalesce(_nullishCoalesce(tokenData.tokenChainBalance, () => ( tokenData.chainBalances)), () => ( []));
|
|
620
622
|
for (const chainBalance of chainBalances) {
|
|
621
|
-
const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access',
|
|
623
|
+
const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _19 => _19.balance, 'optionalAccess', _20 => _20.unlocked]), () => ( "0"));
|
|
622
624
|
const normalizedName = tokenData.tokenName.trim();
|
|
623
625
|
const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
|
|
624
626
|
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkR6U6BHCVcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
|
|
@@ -652,7 +654,7 @@ function normalizeDirectToken(token) {
|
|
|
652
654
|
if (chainId === null) return null;
|
|
653
655
|
const symbol = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "symbol"), () => ( extractString(token, "tokenSymbol"))), () => ( extractString(token, "tokenName"))), () => ( extractString(token, "name")));
|
|
654
656
|
if (!symbol) return null;
|
|
655
|
-
const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call',
|
|
657
|
+
const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call', _21 => _21(token, "balance"), 'optionalAccess', _22 => _22.toString, 'call', _23 => _23()]))), () => ( _optionalChain([extractNumber, 'call', _24 => _24(token, "amount"), 'optionalAccess', _25 => _25.toString, 'call', _26 => _26()]))), () => ( _optionalChain([extractNumber, 'call', _27 => _27(token, "value"), 'optionalAccess', _28 => _28.toString, 'call', _29 => _29()]))), () => ( _optionalChain([extractNumber, 'call', _30 => _30(token, "rawBalance"), 'optionalAccess', _31 => _31.toString, 'call', _32 => _32()])));
|
|
656
658
|
if (!balanceValue) return null;
|
|
657
659
|
const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
|
|
658
660
|
token.token,
|
|
@@ -677,7 +679,7 @@ function normalizeDirectToken(token) {
|
|
|
677
679
|
}
|
|
678
680
|
function extractTokenAddress(tokenData, chainId) {
|
|
679
681
|
const token = tokenData;
|
|
680
|
-
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(token.tokenAddress, () => ( token.address)), () => ( _optionalChain([token, 'access',
|
|
682
|
+
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(token.tokenAddress, () => ( token.address)), () => ( _optionalChain([token, 'access', _33 => _33.addresses, 'optionalAccess', _34 => _34[chainId]]))), () => ( _optionalChain([token, 'access', _35 => _35.token, 'optionalAccess', _36 => _36.address]))), () => ( _optionalChain([token, 'access', _37 => _37.token, 'optionalAccess', _38 => _38.addresses, 'optionalAccess', _39 => _39[chainId]])));
|
|
681
683
|
}
|
|
682
684
|
function extractArray(data, key) {
|
|
683
685
|
if (!data || typeof data !== "object") return null;
|
|
@@ -835,19 +837,19 @@ function setVar(targets, prop, value) {
|
|
|
835
837
|
function applyTheme(element, theme) {
|
|
836
838
|
if (!element) return;
|
|
837
839
|
const parent = element.parentElement;
|
|
838
|
-
const targets = _optionalChain([parent, 'optionalAccess',
|
|
839
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
840
|
+
const targets = _optionalChain([parent, 'optionalAccess', _40 => _40.classList, 'access', _41 => _41.contains, 'call', _42 => _42("rs-modal-content")]) ? [element, parent] : [element];
|
|
841
|
+
if (_optionalChain([theme, 'optionalAccess', _43 => _43.mode])) {
|
|
840
842
|
element.setAttribute("data-theme", theme.mode);
|
|
841
843
|
} else {
|
|
842
844
|
element.removeAttribute("data-theme");
|
|
843
845
|
}
|
|
844
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
846
|
+
if (_optionalChain([theme, 'optionalAccess', _44 => _44.fontColor])) {
|
|
845
847
|
setVar(targets, "--rs-foreground", theme.fontColor);
|
|
846
848
|
}
|
|
847
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
849
|
+
if (_optionalChain([theme, 'optionalAccess', _45 => _45.iconColor])) {
|
|
848
850
|
setVar(targets, "--rs-icon", theme.iconColor);
|
|
849
851
|
}
|
|
850
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
852
|
+
if (_optionalChain([theme, 'optionalAccess', _46 => _46.ctaColor])) {
|
|
851
853
|
setVar(targets, "--rs-primary", theme.ctaColor);
|
|
852
854
|
setVar(targets, "--rs-border-accent", theme.ctaColor);
|
|
853
855
|
setVar(
|
|
@@ -855,17 +857,17 @@ function applyTheme(element, theme) {
|
|
|
855
857
|
"--rs-primary-hover",
|
|
856
858
|
_nullishCoalesce(theme.ctaHoverColor, () => ( theme.ctaColor))
|
|
857
859
|
);
|
|
858
|
-
} else if (_optionalChain([theme, 'optionalAccess',
|
|
860
|
+
} else if (_optionalChain([theme, 'optionalAccess', _47 => _47.ctaHoverColor])) {
|
|
859
861
|
setVar(targets, "--rs-primary-hover", theme.ctaHoverColor);
|
|
860
862
|
}
|
|
861
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
863
|
+
if (_optionalChain([theme, 'optionalAccess', _48 => _48.borderColor])) {
|
|
862
864
|
setVar(targets, "--rs-border", theme.borderColor);
|
|
863
865
|
setVar(targets, "--rs-border-surface", theme.borderColor);
|
|
864
866
|
}
|
|
865
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
867
|
+
if (_optionalChain([theme, 'optionalAccess', _49 => _49.backgroundColor])) {
|
|
866
868
|
setVar(targets, "--rs-background", theme.backgroundColor);
|
|
867
869
|
}
|
|
868
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
870
|
+
if (_optionalChain([theme, 'optionalAccess', _50 => _50.radius])) {
|
|
869
871
|
const scale = RADIUS_SCALE[theme.radius];
|
|
870
872
|
setVar(targets, "--rs-radius-sm", scale.sm);
|
|
871
873
|
setVar(targets, "--rs-radius-md", scale.md);
|
|
@@ -1031,16 +1033,16 @@ function ConnectStep({
|
|
|
1031
1033
|
continueButtonLabel = "Continue",
|
|
1032
1034
|
connectButtonLabel = "Connect external wallet"
|
|
1033
1035
|
}) {
|
|
1034
|
-
const hasWalletOptions = (_nullishCoalesce(_optionalChain([walletOptions, 'optionalAccess',
|
|
1036
|
+
const hasWalletOptions = (_nullishCoalesce(_optionalChain([walletOptions, 'optionalAccess', _51 => _51.length]), () => ( 0))) > 0;
|
|
1035
1037
|
if (hasWalletOptions) {
|
|
1036
|
-
const hasReownWallet = _nullishCoalesce(_optionalChain([walletOptions, 'optionalAccess',
|
|
1038
|
+
const hasReownWallet = _nullishCoalesce(_optionalChain([walletOptions, 'optionalAccess', _52 => _52.some, 'call', _53 => _53(
|
|
1037
1039
|
(option) => option.kind === "external" || option.kind === "solana"
|
|
1038
1040
|
)]), () => ( false));
|
|
1039
1041
|
const showConnectDifferentWalletOption = Boolean(onConnect) && !hasReownWallet;
|
|
1040
1042
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
1041
1043
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-connect-centered rs-connect-centered--wallets", children: [
|
|
1042
1044
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-connect-wallet-list", children: [
|
|
1043
|
-
_optionalChain([walletOptions, 'optionalAccess',
|
|
1045
|
+
_optionalChain([walletOptions, 'optionalAccess', _54 => _54.map, 'call', _55 => _55((option) => {
|
|
1044
1046
|
const isSelected = option.id === selectedWalletId;
|
|
1045
1047
|
const rawAddress = _nullishCoalesce(_nullishCoalesce(option.address, () => ( option.solanaAddress)), () => ( option.id));
|
|
1046
1048
|
const shortAddress = rawAddress.length > 12 ? `${rawAddress.slice(0, 6)}...${rawAddress.slice(-4)}` : rawAddress;
|
|
@@ -1049,7 +1051,7 @@ function ConnectStep({
|
|
|
1049
1051
|
{
|
|
1050
1052
|
type: "button",
|
|
1051
1053
|
className: `rs-connect-wallet-row ${isSelected ? "rs-connect-wallet-row--selected" : ""}`,
|
|
1052
|
-
onClick: () => _optionalChain([onSelectWallet, 'optionalCall',
|
|
1054
|
+
onClick: () => _optionalChain([onSelectWallet, 'optionalCall', _56 => _56(option.id)]),
|
|
1053
1055
|
children: [
|
|
1054
1056
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1055
1057
|
"div",
|
|
@@ -1108,7 +1110,7 @@ function ConnectStep({
|
|
|
1108
1110
|
}
|
|
1109
1111
|
)
|
|
1110
1112
|
] }),
|
|
1111
|
-
(onDisconnect || onConnect) && _optionalChain([walletOptions, 'optionalAccess',
|
|
1113
|
+
(onDisconnect || onConnect) && _optionalChain([walletOptions, 'optionalAccess', _57 => _57.some, 'call', _58 => _58(
|
|
1112
1114
|
(option) => option.kind === "external" || option.kind === "solana"
|
|
1113
1115
|
)]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1114
1116
|
"button",
|
|
@@ -1325,7 +1327,7 @@ function asNumber(value) {
|
|
|
1325
1327
|
const trimmed = value.trim();
|
|
1326
1328
|
if (!trimmed) return void 0;
|
|
1327
1329
|
const caipMatch = trimmed.match(/^eip155:(\d+)$/);
|
|
1328
|
-
if (_optionalChain([caipMatch, 'optionalAccess',
|
|
1330
|
+
if (_optionalChain([caipMatch, 'optionalAccess', _59 => _59[1]])) {
|
|
1329
1331
|
const parsed2 = Number(caipMatch[1]);
|
|
1330
1332
|
return Number.isFinite(parsed2) ? parsed2 : void 0;
|
|
1331
1333
|
}
|
|
@@ -1344,28 +1346,28 @@ function asAddress(value) {
|
|
|
1344
1346
|
return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
|
|
1345
1347
|
}
|
|
1346
1348
|
function getEventTxHash(event) {
|
|
1347
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
1349
|
+
if (!_optionalChain([event, 'optionalAccess', _60 => _60.type])) return void 0;
|
|
1348
1350
|
if (event.type === "deposit-received") {
|
|
1349
|
-
return asString(_optionalChain([event, 'access',
|
|
1351
|
+
return asString(_optionalChain([event, 'access', _61 => _61.data, 'optionalAccess', _62 => _62.transactionHash]));
|
|
1350
1352
|
}
|
|
1351
1353
|
if (event.type === "bridge-started" || event.type === "bridge-complete") {
|
|
1352
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
1353
|
-
const source = isRecord(_optionalChain([event, 'access',
|
|
1354
|
-
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess',
|
|
1354
|
+
const deposit = isRecord(_optionalChain([event, 'access', _63 => _63.data, 'optionalAccess', _64 => _64.deposit])) ? event.data.deposit : void 0;
|
|
1355
|
+
const source = isRecord(_optionalChain([event, 'access', _65 => _65.data, 'optionalAccess', _66 => _66.source])) ? event.data.source : void 0;
|
|
1356
|
+
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _67 => _67.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _68 => _68.transactionHash]))));
|
|
1355
1357
|
}
|
|
1356
1358
|
if (event.type === "bridge-failed" || event.type === "error") {
|
|
1357
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
1358
|
-
const source = isRecord(_optionalChain([event, 'access',
|
|
1359
|
-
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess',
|
|
1359
|
+
const deposit = isRecord(_optionalChain([event, 'access', _69 => _69.data, 'optionalAccess', _70 => _70.deposit])) ? event.data.deposit : void 0;
|
|
1360
|
+
const source = isRecord(_optionalChain([event, 'access', _71 => _71.data, 'optionalAccess', _72 => _72.source])) ? event.data.source : void 0;
|
|
1361
|
+
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _73 => _73.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _74 => _74.transactionHash]))));
|
|
1360
1362
|
}
|
|
1361
1363
|
if (event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed") {
|
|
1362
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
1363
|
-
return asString(_optionalChain([deposit, 'optionalAccess',
|
|
1364
|
+
const deposit = isRecord(_optionalChain([event, 'access', _75 => _75.data, 'optionalAccess', _76 => _76.deposit])) ? event.data.deposit : void 0;
|
|
1365
|
+
return asString(_optionalChain([deposit, 'optionalAccess', _77 => _77.transactionHash]));
|
|
1364
1366
|
}
|
|
1365
1367
|
return void 0;
|
|
1366
1368
|
}
|
|
1367
1369
|
function getEventSourceDetails(event) {
|
|
1368
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
1370
|
+
if (!_optionalChain([event, 'optionalAccess', _78 => _78.type]) || !isRecord(event.data)) return {};
|
|
1369
1371
|
if (event.type === "deposit-received") {
|
|
1370
1372
|
return {
|
|
1371
1373
|
chainId: asNumber(event.data.chain),
|
|
@@ -1377,15 +1379,15 @@ function getEventSourceDetails(event) {
|
|
|
1377
1379
|
const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
|
|
1378
1380
|
if (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error" || event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed") {
|
|
1379
1381
|
return {
|
|
1380
|
-
chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess',
|
|
1381
|
-
amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess',
|
|
1382
|
-
token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess',
|
|
1382
|
+
chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _79 => _79.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _80 => _80.chain])))),
|
|
1383
|
+
amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _81 => _81.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _82 => _82.amount])))),
|
|
1384
|
+
token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _83 => _83.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _84 => _84.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _85 => _85.token]))))
|
|
1383
1385
|
};
|
|
1384
1386
|
}
|
|
1385
1387
|
return {};
|
|
1386
1388
|
}
|
|
1387
1389
|
function isDepositEvent(event) {
|
|
1388
|
-
return _optionalChain([event, 'optionalAccess',
|
|
1390
|
+
return _optionalChain([event, 'optionalAccess', _86 => _86.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _87 => _87.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _88 => _88.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _89 => _89.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _90 => _90.type]) === "post-bridge-swap-complete" || _optionalChain([event, 'optionalAccess', _91 => _91.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _92 => _92.type]) === "error";
|
|
1389
1391
|
}
|
|
1390
1392
|
function isHexString(value) {
|
|
1391
1393
|
return value.startsWith("0x") || value.startsWith("0X");
|
|
@@ -1440,7 +1442,7 @@ function isEventForTx(event, txHash) {
|
|
|
1440
1442
|
return txRefsMatch(eventTxHash, txHash);
|
|
1441
1443
|
}
|
|
1442
1444
|
function formatBridgeFailedMessage(event) {
|
|
1443
|
-
const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess',
|
|
1445
|
+
const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _93 => _93.data]), () => ( {}));
|
|
1444
1446
|
const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
|
|
1445
1447
|
const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
|
|
1446
1448
|
function toUserFacingFailure(raw) {
|
|
@@ -1472,12 +1474,12 @@ function formatBridgeFailedMessage(event) {
|
|
|
1472
1474
|
return { message: "Bridge failed" };
|
|
1473
1475
|
}
|
|
1474
1476
|
function parseWebhookTimestamp(event) {
|
|
1475
|
-
if (typeof _optionalChain([event, 'optionalAccess',
|
|
1477
|
+
if (typeof _optionalChain([event, 'optionalAccess', _94 => _94.time]) !== "string") return void 0;
|
|
1476
1478
|
const timestamp = Date.parse(event.time);
|
|
1477
1479
|
return Number.isFinite(timestamp) ? timestamp : void 0;
|
|
1478
1480
|
}
|
|
1479
1481
|
function syncPhaseTimings(previous, event) {
|
|
1480
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
1482
|
+
if (!_optionalChain([event, 'optionalAccess', _95 => _95.type])) return previous;
|
|
1481
1483
|
const timestamp = _nullishCoalesce(parseWebhookTimestamp(event), () => ( Date.now()));
|
|
1482
1484
|
const setReceived = (event.type === "deposit-received" || event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed" || event.type === "error") && previous.receivedAt === void 0;
|
|
1483
1485
|
const setBridging = (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "post-bridge-swap-complete") && previous.bridgingAt === void 0;
|
|
@@ -1518,9 +1520,9 @@ function getCurrentPhaseId(state, phaseTimings, isEarlyComplete) {
|
|
|
1518
1520
|
if (state.type === "complete") {
|
|
1519
1521
|
return void 0;
|
|
1520
1522
|
}
|
|
1521
|
-
if (_optionalChain([state, 'access',
|
|
1523
|
+
if (_optionalChain([state, 'access', _96 => _96.lastEvent, 'optionalAccess', _97 => _97.type]) === "bridge-started" || _optionalChain([state, 'access', _98 => _98.lastEvent, 'optionalAccess', _99 => _99.type]) === "bridge-complete")
|
|
1522
1524
|
return "bridging";
|
|
1523
|
-
if (_optionalChain([state, 'access',
|
|
1525
|
+
if (_optionalChain([state, 'access', _100 => _100.lastEvent, 'optionalAccess', _101 => _101.type]) === "deposit-received") return "received";
|
|
1524
1526
|
return "confirming";
|
|
1525
1527
|
}
|
|
1526
1528
|
function ProcessingStep({
|
|
@@ -1574,7 +1576,7 @@ function ProcessingStep({
|
|
|
1574
1576
|
txHash,
|
|
1575
1577
|
flowLabel
|
|
1576
1578
|
});
|
|
1577
|
-
_optionalChain([onDepositComplete, 'optionalCall',
|
|
1579
|
+
_optionalChain([onDepositComplete, 'optionalCall', _102 => _102(txHash, void 0, {
|
|
1578
1580
|
amount,
|
|
1579
1581
|
sourceChain,
|
|
1580
1582
|
sourceToken,
|
|
@@ -1615,7 +1617,7 @@ function ProcessingStep({
|
|
|
1615
1617
|
_react.useEffect.call(void 0, () => {
|
|
1616
1618
|
if (!state.lastEvent) return;
|
|
1617
1619
|
setPhaseTimings((previous) => syncPhaseTimings(previous, state.lastEvent));
|
|
1618
|
-
}, [_optionalChain([state, 'access',
|
|
1620
|
+
}, [_optionalChain([state, 'access', _103 => _103.lastEvent, 'optionalAccess', _104 => _104.time]), _optionalChain([state, 'access', _105 => _105.lastEvent, 'optionalAccess', _106 => _106.type])]);
|
|
1619
1621
|
_react.useEffect.call(void 0, () => {
|
|
1620
1622
|
savePhaseTimings(txHash, phaseTimings);
|
|
1621
1623
|
}, [txHash, phaseTimings]);
|
|
@@ -1642,20 +1644,20 @@ function ProcessingStep({
|
|
|
1642
1644
|
debugLog(debug, "processing", "poll:event", {
|
|
1643
1645
|
type: lastEvent2.type,
|
|
1644
1646
|
matchesTx: eventMatchesTx,
|
|
1645
|
-
intentId: _optionalChain([eventData, 'optionalAccess',
|
|
1647
|
+
intentId: _optionalChain([eventData, 'optionalAccess', _107 => _107.intentId])
|
|
1646
1648
|
});
|
|
1647
1649
|
}
|
|
1648
1650
|
if (!isMounted) return;
|
|
1649
1651
|
const awaitingPostBridgeSwap = waitForFinalTx && hasPostBridgeActions;
|
|
1650
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
1652
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _108 => _108.type]) === "post-bridge-swap-complete") {
|
|
1651
1653
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
1652
|
-
const swapTxHash = _optionalChain([eventForCurrentTx, 'access',
|
|
1654
|
+
const swapTxHash = _optionalChain([eventForCurrentTx, 'access', _109 => _109.data, 'optionalAccess', _110 => _110.swap, 'optionalAccess', _111 => _111.transactionHash]);
|
|
1653
1655
|
debugLog(debug, "processing", "state:complete", {
|
|
1654
1656
|
txHash,
|
|
1655
1657
|
destinationTxHash: swapTxHash,
|
|
1656
1658
|
event: eventForCurrentTx.type
|
|
1657
1659
|
});
|
|
1658
|
-
_optionalChain([onDepositComplete, 'optionalCall',
|
|
1660
|
+
_optionalChain([onDepositComplete, 'optionalCall', _112 => _112(txHash, swapTxHash, {
|
|
1659
1661
|
amount,
|
|
1660
1662
|
sourceChain,
|
|
1661
1663
|
sourceToken,
|
|
@@ -1664,7 +1666,7 @@ function ProcessingStep({
|
|
|
1664
1666
|
})]);
|
|
1665
1667
|
return;
|
|
1666
1668
|
}
|
|
1667
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
1669
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _113 => _113.type]) === "post-bridge-swap-failed") {
|
|
1668
1670
|
const formatted = formatBridgeFailedMessage(eventForCurrentTx);
|
|
1669
1671
|
setState({
|
|
1670
1672
|
type: "failed",
|
|
@@ -1676,18 +1678,18 @@ function ProcessingStep({
|
|
|
1676
1678
|
message: formatted.message,
|
|
1677
1679
|
code: formatted.code
|
|
1678
1680
|
});
|
|
1679
|
-
_optionalChain([onDepositFailed, 'optionalCall',
|
|
1681
|
+
_optionalChain([onDepositFailed, 'optionalCall', _114 => _114(txHash, formatted.message)]);
|
|
1680
1682
|
return;
|
|
1681
1683
|
}
|
|
1682
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
1684
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _115 => _115.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
|
|
1683
1685
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
1684
|
-
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access',
|
|
1686
|
+
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _116 => _116.data, 'optionalAccess', _117 => _117.destination, 'optionalAccess', _118 => _118.transactionHash]);
|
|
1685
1687
|
debugLog(debug, "processing", "state:complete", {
|
|
1686
1688
|
txHash,
|
|
1687
1689
|
destinationTxHash: destinationTxHash2,
|
|
1688
1690
|
event: eventForCurrentTx.type
|
|
1689
1691
|
});
|
|
1690
|
-
_optionalChain([onDepositComplete, 'optionalCall',
|
|
1692
|
+
_optionalChain([onDepositComplete, 'optionalCall', _119 => _119(txHash, destinationTxHash2, {
|
|
1691
1693
|
amount,
|
|
1692
1694
|
sourceChain,
|
|
1693
1695
|
sourceToken,
|
|
@@ -1696,13 +1698,13 @@ function ProcessingStep({
|
|
|
1696
1698
|
})]);
|
|
1697
1699
|
return;
|
|
1698
1700
|
}
|
|
1699
|
-
if (!waitForFinalTx && _optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
1701
|
+
if (!waitForFinalTx && _optionalChain([eventForCurrentTx, 'optionalAccess', _120 => _120.type]) === "bridge-started") {
|
|
1700
1702
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
1701
1703
|
debugLog(debug, "processing", "state:early-complete", {
|
|
1702
1704
|
txHash,
|
|
1703
1705
|
event: eventForCurrentTx.type
|
|
1704
1706
|
});
|
|
1705
|
-
_optionalChain([onDepositComplete, 'optionalCall',
|
|
1707
|
+
_optionalChain([onDepositComplete, 'optionalCall', _121 => _121(txHash, void 0, {
|
|
1706
1708
|
amount,
|
|
1707
1709
|
sourceChain,
|
|
1708
1710
|
sourceToken,
|
|
@@ -1711,7 +1713,7 @@ function ProcessingStep({
|
|
|
1711
1713
|
})]);
|
|
1712
1714
|
return;
|
|
1713
1715
|
}
|
|
1714
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
1716
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _122 => _122.type]) === "bridge-failed") {
|
|
1715
1717
|
const formatted = formatBridgeFailedMessage(eventForCurrentTx);
|
|
1716
1718
|
setState({
|
|
1717
1719
|
type: "failed",
|
|
@@ -1723,11 +1725,11 @@ function ProcessingStep({
|
|
|
1723
1725
|
message: formatted.message,
|
|
1724
1726
|
code: formatted.code
|
|
1725
1727
|
});
|
|
1726
|
-
_optionalChain([onDepositFailed, 'optionalCall',
|
|
1728
|
+
_optionalChain([onDepositFailed, 'optionalCall', _123 => _123(txHash, formatted.message)]);
|
|
1727
1729
|
return;
|
|
1728
1730
|
}
|
|
1729
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
1730
|
-
const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access',
|
|
1731
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _124 => _124.type]) === "error") {
|
|
1732
|
+
const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _125 => _125.data, 'optionalAccess', _126 => _126.message]), () => ( "Unknown error"));
|
|
1731
1733
|
setState({
|
|
1732
1734
|
type: "failed",
|
|
1733
1735
|
message: errorMessage,
|
|
@@ -1737,7 +1739,7 @@ function ProcessingStep({
|
|
|
1737
1739
|
txHash,
|
|
1738
1740
|
message: errorMessage
|
|
1739
1741
|
});
|
|
1740
|
-
_optionalChain([onDepositFailed, 'optionalCall',
|
|
1742
|
+
_optionalChain([onDepositFailed, 'optionalCall', _127 => _127(txHash, errorMessage)]);
|
|
1741
1743
|
return;
|
|
1742
1744
|
}
|
|
1743
1745
|
setState((previous) => ({
|
|
@@ -1802,7 +1804,7 @@ function ProcessingStep({
|
|
|
1802
1804
|
txHash,
|
|
1803
1805
|
timeoutMs: ESCALATED_DELAY_MS
|
|
1804
1806
|
});
|
|
1805
|
-
_optionalChain([onError, 'optionalCall',
|
|
1807
|
+
_optionalChain([onError, 'optionalCall', _128 => _128(message, "PROCESS_TIMEOUT")]);
|
|
1806
1808
|
}, ESCALATED_DELAY_MS);
|
|
1807
1809
|
return () => clearTimeout(timeoutId);
|
|
1808
1810
|
}, [debug, directTransfer, onError, state.type, txHash]);
|
|
@@ -1811,13 +1813,13 @@ function ProcessingStep({
|
|
|
1811
1813
|
const isProcessing = state.type === "processing";
|
|
1812
1814
|
const lastEvent = state.lastEvent;
|
|
1813
1815
|
const failureMessage = state.type === "failed" ? state.message : void 0;
|
|
1814
|
-
const isEarlyComplete = !waitForFinalTx && _optionalChain([lastEvent, 'optionalAccess',
|
|
1816
|
+
const isEarlyComplete = !waitForFinalTx && _optionalChain([lastEvent, 'optionalAccess', _129 => _129.type]) === "bridge-started";
|
|
1815
1817
|
const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
|
|
1816
1818
|
const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
|
|
1817
1819
|
const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
|
|
1818
|
-
const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess',
|
|
1819
|
-
const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess',
|
|
1820
|
-
const bridgeTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess',
|
|
1820
|
+
const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess', _130 => _130.type]) === "post-bridge-swap-complete" || _optionalChain([lastEvent, 'optionalAccess', _131 => _131.type]) === "post-bridge-swap-failed";
|
|
1821
|
+
const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _132 => _132.data, 'optionalAccess', _133 => _133.swap, 'optionalAccess', _134 => _134.transactionHash]) || null : _optionalChain([lastEvent, 'optionalAccess', _135 => _135.data, 'optionalAccess', _136 => _136.destination, 'optionalAccess', _137 => _137.transactionHash]) || null;
|
|
1822
|
+
const bridgeTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _138 => _138.data, 'optionalAccess', _139 => _139.bridge, 'optionalAccess', _140 => _140.transactionHash]) || null : null;
|
|
1821
1823
|
const sourceDetails = getEventSourceDetails(lastEvent);
|
|
1822
1824
|
const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
|
|
1823
1825
|
const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
|
|
@@ -1848,7 +1850,7 @@ function ProcessingStep({
|
|
|
1848
1850
|
const activePhaseElapsedMs = isProcessing && activePhaseStartedAt !== void 0 ? timelineNowMs - activePhaseStartedAt : 0;
|
|
1849
1851
|
const delayPhaseId = isProcessing && currentPhaseId && activePhaseElapsedMs >= SOFT_DELAY_MS[currentPhaseId] ? currentPhaseId : void 0;
|
|
1850
1852
|
const headerTitle = isFailed ? `${flowCapitalized} could not be completed` : isComplete ? isEarlyComplete ? `${flowCapitalized} confirmed` : `${flowCapitalized} successful` : delayPhaseId === "received" ? "Bridge pending" : delayPhaseId === "bridging" ? "Bridge delayed" : delayPhaseId === "confirming" ? `Confirming ${flowNoun}` : `Submitting transaction...`;
|
|
1851
|
-
const headerDescription = isFailed ? _nullishCoalesce(failureMessage, () => ( "The transfer could not be completed.")) : isComplete ? directTransfer ? "Your transfer is complete." : isEarlyComplete ? "The bridge has started. Funds will arrive shortly." : "Your funds were successfully deposited." : delayPhaseId === "received" ? "Funds are in. We are still waiting for the bridge transaction to begin." : delayPhaseId === "bridging" ? "The bridge has started but settlement is taking longer than expected." : delayPhaseId === "confirming" ? "The source transaction has not been picked up yet, but we are still polling automatically." : _optionalChain([state, 'access',
|
|
1853
|
+
const headerDescription = isFailed ? _nullishCoalesce(failureMessage, () => ( "The transfer could not be completed.")) : isComplete ? directTransfer ? "Your transfer is complete." : isEarlyComplete ? "The bridge has started. Funds will arrive shortly." : "Your funds were successfully deposited." : delayPhaseId === "received" ? "Funds are in. We are still waiting for the bridge transaction to begin." : delayPhaseId === "bridging" ? "The bridge has started but settlement is taking longer than expected." : delayPhaseId === "confirming" ? "The source transaction has not been picked up yet, but we are still polling automatically." : _optionalChain([state, 'access', _141 => _141.lastEvent, 'optionalAccess', _142 => _142.type]) === "deposit-received" ? "Transfer received. Preparing bridge execution." : _optionalChain([state, 'access', _143 => _143.lastEvent, 'optionalAccess', _144 => _144.type]) === "bridge-started" ? `Bridge started. Sending funds to ${_chunkR6U6BHCVcjs.getChainName.call(void 0, targetChain)}.` : "Filling your transaction on the blockchain.";
|
|
1852
1854
|
const showAlert = !isFailed && (delayPhaseId !== void 0 || hasEscalatedDelay);
|
|
1853
1855
|
const alertMessage = hasEscalatedDelay ? "Taking longer than expected. You can close this window \u2014 processing continues in the background." : "This step is slower than usual but still processing.";
|
|
1854
1856
|
const fillStatus = isComplete ? "Successful" : isFailed ? "Failed" : "Processing";
|
|
@@ -304,6 +304,8 @@ function createDepositService(baseUrl, options) {
|
|
|
304
304
|
ownerAddress: params.ownerAddress,
|
|
305
305
|
targetChain: params.targetChain,
|
|
306
306
|
targetToken: params.targetToken,
|
|
307
|
+
recipient: params.recipient ? shortRef(params.recipient) : void 0,
|
|
308
|
+
postBridgeActionCount: params.postBridgeActions?.length ?? 0,
|
|
307
309
|
forceRegister: params.forceRegister
|
|
308
310
|
});
|
|
309
311
|
const response = await fetch(url, {
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
tokenFormatter,
|
|
27
27
|
txRefsMatch,
|
|
28
28
|
useLatestRef
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-GAHX5RAT.mjs";
|
|
30
30
|
import {
|
|
31
31
|
DEFAULT_BACKEND_URL,
|
|
32
32
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -109,6 +109,8 @@ function SetupStep({
|
|
|
109
109
|
sessionOwnerAddress: sessionOwner.address,
|
|
110
110
|
targetChain: toEvmCaip2(targetChain),
|
|
111
111
|
targetToken,
|
|
112
|
+
recipient,
|
|
113
|
+
postBridgeActions,
|
|
112
114
|
signerAddress,
|
|
113
115
|
sessionChainIds,
|
|
114
116
|
forceRegister
|
|
@@ -3665,7 +3667,7 @@ function DepositFlow({
|
|
|
3665
3667
|
// src/DepositModal.tsx
|
|
3666
3668
|
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3667
3669
|
var ReownDepositInner = lazy(
|
|
3668
|
-
() => import("./DepositModalReown-
|
|
3670
|
+
() => import("./DepositModalReown-Y4M3RA73.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
3669
3671
|
);
|
|
3670
3672
|
function DepositModal(props) {
|
|
3671
3673
|
const needsReown = !!props.reownAppId;
|