@rhinestone/deposit-modal 0.3.0-alpha.1 → 0.3.0-alpha.11
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-VV3H2WWC.cjs → DepositModalReown-KXFF6ZXY.cjs} +12 -9
- package/dist/{DepositModalReown-EESTTLN4.mjs → DepositModalReown-UNFGBOIJ.mjs} +9 -6
- package/dist/{QRCode-SMMYPUQC.cjs → QRCode-KG47KTGX.cjs} +1 -1
- package/dist/{QRCode-YMQTKSSK.mjs → QRCode-YJ3EGWQS.mjs} +1 -1
- package/dist/{WithdrawModalReown-SQQQV6KQ.mjs → WithdrawModalReown-QEQPCSWT.mjs} +4 -4
- package/dist/{WithdrawModalReown-IP4MOGER.cjs → WithdrawModalReown-Z5JVENP6.cjs} +7 -7
- package/dist/{chunk-DCAANLEP.cjs → chunk-2TWQGPPB.cjs} +1323 -590
- package/dist/chunk-7JIDIX27.cjs +554 -0
- package/dist/{chunk-D5YCALVX.mjs → chunk-7MZNQ4C2.mjs} +74 -349
- package/dist/{chunk-YQFH2WSW.cjs → chunk-FGVSNARE.cjs} +55 -25
- package/dist/{chunk-5YXAQB6A.mjs → chunk-QXIJLRKC.mjs} +56 -26
- package/dist/chunk-SZIYS42B.mjs +554 -0
- package/dist/{chunk-SLLI7SB6.mjs → chunk-V63GWJHB.mjs} +2752 -1440
- package/dist/{chunk-FY76DWPD.mjs → chunk-WVE3JN3C.mjs} +1308 -575
- package/dist/{chunk-C6JK3IO6.cjs → chunk-Y4CESMTH.cjs} +2817 -1505
- package/dist/{chunk-K7MNFNR7.cjs → chunk-YI63OMXN.cjs} +155 -430
- package/dist/constants-DqVn968d.d.cts +52 -0
- package/dist/constants-DqVn968d.d.ts +52 -0
- package/dist/constants.cjs +8 -2
- package/dist/constants.d.cts +17 -48
- package/dist/constants.d.ts +17 -48
- package/dist/constants.mjs +7 -1
- package/dist/deposit.cjs +4 -4
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +3 -3
- package/dist/index.cjs +16 -7
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +16 -7
- package/dist/styles.css +656 -207
- package/dist/{types-DRou84ZM.d.cts → types-D6wrO4Ow.d.cts} +33 -8
- package/dist/{types-DRou84ZM.d.ts → types-D6wrO4Ow.d.ts} +33 -8
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +3 -3
- package/package.json +5 -5
- package/dist/chunk-IVTXEYB2.cjs +0 -507
- package/dist/chunk-VA3ANS7D.mjs +0 -507
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
var _chunk7JIDIX27cjs = require('./chunk-7JIDIX27.cjs');
|
|
13
15
|
|
|
14
16
|
// src/components/ui/Modal.tsx
|
|
15
17
|
|
|
@@ -162,26 +164,60 @@ Modal.displayName = "Modal";
|
|
|
162
164
|
|
|
163
165
|
|
|
164
166
|
|
|
167
|
+
|
|
165
168
|
var _lucidereact = require('lucide-react');
|
|
169
|
+
|
|
166
170
|
var WalletIcon = _lucidereact.Wallet;
|
|
167
171
|
var ExternalLinkIcon = _lucidereact.ExternalLink;
|
|
168
172
|
var CheckIcon = _lucidereact.Check;
|
|
173
|
+
function TransferCryptoIcon() {
|
|
174
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
175
|
+
"svg",
|
|
176
|
+
{
|
|
177
|
+
width: "24",
|
|
178
|
+
height: "24",
|
|
179
|
+
viewBox: "8 8 24 24",
|
|
180
|
+
fill: "none",
|
|
181
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
182
|
+
"aria-hidden": "true",
|
|
183
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
184
|
+
"path",
|
|
185
|
+
{
|
|
186
|
+
d: "M26.08 18.37C27.03 18.72 27.87 19.30 28.53 20.07C29.19 20.83 29.65 21.75 29.86 22.73C30.07 23.72 30.03 24.74 29.74 25.71C29.45 26.68 28.92 27.55 28.20 28.26C27.48 28.97 26.59 29.49 25.62 29.76C24.65 30.04 23.63 30.06 22.64 29.83C21.66 29.61 20.75 29.14 20.00 28.47C19.24 27.80 18.67 26.95 18.33 26.00M15 14H16V18M24.70 21.87L25.40 22.58L22.58 25.40M22 16C22 19.31 19.31 22 16 22C12.68 22 10 19.31 10 16C10 12.68 12.68 10 16 10C19.31 10 22 12.68 22 16Z",
|
|
187
|
+
stroke: "currentColor",
|
|
188
|
+
strokeWidth: "2",
|
|
189
|
+
strokeLinecap: "round",
|
|
190
|
+
strokeLinejoin: "round"
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
}
|
|
194
|
+
);
|
|
195
|
+
}
|
|
169
196
|
var ChevronRightIcon = _lucidereact.ChevronRight;
|
|
170
197
|
var ChevronLeftIcon = _lucidereact.ChevronLeft;
|
|
171
198
|
var ChevronDownIcon = _lucidereact.ChevronDown;
|
|
172
199
|
var CloseIcon = _lucidereact.X;
|
|
173
200
|
var HandCoinsIcon = _lucidereact.HandCoins;
|
|
174
|
-
var CoinsIcon = _lucidereact.Coins;
|
|
175
201
|
var HistoryIcon = _lucidereact.History;
|
|
176
202
|
var InfoIcon = _lucidereact.Info;
|
|
177
203
|
var CopyIcon = _lucidereact.Copy;
|
|
178
|
-
var
|
|
204
|
+
var ArrowUpRightIcon = _lucidereact.ArrowUpRight;
|
|
179
205
|
var AlertTriangleIcon = _lucidereact.AlertTriangle;
|
|
180
206
|
var PercentIcon = _lucidereact.Percent;
|
|
181
207
|
var ClockIcon = _lucidereact.Clock;
|
|
182
208
|
var PlusCircleIcon = _lucidereact.CirclePlus;
|
|
183
209
|
var CircleArrowOutUpLeftIcon = _lucidereact.CircleArrowOutUpLeft;
|
|
184
210
|
|
|
211
|
+
// src/core/useLatestRef.ts
|
|
212
|
+
|
|
213
|
+
function useLatestRef(value) {
|
|
214
|
+
const ref = _react.useRef.call(void 0, value);
|
|
215
|
+
_react.useEffect.call(void 0, () => {
|
|
216
|
+
ref.current = value;
|
|
217
|
+
}, [value]);
|
|
218
|
+
return ref;
|
|
219
|
+
}
|
|
220
|
+
|
|
185
221
|
// src/core/debug.ts
|
|
186
222
|
function truncateString(value, max = 240) {
|
|
187
223
|
if (value.length <= max) return value;
|
|
@@ -241,6 +277,9 @@ var SOLANA_MAINNET_CAIP2 = `solana:${SOLANA_MAINNET_GENESIS}`;
|
|
|
241
277
|
function toEvmCaip2(chainId) {
|
|
242
278
|
return `eip155:${chainId}`;
|
|
243
279
|
}
|
|
280
|
+
function targetChainToCaip2(targetChain) {
|
|
281
|
+
return targetChain === "solana" ? SOLANA_MAINNET_CAIP2 : toEvmCaip2(targetChain);
|
|
282
|
+
}
|
|
244
283
|
function parseEvmChainId(value) {
|
|
245
284
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
246
285
|
return value;
|
|
@@ -280,7 +319,7 @@ function safeBigInt(value) {
|
|
|
280
319
|
if (!value) return BigInt(0);
|
|
281
320
|
try {
|
|
282
321
|
return BigInt(value);
|
|
283
|
-
} catch (
|
|
322
|
+
} catch (e2) {
|
|
284
323
|
return BigInt(0);
|
|
285
324
|
}
|
|
286
325
|
}
|
|
@@ -487,9 +526,9 @@ function createDepositService(baseUrl, options) {
|
|
|
487
526
|
error,
|
|
488
527
|
{ status: response.status, ownerAddress: params.ownerAddress }
|
|
489
528
|
);
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
);
|
|
529
|
+
const detail = Array.isArray(error.details) ? error.details.map((d) => _optionalChain([d, 'optionalAccess', _6 => _6.message])).filter(Boolean).join("; ") : void 0;
|
|
530
|
+
const base = error.error || `Setup account failed: ${response.status}`;
|
|
531
|
+
throw new Error(detail ? `${base}: ${detail}` : base);
|
|
493
532
|
}
|
|
494
533
|
const normalized = normalizeSetupAccountResponse(await response.json());
|
|
495
534
|
debugLog(debug, scope, "setupAccount:success", {
|
|
@@ -539,8 +578,8 @@ function createDepositService(baseUrl, options) {
|
|
|
539
578
|
const result = await response.json();
|
|
540
579
|
debugLog(debug, scope, "registerAccount:success", {
|
|
541
580
|
address: params.address,
|
|
542
|
-
evmDepositAddress: _optionalChain([result, 'optionalAccess',
|
|
543
|
-
hasSolanaDepositAddress: Boolean(_optionalChain([result, 'optionalAccess',
|
|
581
|
+
evmDepositAddress: _optionalChain([result, 'optionalAccess', _7 => _7.evmDepositAddress]),
|
|
582
|
+
hasSolanaDepositAddress: Boolean(_optionalChain([result, 'optionalAccess', _8 => _8.solanaDepositAddress]))
|
|
544
583
|
});
|
|
545
584
|
return result;
|
|
546
585
|
},
|
|
@@ -642,9 +681,9 @@ function createDepositService(baseUrl, options) {
|
|
|
642
681
|
}
|
|
643
682
|
const data = await response.json();
|
|
644
683
|
const result = {
|
|
645
|
-
isRegistered: _optionalChain([data, 'optionalAccess',
|
|
646
|
-
targetChain: _optionalChain([data, 'optionalAccess',
|
|
647
|
-
targetToken: _optionalChain([data, 'optionalAccess',
|
|
684
|
+
isRegistered: _optionalChain([data, 'optionalAccess', _9 => _9.isRegistered]) === true,
|
|
685
|
+
targetChain: _optionalChain([data, 'optionalAccess', _10 => _10.targetChain]),
|
|
686
|
+
targetToken: _optionalChain([data, 'optionalAccess', _11 => _11.targetToken])
|
|
648
687
|
};
|
|
649
688
|
debugLog(debug, scope, "checkAccount:success", {
|
|
650
689
|
address,
|
|
@@ -674,12 +713,12 @@ function createDepositService(baseUrl, options) {
|
|
|
674
713
|
return { lastEvent: void 0 };
|
|
675
714
|
}
|
|
676
715
|
const body = await response.json();
|
|
677
|
-
const row = _optionalChain([body, 'access',
|
|
716
|
+
const row = _optionalChain([body, 'access', _12 => _12.deposits, 'optionalAccess', _13 => _13[0]]);
|
|
678
717
|
const lastEvent = row ? depositRowToEvent(row) : void 0;
|
|
679
718
|
debugLog(debug, scope, "fetchStatus:success", {
|
|
680
719
|
address,
|
|
681
720
|
txHash: shortRef(normalized),
|
|
682
|
-
eventType: _optionalChain([lastEvent, 'optionalAccess',
|
|
721
|
+
eventType: _optionalChain([lastEvent, 'optionalAccess', _14 => _14.type])
|
|
683
722
|
});
|
|
684
723
|
return { lastEvent };
|
|
685
724
|
},
|
|
@@ -700,11 +739,11 @@ function createDepositService(baseUrl, options) {
|
|
|
700
739
|
return { lastEvent: void 0 };
|
|
701
740
|
}
|
|
702
741
|
const body = await response.json();
|
|
703
|
-
const row = _optionalChain([body, 'access',
|
|
742
|
+
const row = _optionalChain([body, 'access', _15 => _15.deposits, 'optionalAccess', _16 => _16[0]]);
|
|
704
743
|
const lastEvent = row ? depositRowToEvent(row) : void 0;
|
|
705
744
|
debugLog(debug, scope, "fetchLatestStatus:success", {
|
|
706
745
|
address,
|
|
707
|
-
eventType: _optionalChain([lastEvent, 'optionalAccess',
|
|
746
|
+
eventType: _optionalChain([lastEvent, 'optionalAccess', _17 => _17.type])
|
|
708
747
|
});
|
|
709
748
|
return { lastEvent };
|
|
710
749
|
},
|
|
@@ -766,12 +805,52 @@ function createDepositService(baseUrl, options) {
|
|
|
766
805
|
smartAccount,
|
|
767
806
|
chainId,
|
|
768
807
|
safeAddress,
|
|
769
|
-
txHash: _optionalChain([result, 'optionalAccess',
|
|
808
|
+
txHash: _optionalChain([result, 'optionalAccess', _18 => _18.txHash]) ? shortRef(result.txHash) : void 0
|
|
809
|
+
});
|
|
810
|
+
return result;
|
|
811
|
+
},
|
|
812
|
+
async submitPolymarketWithdraw(params) {
|
|
813
|
+
const { depositWallet, owner, nonce, deadline, calls, signature } = params;
|
|
814
|
+
const url = apiUrl(`/polymarket/withdraw`);
|
|
815
|
+
debugLog(debug, scope, "submitPolymarketWithdraw:request", {
|
|
816
|
+
url,
|
|
817
|
+
depositWallet,
|
|
818
|
+
owner,
|
|
819
|
+
nonce,
|
|
820
|
+
callCount: calls.length
|
|
821
|
+
});
|
|
822
|
+
const response = await fetch(url, {
|
|
823
|
+
method: "POST",
|
|
824
|
+
headers: { "Content-Type": "application/json" },
|
|
825
|
+
body: JSON.stringify({
|
|
826
|
+
depositWallet,
|
|
827
|
+
owner,
|
|
828
|
+
nonce,
|
|
829
|
+
deadline,
|
|
830
|
+
calls,
|
|
831
|
+
signature
|
|
832
|
+
})
|
|
833
|
+
});
|
|
834
|
+
if (!response.ok) {
|
|
835
|
+
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
836
|
+
debugError(debug, scope, "submitPolymarketWithdraw:failed", error, {
|
|
837
|
+
status: response.status,
|
|
838
|
+
depositWallet,
|
|
839
|
+
owner
|
|
840
|
+
});
|
|
841
|
+
throw new Error(
|
|
842
|
+
error.error || `Polymarket withdraw failed: ${response.status}`
|
|
843
|
+
);
|
|
844
|
+
}
|
|
845
|
+
const result = await response.json();
|
|
846
|
+
debugLog(debug, scope, "submitPolymarketWithdraw:success", {
|
|
847
|
+
depositWallet,
|
|
848
|
+
txHash: _optionalChain([result, 'optionalAccess', _19 => _19.txHash]) ? shortRef(result.txHash) : void 0
|
|
770
849
|
});
|
|
771
850
|
return result;
|
|
772
851
|
},
|
|
773
852
|
async fetchDepositHistory(params) {
|
|
774
|
-
const searchParams = new URLSearchParams({
|
|
853
|
+
const searchParams = new URLSearchParams({ recipient: params.recipient });
|
|
775
854
|
searchParams.set("limit", String(_nullishCoalesce(params.limit, () => ( 20))));
|
|
776
855
|
if (params.cursor) {
|
|
777
856
|
searchParams.set("cursor", params.cursor);
|
|
@@ -779,7 +858,7 @@ function createDepositService(baseUrl, options) {
|
|
|
779
858
|
const url = apiUrl(`/deposits?${searchParams.toString()}`);
|
|
780
859
|
debugLog(debug, scope, "fetchDepositHistory:request", {
|
|
781
860
|
url,
|
|
782
|
-
|
|
861
|
+
recipient: shortRef(params.recipient),
|
|
783
862
|
cursor: params.cursor
|
|
784
863
|
});
|
|
785
864
|
const response = await fetch(url, {
|
|
@@ -794,23 +873,33 @@ function createDepositService(baseUrl, options) {
|
|
|
794
873
|
scope,
|
|
795
874
|
"fetchDepositHistory:failed",
|
|
796
875
|
error,
|
|
797
|
-
{ status: response.status,
|
|
876
|
+
{ status: response.status, recipient: shortRef(params.recipient) }
|
|
798
877
|
);
|
|
799
878
|
throw new Error(
|
|
800
879
|
error.error || `Deposit history fetch failed: ${response.status}`
|
|
801
880
|
);
|
|
802
881
|
}
|
|
803
882
|
const data = await response.json();
|
|
804
|
-
const deposits = Array.isArray(_optionalChain([data, 'optionalAccess',
|
|
805
|
-
const nextCursor = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
883
|
+
const deposits = Array.isArray(_optionalChain([data, 'optionalAccess', _20 => _20.deposits])) ? data.deposits : [];
|
|
884
|
+
const nextCursor = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _21 => _21.nextCursor]), () => ( _optionalChain([data, 'optionalAccess', _22 => _22.next_cursor]))), () => ( null));
|
|
806
885
|
debugLog(debug, scope, "fetchDepositHistory:success", {
|
|
807
|
-
|
|
886
|
+
recipient: shortRef(params.recipient),
|
|
808
887
|
count: deposits.length,
|
|
809
888
|
hasMore: Boolean(nextCursor)
|
|
810
889
|
});
|
|
811
890
|
return { deposits, nextCursor };
|
|
812
891
|
},
|
|
813
892
|
async checkLiquidity(params) {
|
|
893
|
+
if (params.destinationChainId === "solana") {
|
|
894
|
+
const token = _chunk7JIDIX27cjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
|
|
895
|
+
return {
|
|
896
|
+
hasLiquidity: true,
|
|
897
|
+
symbol: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _23 => _23.symbol]), () => ( "Token")),
|
|
898
|
+
decimals: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _24 => _24.decimals]), () => ( 9)),
|
|
899
|
+
unlimited: true,
|
|
900
|
+
maxAmount: null
|
|
901
|
+
};
|
|
902
|
+
}
|
|
814
903
|
const searchParams = new URLSearchParams({
|
|
815
904
|
sourceChainId: String(params.sourceChainId),
|
|
816
905
|
sourceToken: params.sourceToken,
|
|
@@ -853,21 +942,51 @@ function createDepositService(baseUrl, options) {
|
|
|
853
942
|
maxAmount: result.maxAmount
|
|
854
943
|
});
|
|
855
944
|
return result;
|
|
945
|
+
},
|
|
946
|
+
async fetchPrices(symbols) {
|
|
947
|
+
const list = symbols.filter((s) => s.length > 0);
|
|
948
|
+
if (list.length === 0) return {};
|
|
949
|
+
const url = apiUrl(
|
|
950
|
+
`/prices?${new URLSearchParams({ symbols: list.join(",") }).toString()}`
|
|
951
|
+
);
|
|
952
|
+
try {
|
|
953
|
+
const response = await fetch(url, {
|
|
954
|
+
method: "GET",
|
|
955
|
+
headers: { "Content-Type": "application/json" },
|
|
956
|
+
cache: "no-store"
|
|
957
|
+
});
|
|
958
|
+
if (!response.ok) {
|
|
959
|
+
debugError(debug, scope, "fetchPrices:failed", {
|
|
960
|
+
status: response.status
|
|
961
|
+
});
|
|
962
|
+
return {};
|
|
963
|
+
}
|
|
964
|
+
const data = await response.json();
|
|
965
|
+
return Object.fromEntries(
|
|
966
|
+
Object.entries(_nullishCoalesce(data.prices, () => ( {}))).map(([symbol, price]) => [
|
|
967
|
+
symbol.toUpperCase(),
|
|
968
|
+
price
|
|
969
|
+
])
|
|
970
|
+
);
|
|
971
|
+
} catch (err) {
|
|
972
|
+
debugError(debug, scope, "fetchPrices:error", err);
|
|
973
|
+
return {};
|
|
974
|
+
}
|
|
856
975
|
}
|
|
857
976
|
};
|
|
858
977
|
}
|
|
859
978
|
function normalizeDirectPortfolio(data) {
|
|
860
979
|
const rawTokens = _nullishCoalesce(_nullishCoalesce(extractArray(data, "tokens"), () => ( extractArray(
|
|
861
|
-
_optionalChain([data, 'optionalAccess',
|
|
980
|
+
_optionalChain([data, 'optionalAccess', _25 => _25.data]),
|
|
862
981
|
"tokens"
|
|
863
982
|
))), () => ( []));
|
|
864
|
-
const totalUsd = _nullishCoalesce(_nullishCoalesce(extractNumber(data, "totalUsd"), () => ( extractNumber(_optionalChain([data, 'optionalAccess',
|
|
983
|
+
const totalUsd = _nullishCoalesce(_nullishCoalesce(extractNumber(data, "totalUsd"), () => ( extractNumber(_optionalChain([data, 'optionalAccess', _26 => _26.data]), "totalUsd"))), () => ( 0));
|
|
865
984
|
const tokens = rawTokens.map((token) => normalizeDirectToken(token)).filter((token) => Boolean(token));
|
|
866
985
|
return { tokens, totalUsd };
|
|
867
986
|
}
|
|
868
987
|
function extractOrchestratorPortfolio(data) {
|
|
869
988
|
const portfolio = _nullishCoalesce(extractArray(data, "portfolio"), () => ( extractArray(
|
|
870
|
-
_optionalChain([data, 'optionalAccess',
|
|
989
|
+
_optionalChain([data, 'optionalAccess', _27 => _27.data]),
|
|
871
990
|
"portfolio"
|
|
872
991
|
)));
|
|
873
992
|
if (!portfolio || !Array.isArray(portfolio)) return null;
|
|
@@ -878,17 +997,17 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
878
997
|
for (const tokenData of data.portfolio || []) {
|
|
879
998
|
const chainBalances = _nullishCoalesce(_nullishCoalesce(tokenData.tokenChainBalance, () => ( tokenData.chainBalances)), () => ( []));
|
|
880
999
|
for (const chainBalance of chainBalances) {
|
|
881
|
-
const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access',
|
|
1000
|
+
const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _28 => _28.balance, 'optionalAccess', _29 => _29.unlocked]), () => ( "0"));
|
|
882
1001
|
const normalizedName = tokenData.tokenName.trim();
|
|
883
1002
|
const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
|
|
884
|
-
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => (
|
|
885
|
-
const resolvedTokenAddress = isNativeSymbol ?
|
|
1003
|
+
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunk7JIDIX27cjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
|
|
1004
|
+
const resolvedTokenAddress = isNativeSymbol ? _chunk7JIDIX27cjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
|
|
886
1005
|
if (!resolvedTokenAddress) {
|
|
887
1006
|
continue;
|
|
888
1007
|
}
|
|
889
|
-
const registrySymbol =
|
|
1008
|
+
const registrySymbol = _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
|
|
890
1009
|
const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
|
|
891
|
-
const decimals = registrySymbol !== "Token" ?
|
|
1010
|
+
const decimals = registrySymbol !== "Token" ? _chunk7JIDIX27cjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
|
|
892
1011
|
tokens.push({
|
|
893
1012
|
chainId: chainBalance.chainId,
|
|
894
1013
|
address: resolvedTokenAddress,
|
|
@@ -912,19 +1031,19 @@ function normalizeDirectToken(token) {
|
|
|
912
1031
|
if (chainId === null) return null;
|
|
913
1032
|
const symbol = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "symbol"), () => ( extractString(token, "tokenSymbol"))), () => ( extractString(token, "tokenName"))), () => ( extractString(token, "name")));
|
|
914
1033
|
if (!symbol) return null;
|
|
915
|
-
const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call',
|
|
1034
|
+
const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call', _30 => _30(token, "balance"), 'optionalAccess', _31 => _31.toString, 'call', _32 => _32()]))), () => ( _optionalChain([extractNumber, 'call', _33 => _33(token, "amount"), 'optionalAccess', _34 => _34.toString, 'call', _35 => _35()]))), () => ( _optionalChain([extractNumber, 'call', _36 => _36(token, "value"), 'optionalAccess', _37 => _37.toString, 'call', _38 => _38()]))), () => ( _optionalChain([extractNumber, 'call', _39 => _39(token, "rawBalance"), 'optionalAccess', _40 => _40.toString, 'call', _41 => _41()])));
|
|
916
1035
|
if (!balanceValue) return null;
|
|
917
1036
|
const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
|
|
918
1037
|
token.token,
|
|
919
1038
|
"address"
|
|
920
|
-
))), () => ( (typeof chainId === "number" ?
|
|
1039
|
+
))), () => ( (typeof chainId === "number" ? _chunk7JIDIX27cjs.getTokenAddress.call(void 0, symbol, chainId) : void 0)));
|
|
921
1040
|
if (!address) return null;
|
|
922
1041
|
const balanceUsd = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractNumber(token, "balanceUsd"), () => ( extractNumber(token, "usdValue"))), () => ( extractNumber(token, "valueUsd"))), () => ( extractNumericString(token, "balanceUsd"))), () => ( extractNumericString(token, "usdValue"))), () => ( extractNumericString(token, "valueUsd"))), () => ( 0));
|
|
923
1042
|
const isSolanaToken = chainId === "solana";
|
|
924
|
-
const registrySymbol = isSolanaToken ? "Token" :
|
|
1043
|
+
const registrySymbol = isSolanaToken ? "Token" : _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, address, chainId);
|
|
925
1044
|
const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
|
|
926
1045
|
const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
|
|
927
|
-
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ?
|
|
1046
|
+
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunk7JIDIX27cjs.getTokenDecimalsByAddress.call(void 0, address, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
|
|
928
1047
|
return {
|
|
929
1048
|
chainId,
|
|
930
1049
|
address,
|
|
@@ -937,7 +1056,7 @@ function normalizeDirectToken(token) {
|
|
|
937
1056
|
}
|
|
938
1057
|
function extractTokenAddress(tokenData, chainId) {
|
|
939
1058
|
const token = tokenData;
|
|
940
|
-
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(token.tokenAddress, () => ( token.address)), () => ( _optionalChain([token, 'access',
|
|
1059
|
+
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(token.tokenAddress, () => ( token.address)), () => ( _optionalChain([token, 'access', _42 => _42.addresses, 'optionalAccess', _43 => _43[chainId]]))), () => ( _optionalChain([token, 'access', _44 => _44.token, 'optionalAccess', _45 => _45.address]))), () => ( _optionalChain([token, 'access', _46 => _46.token, 'optionalAccess', _47 => _47.addresses, 'optionalAccess', _48 => _48[chainId]])));
|
|
941
1060
|
}
|
|
942
1061
|
function extractArray(data, key) {
|
|
943
1062
|
if (!data || typeof data !== "object") return null;
|
|
@@ -964,14 +1083,76 @@ function extractNumericString(data, key) {
|
|
|
964
1083
|
return Number.isFinite(parsed) ? parsed : null;
|
|
965
1084
|
}
|
|
966
1085
|
|
|
967
|
-
// src/core/
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1086
|
+
// src/core/formatters.ts
|
|
1087
|
+
var currencyFormatter = new Intl.NumberFormat("en-US", {
|
|
1088
|
+
style: "currency",
|
|
1089
|
+
currency: "USD",
|
|
1090
|
+
maximumFractionDigits: 2
|
|
1091
|
+
});
|
|
1092
|
+
var tokenFormatter = new Intl.NumberFormat("en-US", {
|
|
1093
|
+
minimumFractionDigits: 2,
|
|
1094
|
+
maximumFractionDigits: 5
|
|
1095
|
+
});
|
|
1096
|
+
function isUnsupportedChainSwitchError(error) {
|
|
1097
|
+
if (!error) return false;
|
|
1098
|
+
const name = error instanceof Error ? error.name : "";
|
|
1099
|
+
const message = (error instanceof Error ? error.message : String(error)).toLowerCase();
|
|
1100
|
+
return name === "SwitchChainNotSupportedError" || message.includes("does not support programmatic chain switching") || message.includes("switch chain not supported") || message.includes("method not found") || message.includes("does not exist") || message.includes("is not available");
|
|
1101
|
+
}
|
|
1102
|
+
function formatUserError(raw) {
|
|
1103
|
+
const lower = raw.toLowerCase();
|
|
1104
|
+
if (lower.includes("user rejected") || lower.includes("user denied")) {
|
|
1105
|
+
return "Transaction cancelled";
|
|
1106
|
+
}
|
|
1107
|
+
if (lower.includes("insufficient funds")) {
|
|
1108
|
+
return "Insufficient funds for this transaction";
|
|
1109
|
+
}
|
|
1110
|
+
if (lower.includes("nonce too low") || lower.includes("nonce too high")) {
|
|
1111
|
+
return "Transaction conflict \u2014 please try again";
|
|
1112
|
+
}
|
|
1113
|
+
if (lower.includes("execution reverted")) {
|
|
1114
|
+
return "Transaction would fail on-chain";
|
|
1115
|
+
}
|
|
1116
|
+
if (lower.includes("timed out") || lower.includes("took too long")) {
|
|
1117
|
+
return "Request timed out \u2014 please try again";
|
|
1118
|
+
}
|
|
1119
|
+
if (lower.includes("econnrefused") || lower.includes("econnreset") || lower.includes("enotfound") || lower.includes("fetch failed")) {
|
|
1120
|
+
return "Service unavailable \u2014 please try again";
|
|
1121
|
+
}
|
|
1122
|
+
if (lower.includes("recent blockhash") || lower.includes("latest blockhash")) {
|
|
1123
|
+
return "Solana RPC unavailable \u2014 please retry";
|
|
1124
|
+
}
|
|
1125
|
+
if (lower.includes("network") || lower.includes("disconnected")) {
|
|
1126
|
+
return "Network error \u2014 check your connection";
|
|
1127
|
+
}
|
|
1128
|
+
if (lower.includes("rate limit") || lower.includes("429")) {
|
|
1129
|
+
return "Rate limited \u2014 please try again shortly";
|
|
1130
|
+
}
|
|
1131
|
+
let cleaned = raw;
|
|
1132
|
+
const stripMarkers = [
|
|
1133
|
+
"\n\nRequest Arguments:",
|
|
1134
|
+
"\nRaw Call Arguments:",
|
|
1135
|
+
"\nRequest body:",
|
|
1136
|
+
"\nContract Call:",
|
|
1137
|
+
"\nDocs:",
|
|
1138
|
+
"\nDetails:",
|
|
1139
|
+
"\nVersion:",
|
|
1140
|
+
"\nURL:"
|
|
1141
|
+
];
|
|
1142
|
+
for (const marker of stripMarkers) {
|
|
1143
|
+
const idx = cleaned.indexOf(marker);
|
|
1144
|
+
if (idx !== -1) {
|
|
1145
|
+
cleaned = cleaned.slice(0, idx).trim();
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
cleaned = cleaned.replace(/https?:\/\/\S+/g, "").trim();
|
|
1149
|
+
if (cleaned.length === 0) {
|
|
1150
|
+
return "An unexpected error occurred";
|
|
1151
|
+
}
|
|
1152
|
+
if (cleaned.length > 120) {
|
|
1153
|
+
return cleaned.slice(0, 120) + "...";
|
|
1154
|
+
}
|
|
1155
|
+
return cleaned;
|
|
975
1156
|
}
|
|
976
1157
|
|
|
977
1158
|
// src/core/theme.ts
|
|
@@ -1076,19 +1257,19 @@ var CUSTOM_PRIMARY_VARS = [
|
|
|
1076
1257
|
function applyTheme(element, theme) {
|
|
1077
1258
|
if (!element) return;
|
|
1078
1259
|
const parent = element.parentElement;
|
|
1079
|
-
const targets = _optionalChain([parent, 'optionalAccess',
|
|
1080
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
1260
|
+
const targets = _optionalChain([parent, 'optionalAccess', _49 => _49.classList, 'access', _50 => _50.contains, 'call', _51 => _51("rs-modal-content")]) ? [element, parent] : [element];
|
|
1261
|
+
if (_optionalChain([theme, 'optionalAccess', _52 => _52.mode])) {
|
|
1081
1262
|
for (const t of targets) t.setAttribute("data-theme", theme.mode);
|
|
1082
1263
|
} else {
|
|
1083
1264
|
for (const t of targets) t.removeAttribute("data-theme");
|
|
1084
1265
|
}
|
|
1085
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
1266
|
+
if (_optionalChain([theme, 'optionalAccess', _53 => _53.fontColor])) {
|
|
1086
1267
|
setVar(targets, "--rs-foreground", theme.fontColor);
|
|
1087
1268
|
}
|
|
1088
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
1269
|
+
if (_optionalChain([theme, 'optionalAccess', _54 => _54.iconColor])) {
|
|
1089
1270
|
setVar(targets, "--rs-icon", theme.iconColor);
|
|
1090
1271
|
}
|
|
1091
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
1272
|
+
if (_optionalChain([theme, 'optionalAccess', _55 => _55.ctaColor])) {
|
|
1092
1273
|
const derived = deriveCustomPrimary(theme.ctaColor);
|
|
1093
1274
|
if (derived) {
|
|
1094
1275
|
setVar(targets, "--rs-primary", derived.base);
|
|
@@ -1113,18 +1294,18 @@ function applyTheme(element, theme) {
|
|
|
1113
1294
|
}
|
|
1114
1295
|
} else {
|
|
1115
1296
|
for (const v of CUSTOM_PRIMARY_VARS) clearVar(targets, v);
|
|
1116
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
1297
|
+
if (_optionalChain([theme, 'optionalAccess', _56 => _56.ctaHoverColor])) {
|
|
1117
1298
|
setVar(targets, "--rs-primary-hover", theme.ctaHoverColor);
|
|
1118
1299
|
}
|
|
1119
1300
|
}
|
|
1120
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
1301
|
+
if (_optionalChain([theme, 'optionalAccess', _57 => _57.borderColor])) {
|
|
1121
1302
|
setVar(targets, "--rs-border", theme.borderColor);
|
|
1122
1303
|
setVar(targets, "--rs-border-surface", theme.borderColor);
|
|
1123
1304
|
}
|
|
1124
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
1305
|
+
if (_optionalChain([theme, 'optionalAccess', _58 => _58.backgroundColor])) {
|
|
1125
1306
|
setVar(targets, "--rs-background", theme.backgroundColor);
|
|
1126
1307
|
}
|
|
1127
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
1308
|
+
if (_optionalChain([theme, 'optionalAccess', _59 => _59.radius])) {
|
|
1128
1309
|
const scale = RADIUS_SCALE[theme.radius];
|
|
1129
1310
|
setVar(targets, "--rs-radius-sm", scale.sm);
|
|
1130
1311
|
setVar(targets, "--rs-radius-md", scale.md);
|
|
@@ -1227,6 +1408,36 @@ function PoweredBy() {
|
|
|
1227
1408
|
}
|
|
1228
1409
|
PoweredBy.displayName = "PoweredBy";
|
|
1229
1410
|
|
|
1411
|
+
// src/components/ui/Spinner.tsx
|
|
1412
|
+
|
|
1413
|
+
function Spinner({ className }) {
|
|
1414
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1415
|
+
"svg",
|
|
1416
|
+
{
|
|
1417
|
+
className: `rs-spinner ${className || ""}`,
|
|
1418
|
+
fill: "none",
|
|
1419
|
+
viewBox: "0 0 20 21",
|
|
1420
|
+
children: [
|
|
1421
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1422
|
+
"path",
|
|
1423
|
+
{
|
|
1424
|
+
d: "M10 0.5C8.02 0.5 6.08 1.08 4.44 2.18C2.79 3.28 1.51 4.84 0.76 6.67C0.00 8.50 -0.19 10.51 0.19 12.45C0.57 14.39 1.53 16.17 2.92 17.57C4.32 18.96 6.10 19.92 8.04 20.30C9.98 20.69 11.99 20.49 13.82 19.73C15.65 18.98 17.21 17.70 18.31 16.05C19.41 14.41 20 12.47 20 10.5C20 7.84 18.94 5.30 17.07 3.42C15.19 1.55 12.65 0.5 10 0.5ZM10 17.77C8.56 17.77 7.15 17.34 5.95 16.54C4.76 15.74 3.83 14.61 3.28 13.28C2.73 11.95 2.58 10.49 2.86 9.08C3.14 7.67 3.84 6.37 4.85 5.35C5.87 4.34 7.17 3.64 8.58 3.36C9.99 3.08 11.45 3.23 12.78 3.78C14.11 4.33 15.24 5.26 16.04 6.45C16.84 7.65 17.27 9.06 17.27 10.5C17.27 12.42 16.50 14.27 15.14 15.64C13.77 17.00 11.92 17.77 10 17.77Z",
|
|
1425
|
+
fill: "currentColor",
|
|
1426
|
+
opacity: 0.3
|
|
1427
|
+
}
|
|
1428
|
+
),
|
|
1429
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1430
|
+
"path",
|
|
1431
|
+
{
|
|
1432
|
+
d: "M10 3.22C11.74 3.22 13.42 3.84 14.75 4.95C16.08 6.07 16.96 7.61 17.25 9.31C17.30 9.64 17.46 9.94 17.71 10.15C17.96 10.37 18.28 10.49 18.62 10.5C18.82 10.50 19.01 10.45 19.20 10.37C19.38 10.29 19.54 10.16 19.67 10.01C19.80 9.86 19.89 9.68 19.95 9.49C20.00 9.30 20.01 9.10 19.98 8.90C19.59 6.56 18.38 4.42 16.55 2.88C14.72 1.34 12.40 0.5 10 0.5C7.59 0.5 5.27 1.34 3.44 2.88C1.61 4.42 0.40 6.56 0.01 8.90C-0.01 9.10 -0.00 9.30 0.04 9.49C0.10 9.68 0.19 9.86 0.32 10.01C0.45 10.16 0.61 10.29 0.79 10.37C0.98 10.45 1.17 10.50 1.37 10.5C1.71 10.49 2.03 10.37 2.28 10.15C2.53 9.94 2.69 9.64 2.74 9.31C3.03 7.61 3.91 6.07 5.24 4.95C6.57 3.84 8.25 3.22 10 3.22Z",
|
|
1433
|
+
fill: "currentColor"
|
|
1434
|
+
}
|
|
1435
|
+
)
|
|
1436
|
+
]
|
|
1437
|
+
}
|
|
1438
|
+
);
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1230
1441
|
// src/components/ui/ListRow.tsx
|
|
1231
1442
|
|
|
1232
1443
|
function ListRow({
|
|
@@ -1236,270 +1447,401 @@ function ListRow({
|
|
|
1236
1447
|
subtitle,
|
|
1237
1448
|
meta,
|
|
1238
1449
|
trailing,
|
|
1450
|
+
action,
|
|
1239
1451
|
className = "",
|
|
1452
|
+
onClick,
|
|
1453
|
+
disabled,
|
|
1240
1454
|
...props
|
|
1241
1455
|
}) {
|
|
1242
|
-
|
|
1456
|
+
const inner = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1457
|
+
leadingMedia ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading rs-list-row-leading--media", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: leadingMedia, alt: "" }) }) : leading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading", children: leading }) : null,
|
|
1458
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-list-row-body", children: [
|
|
1459
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-list-row-text", children: [
|
|
1460
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-title", children: title }),
|
|
1461
|
+
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-subtitle", children: subtitle })
|
|
1462
|
+
] }),
|
|
1463
|
+
action ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1464
|
+
"button",
|
|
1465
|
+
{
|
|
1466
|
+
type: "button",
|
|
1467
|
+
className: "rs-list-row-action",
|
|
1468
|
+
disabled,
|
|
1469
|
+
onClick: (e) => {
|
|
1470
|
+
e.stopPropagation();
|
|
1471
|
+
action.onClick();
|
|
1472
|
+
},
|
|
1473
|
+
children: action.label
|
|
1474
|
+
}
|
|
1475
|
+
) : meta && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-list-row-meta", children: meta })
|
|
1476
|
+
] }),
|
|
1477
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-chevron", children: _nullishCoalesce(trailing, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChevronRightIcon, {}))) })
|
|
1478
|
+
] });
|
|
1479
|
+
if (action) {
|
|
1480
|
+
const handleKey = (e) => {
|
|
1481
|
+
if (disabled) return;
|
|
1482
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
1483
|
+
e.preventDefault();
|
|
1484
|
+
_optionalChain([onClick, 'optionalCall', _60 => _60(e)]);
|
|
1485
|
+
}
|
|
1486
|
+
};
|
|
1487
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1488
|
+
"div",
|
|
1489
|
+
{
|
|
1490
|
+
className: `rs-list-row ${className}`.trim(),
|
|
1491
|
+
role: "button",
|
|
1492
|
+
tabIndex: disabled ? -1 : 0,
|
|
1493
|
+
"aria-disabled": disabled || void 0,
|
|
1494
|
+
onClick: disabled ? void 0 : (e) => _optionalChain([onClick, 'optionalCall', _61 => _61(e)]),
|
|
1495
|
+
onKeyDown: handleKey,
|
|
1496
|
+
children: inner
|
|
1497
|
+
}
|
|
1498
|
+
);
|
|
1499
|
+
}
|
|
1500
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1243
1501
|
"button",
|
|
1244
1502
|
{
|
|
1245
1503
|
type: "button",
|
|
1246
1504
|
className: `rs-list-row ${className}`.trim(),
|
|
1505
|
+
onClick,
|
|
1506
|
+
disabled,
|
|
1247
1507
|
...props,
|
|
1508
|
+
children: inner
|
|
1509
|
+
}
|
|
1510
|
+
);
|
|
1511
|
+
}
|
|
1512
|
+
ListRow.displayName = "ListRow";
|
|
1513
|
+
|
|
1514
|
+
// src/components/ui/WalletBadgeIcons/RabbyIcon.tsx
|
|
1515
|
+
|
|
1516
|
+
function RabbyIcon() {
|
|
1517
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1518
|
+
"svg",
|
|
1519
|
+
{
|
|
1520
|
+
width: "20",
|
|
1521
|
+
height: "20",
|
|
1522
|
+
viewBox: "0 0 20 20",
|
|
1523
|
+
fill: "none",
|
|
1524
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1248
1525
|
children: [
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1526
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { clipPath: "url(#rs-rabby-clip)", children: [
|
|
1527
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1528
|
+
"mask",
|
|
1529
|
+
{
|
|
1530
|
+
id: "rs-rabby-mask",
|
|
1531
|
+
style: { maskType: "luminance" },
|
|
1532
|
+
maskUnits: "userSpaceOnUse",
|
|
1533
|
+
x: "0",
|
|
1534
|
+
y: "0",
|
|
1535
|
+
width: "20",
|
|
1536
|
+
height: "20",
|
|
1537
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1538
|
+
"path",
|
|
1539
|
+
{
|
|
1540
|
+
d: "M20 10C20 4.47 15.52 0 10 0C4.47 0 0 4.47 0 10C0 15.52 4.47 20 10 20C15.52 20 20 15.52 20 10Z",
|
|
1541
|
+
fill: "white"
|
|
1542
|
+
}
|
|
1543
|
+
)
|
|
1544
|
+
}
|
|
1545
|
+
),
|
|
1546
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { mask: "url(#rs-rabby-mask)", children: [
|
|
1547
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1548
|
+
"path",
|
|
1549
|
+
{
|
|
1550
|
+
d: "M20 10C20 4.47 15.52 0 10 0C4.47 0 0 4.47 0 10C0 15.52 4.47 20 10 20C15.52 20 20 15.52 20 10Z",
|
|
1551
|
+
fill: "#7084FF"
|
|
1552
|
+
}
|
|
1553
|
+
),
|
|
1554
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1555
|
+
"path",
|
|
1556
|
+
{
|
|
1557
|
+
d: "M17.25 10.86C17.82 9.57 14.98 5.97 12.26 4.47C10.55 3.31 8.77 3.47 8.41 3.98C7.62 5.10 11.03 6.05 13.32 7.16C12.83 7.37 12.36 7.76 12.09 8.25C11.24 7.31 9.37 6.51 7.18 7.16C5.70 7.59 4.47 8.62 3.99 10.18C3.85 10.11 3.70 10.09 3.54 10.10C3.39 10.11 3.24 10.16 3.11 10.25C2.98 10.33 2.87 10.45 2.80 10.58C2.72 10.72 2.69 10.87 2.69 11.03C2.69 11.55 3.10 11.96 3.62 11.96C3.71 11.96 4.01 11.90 4.01 11.90L8.77 11.93C6.87 14.96 5.36 15.41 5.36 15.93C5.36 16.46 6.80 16.32 7.34 16.12C9.93 15.18 12.71 12.26 13.19 11.42C15.19 11.67 16.87 11.70 17.25 10.86Z",
|
|
1558
|
+
fill: "url(#rs-rabby-grad0)"
|
|
1559
|
+
}
|
|
1560
|
+
),
|
|
1561
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1562
|
+
"path",
|
|
1563
|
+
{
|
|
1564
|
+
fillRule: "evenodd",
|
|
1565
|
+
clipRule: "evenodd",
|
|
1566
|
+
d: "M13.31 7.15L13.32 7.16C13.42 7.11 13.41 6.96 13.38 6.83C13.31 6.55 12.16 5.41 11.07 4.90C9.60 4.20 8.51 4.23 8.35 4.56C8.65 5.18 10.04 5.76 11.50 6.36C12.12 6.62 12.75 6.88 13.31 7.15Z",
|
|
1567
|
+
fill: "url(#rs-rabby-grad1)"
|
|
1568
|
+
}
|
|
1569
|
+
),
|
|
1570
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1571
|
+
"path",
|
|
1572
|
+
{
|
|
1573
|
+
fillRule: "evenodd",
|
|
1574
|
+
clipRule: "evenodd",
|
|
1575
|
+
d: "M11.45 13.38C11.11 13.26 10.77 13.15 10.43 13.07C10.84 12.33 10.92 11.25 10.54 10.56C10.00 9.60 9.32 9.08 7.73 9.08C6.87 9.08 4.53 9.38 4.48 11.34C4.48 11.54 4.48 11.73 4.50 11.90L8.77 11.93C8.20 12.85 7.66 13.53 7.18 14.05C7.75 14.19 8.22 14.32 8.65 14.43C9.06 14.54 9.43 14.63 9.82 14.73C10.41 14.30 10.96 13.83 11.45 13.38Z",
|
|
1576
|
+
fill: "url(#rs-rabby-grad2)"
|
|
1577
|
+
}
|
|
1578
|
+
),
|
|
1579
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1580
|
+
"path",
|
|
1581
|
+
{
|
|
1582
|
+
d: "M3.94 11.70C4.11 13.19 4.96 13.77 6.68 13.94C8.40 14.12 9.39 14.00 10.71 14.12C11.81 14.22 12.79 14.78 13.15 14.59C13.48 14.42 13.30 13.78 12.86 13.38C12.29 12.85 11.50 12.49 10.12 12.36C10.39 11.60 10.32 10.54 9.89 9.96C9.27 9.12 8.13 8.75 6.68 8.91C5.17 9.08 3.72 9.83 3.94 11.70Z",
|
|
1583
|
+
fill: "url(#rs-rabby-grad3)"
|
|
1584
|
+
}
|
|
1585
|
+
)
|
|
1586
|
+
] })
|
|
1256
1587
|
] }),
|
|
1257
|
-
/* @__PURE__ */ _jsxruntime.
|
|
1588
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "defs", { children: [
|
|
1589
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1590
|
+
"linearGradient",
|
|
1591
|
+
{
|
|
1592
|
+
id: "rs-rabby-grad0",
|
|
1593
|
+
x1: "7.00",
|
|
1594
|
+
y1: "9.72",
|
|
1595
|
+
x2: "17.13",
|
|
1596
|
+
y2: "12.58",
|
|
1597
|
+
gradientUnits: "userSpaceOnUse",
|
|
1598
|
+
children: [
|
|
1599
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "white" }),
|
|
1600
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "white" })
|
|
1601
|
+
]
|
|
1602
|
+
}
|
|
1603
|
+
),
|
|
1604
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1605
|
+
"linearGradient",
|
|
1606
|
+
{
|
|
1607
|
+
id: "rs-rabby-grad1",
|
|
1608
|
+
x1: "15.42",
|
|
1609
|
+
y1: "9.53",
|
|
1610
|
+
x2: "8.09",
|
|
1611
|
+
y2: "2.21",
|
|
1612
|
+
gradientUnits: "userSpaceOnUse",
|
|
1613
|
+
children: [
|
|
1614
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "#8697FF" }),
|
|
1615
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "#8697FF", stopOpacity: "0" })
|
|
1616
|
+
]
|
|
1617
|
+
}
|
|
1618
|
+
),
|
|
1619
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1620
|
+
"linearGradient",
|
|
1621
|
+
{
|
|
1622
|
+
id: "rs-rabby-grad2",
|
|
1623
|
+
x1: "11.65",
|
|
1624
|
+
y1: "13.64",
|
|
1625
|
+
x2: "4.63",
|
|
1626
|
+
y2: "9.61",
|
|
1627
|
+
gradientUnits: "userSpaceOnUse",
|
|
1628
|
+
children: [
|
|
1629
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "#8697FF" }),
|
|
1630
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "#8697FF", stopOpacity: "0" })
|
|
1631
|
+
]
|
|
1632
|
+
}
|
|
1633
|
+
),
|
|
1634
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1635
|
+
"linearGradient",
|
|
1636
|
+
{
|
|
1637
|
+
id: "rs-rabby-grad3",
|
|
1638
|
+
x1: "7.61",
|
|
1639
|
+
y1: "9.64",
|
|
1640
|
+
x2: "12.37",
|
|
1641
|
+
y2: "15.67",
|
|
1642
|
+
gradientUnits: "userSpaceOnUse",
|
|
1643
|
+
children: [
|
|
1644
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "white" }),
|
|
1645
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "0.98", stopColor: "#D1D8FF" })
|
|
1646
|
+
]
|
|
1647
|
+
}
|
|
1648
|
+
),
|
|
1649
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "clipPath", { id: "rs-rabby-clip", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "20", height: "20", fill: "white" }) })
|
|
1650
|
+
] })
|
|
1258
1651
|
]
|
|
1259
1652
|
}
|
|
1260
1653
|
);
|
|
1261
1654
|
}
|
|
1262
|
-
ListRow.displayName = "ListRow";
|
|
1263
1655
|
|
|
1264
|
-
// src/components/ui/WalletBadgeIcons.tsx
|
|
1656
|
+
// src/components/ui/WalletBadgeIcons/PhantomIcon.tsx
|
|
1265
1657
|
|
|
1266
|
-
|
|
1267
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1658
|
+
function PhantomIcon() {
|
|
1659
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1660
|
+
"svg",
|
|
1661
|
+
{
|
|
1662
|
+
width: "20",
|
|
1663
|
+
height: "20",
|
|
1664
|
+
viewBox: "0 0 20 20",
|
|
1665
|
+
fill: "none",
|
|
1666
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1667
|
+
children: [
|
|
1668
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1669
|
+
"path",
|
|
1670
|
+
{
|
|
1671
|
+
d: "M15.18 0H4.81C2.15 0 0 2.15 0 4.81V15.18C0 17.84 2.15 20 4.81 20H15.18C17.84 20 20 17.84 20 15.18V4.81C20 2.15 17.84 0 15.18 0Z",
|
|
1672
|
+
fill: "#AB9FF2"
|
|
1673
|
+
}
|
|
1674
|
+
),
|
|
1675
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1279
1676
|
"path",
|
|
1280
1677
|
{
|
|
1281
|
-
|
|
1282
|
-
|
|
1678
|
+
fillRule: "evenodd",
|
|
1679
|
+
clipRule: "evenodd",
|
|
1680
|
+
d: "M8.61 12.94C7.77 14.23 6.37 15.85 4.50 15.85C3.62 15.85 2.77 15.49 2.77 13.91C2.77 9.89 8.26 3.67 13.35 3.67C16.25 3.67 17.40 5.68 17.40 7.96C17.40 10.89 15.50 14.24 13.61 14.24C13.01 14.24 12.72 13.91 12.72 13.39C12.72 13.25 12.74 13.10 12.79 12.94C12.14 14.04 10.90 15.07 9.73 15.07C8.88 15.07 8.45 14.53 8.45 13.78C8.45 13.51 8.51 13.23 8.61 12.94ZM15.49 7.88C15.49 8.54 15.10 8.88 14.66 8.88C14.21 8.88 13.83 8.54 13.83 7.88C13.83 7.21 14.21 6.88 14.66 6.88C15.10 6.88 15.49 7.22 15.49 7.88ZM13.00 7.88C13.00 8.54 12.60 8.88 12.17 8.88C11.72 8.88 11.33 8.54 11.33 7.88C11.33 7.22 11.72 6.88 12.17 6.88C12.60 6.88 13.00 7.22 13.00 7.88",
|
|
1681
|
+
fill: "#FFFDF8"
|
|
1283
1682
|
}
|
|
1284
1683
|
)
|
|
1285
|
-
|
|
1286
|
-
),
|
|
1287
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { mask: "url(#rs-rabby-mask)", children: [
|
|
1288
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1289
|
-
"path",
|
|
1290
|
-
{
|
|
1291
|
-
d: "M20 10C20 4.47688 15.5231 0 10 0C4.47688 0 0 4.47688 0 10C0 15.5231 4.47688 20 10 20C15.5231 20 20 15.5231 20 10Z",
|
|
1292
|
-
fill: "#7084FF"
|
|
1293
|
-
}
|
|
1294
|
-
),
|
|
1295
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1296
|
-
"path",
|
|
1297
|
-
{
|
|
1298
|
-
d: "M17.2515 10.8675C17.8265 9.57871 14.9847 5.97871 12.2697 4.47934C10.5584 3.31684 8.77529 3.47684 8.41404 3.98684C7.62154 5.10684 11.039 6.05559 13.3234 7.16184C12.8322 7.37621 12.3697 7.76059 12.0972 8.25184C11.2453 7.31871 9.37529 6.51434 7.18154 7.16246C5.70279 7.59871 4.47404 8.62684 3.99904 10.18C3.85708 10.1175 3.70178 10.0914 3.5472 10.1041C3.39262 10.1168 3.24365 10.1678 3.11376 10.2526C2.98388 10.3373 2.87719 10.4532 2.80336 10.5896C2.72952 10.726 2.69088 10.8786 2.69092 11.0337C2.69092 11.55 3.10717 11.9681 3.62154 11.9681C3.71654 11.9681 4.01467 11.9037 4.01467 11.9037L8.77529 11.9387C6.87154 14.9687 5.36654 15.4118 5.36654 15.9368C5.36654 16.4618 6.80654 16.32 7.34717 16.1243C9.93467 15.1868 12.714 12.2675 13.1909 11.4268C15.1934 11.6775 16.8765 11.7075 17.2515 10.8675Z",
|
|
1299
|
-
fill: "url(#rs-rabby-grad0)"
|
|
1300
|
-
}
|
|
1301
|
-
),
|
|
1302
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1303
|
-
"path",
|
|
1304
|
-
{
|
|
1305
|
-
fillRule: "evenodd",
|
|
1306
|
-
clipRule: "evenodd",
|
|
1307
|
-
d: "M13.3147 7.15865L13.3216 7.16177C13.4279 7.1199 13.4104 6.96302 13.3816 6.8399C13.3147 6.55615 12.161 5.41365 11.0779 4.90177C9.60224 4.20427 8.51536 4.2399 8.35474 4.56177C8.65474 5.18052 10.0485 5.76052 11.5047 6.3674C12.1235 6.6249 12.7529 6.88677 13.3147 7.15865Z",
|
|
1308
|
-
fill: "url(#rs-rabby-grad1)"
|
|
1309
|
-
}
|
|
1310
|
-
),
|
|
1311
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1312
|
-
"path",
|
|
1313
|
-
{
|
|
1314
|
-
fillRule: "evenodd",
|
|
1315
|
-
clipRule: "evenodd",
|
|
1316
|
-
d: "M11.4522 13.3856C11.1193 13.26 10.7791 13.1548 10.4335 13.0706C10.8422 12.3369 10.9278 11.2506 10.5416 10.5644C10.0003 9.60001 9.32033 9.08688 7.73971 9.08688C6.87096 9.08688 4.53096 9.38063 4.48971 11.3406C4.48471 11.5456 4.4895 11.7346 4.50408 11.9075L8.77721 11.9388C8.20096 12.8556 7.66158 13.5363 7.18908 14.0531C7.75596 14.1994 8.22408 14.3219 8.65408 14.4344C9.06158 14.5406 9.43471 14.6381 9.82471 14.7381C10.4141 14.3069 10.9685 13.8381 11.4522 13.3856Z",
|
|
1317
|
-
fill: "url(#rs-rabby-grad2)"
|
|
1318
|
-
}
|
|
1319
|
-
),
|
|
1320
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1321
|
-
"path",
|
|
1322
|
-
{
|
|
1323
|
-
d: "M3.94351 11.7048C4.11789 13.1936 4.96101 13.7773 6.68476 13.9498C8.40851 14.1223 9.39664 14.0067 10.7123 14.1273C11.8116 14.2273 12.7929 14.7898 13.1573 14.5954C13.4848 14.4204 13.301 13.7892 12.8629 13.3836C12.2941 12.8586 11.5079 12.4936 10.1241 12.3642C10.3998 11.6061 10.3223 10.5436 9.89414 9.96543C9.27476 9.1298 8.13164 8.7523 6.68476 8.9173C5.17226 9.0898 3.72414 9.83605 3.94351 11.7048Z",
|
|
1324
|
-
fill: "url(#rs-rabby-grad3)"
|
|
1325
|
-
}
|
|
1326
|
-
)
|
|
1327
|
-
] })
|
|
1328
|
-
] }),
|
|
1329
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "defs", { children: [
|
|
1330
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1331
|
-
"linearGradient",
|
|
1332
|
-
{
|
|
1333
|
-
id: "rs-rabby-grad0",
|
|
1334
|
-
x1: "7.00904",
|
|
1335
|
-
y1: "9.72621",
|
|
1336
|
-
x2: "17.1328",
|
|
1337
|
-
y2: "12.5875",
|
|
1338
|
-
gradientUnits: "userSpaceOnUse",
|
|
1339
|
-
children: [
|
|
1340
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "white" }),
|
|
1341
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "white" })
|
|
1342
|
-
]
|
|
1343
|
-
}
|
|
1344
|
-
),
|
|
1345
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1346
|
-
"linearGradient",
|
|
1347
|
-
{
|
|
1348
|
-
id: "rs-rabby-grad1",
|
|
1349
|
-
x1: "15.4216",
|
|
1350
|
-
y1: "9.5324",
|
|
1351
|
-
x2: "8.09661",
|
|
1352
|
-
y2: "2.21365",
|
|
1353
|
-
gradientUnits: "userSpaceOnUse",
|
|
1354
|
-
children: [
|
|
1355
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "#8697FF" }),
|
|
1356
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "#8697FF", stopOpacity: "0" })
|
|
1357
|
-
]
|
|
1358
|
-
}
|
|
1359
|
-
),
|
|
1360
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1361
|
-
"linearGradient",
|
|
1362
|
-
{
|
|
1363
|
-
id: "rs-rabby-grad2",
|
|
1364
|
-
x1: "11.6553",
|
|
1365
|
-
y1: "13.6413",
|
|
1366
|
-
x2: "4.63033",
|
|
1367
|
-
y2: "9.61626",
|
|
1368
|
-
gradientUnits: "userSpaceOnUse",
|
|
1369
|
-
children: [
|
|
1370
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "#8697FF" }),
|
|
1371
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "#8697FF", stopOpacity: "0" })
|
|
1372
|
-
]
|
|
1373
|
-
}
|
|
1374
|
-
),
|
|
1375
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1376
|
-
"linearGradient",
|
|
1377
|
-
{
|
|
1378
|
-
id: "rs-rabby-grad3",
|
|
1379
|
-
x1: "7.61476",
|
|
1380
|
-
y1: "9.64918",
|
|
1381
|
-
x2: "12.3748",
|
|
1382
|
-
y2: "15.6773",
|
|
1383
|
-
gradientUnits: "userSpaceOnUse",
|
|
1384
|
-
children: [
|
|
1385
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "white" }),
|
|
1386
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "0.984", stopColor: "#D1D8FF" })
|
|
1387
|
-
]
|
|
1388
|
-
}
|
|
1389
|
-
),
|
|
1390
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "clipPath", { id: "rs-rabby-clip", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "20", height: "20", fill: "white" }) })
|
|
1391
|
-
] })
|
|
1392
|
-
] });
|
|
1393
|
-
var PhantomIcon = () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1394
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1395
|
-
"path",
|
|
1396
|
-
{
|
|
1397
|
-
d: "M15.1852 0H4.81481C2.15567 0 0 2.15567 0 4.81481V15.1852C0 17.8443 2.15567 20 4.81481 20H15.1852C17.8443 20 20 17.8443 20 15.1852V4.81481C20 2.15567 17.8443 0 15.1852 0Z",
|
|
1398
|
-
fill: "#AB9FF2"
|
|
1399
|
-
}
|
|
1400
|
-
),
|
|
1401
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1402
|
-
"path",
|
|
1403
|
-
{
|
|
1404
|
-
fillRule: "evenodd",
|
|
1405
|
-
clipRule: "evenodd",
|
|
1406
|
-
d: "M8.61617 12.9486C7.77876 14.2315 6.37579 15.855 4.50894 15.855C3.62635 15.855 2.77783 15.4917 2.77783 13.9136C2.77783 9.89449 8.26542 3.67264 13.3569 3.67264C16.2534 3.67264 17.4075 5.68227 17.4075 7.9643C17.4075 10.8936 15.5067 14.2428 13.6171 14.2428C13.0175 14.2428 12.7232 13.9136 12.7232 13.3913C12.7232 13.255 12.7459 13.1075 12.7912 12.9486C12.1462 14.0499 10.9015 15.0717 9.73617 15.0717C8.88765 15.0717 8.45765 14.538 8.45765 13.7887C8.45765 13.5162 8.51431 13.2325 8.61617 12.9486ZM15.4958 7.88486C15.4958 8.54986 15.1032 8.88245 14.6643 8.88245C14.2189 8.88245 13.8332 8.54986 13.8332 7.88486C13.8332 7.21986 14.2189 6.88745 14.6645 6.88745C15.1034 6.88745 15.4958 7.22004 15.4958 7.88486ZM13.0017 7.88486C13.0017 8.54986 12.6095 8.88245 12.1706 8.88245C11.7251 8.88245 11.3393 8.54986 11.3393 7.88505C11.3393 7.22005 11.7251 6.88745 12.1706 6.88745C12.6095 6.88745 13.0017 7.22005 13.0017 7.88505",
|
|
1407
|
-
fill: "#FFFDF8"
|
|
1408
|
-
}
|
|
1409
|
-
)
|
|
1410
|
-
] });
|
|
1411
|
-
var WalletConnectIcon = () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1412
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "20", height: "20", rx: "2.5", fill: "#3B99FC" }),
|
|
1413
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1414
|
-
"path",
|
|
1415
|
-
{
|
|
1416
|
-
d: "M6.18 7.96a5.36 5.36 0 0 1 7.64 0l.25.26a.26.26 0 0 1 0 .37l-.87.87a.13.13 0 0 1-.19 0l-.35-.35a3.74 3.74 0 0 0-5.32 0l-.38.37a.13.13 0 0 1-.19 0l-.86-.86a.26.26 0 0 1 0-.37l.27-.29Zm9.43 1.79.78.78a.26.26 0 0 1 0 .37l-3.54 3.54a.26.26 0 0 1-.37 0l-2.51-2.5a.07.07 0 0 0-.09 0l-2.51 2.5a.26.26 0 0 1-.37 0L3.46 10.9a.26.26 0 0 1 0-.37l.78-.78a.26.26 0 0 1 .37 0l2.5 2.5a.07.07 0 0 0 .1 0L9.72 9.75a.26.26 0 0 1 .37 0l2.5 2.5a.07.07 0 0 0 .1 0l2.5-2.5a.26.26 0 0 1 .37 0Z",
|
|
1417
|
-
fill: "#fff"
|
|
1684
|
+
]
|
|
1418
1685
|
}
|
|
1419
|
-
)
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1686
|
+
);
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
// src/components/ui/WalletBadgeIcons/WalletConnectIcon.tsx
|
|
1690
|
+
|
|
1691
|
+
function WalletConnectIcon() {
|
|
1692
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1693
|
+
"svg",
|
|
1424
1694
|
{
|
|
1425
|
-
|
|
1426
|
-
|
|
1695
|
+
width: "20",
|
|
1696
|
+
height: "20",
|
|
1697
|
+
viewBox: "0 0 20 20",
|
|
1698
|
+
fill: "none",
|
|
1699
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1700
|
+
children: [
|
|
1701
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "20", height: "20", rx: "2.5", fill: "#3B99FC" }),
|
|
1702
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1703
|
+
"path",
|
|
1704
|
+
{
|
|
1705
|
+
d: "M6.18 7.96a5.36 5.36 0 0 1 7.64 0l.25.26a.26.26 0 0 1 0 .37l-.87.87a.13.13 0 0 1-.19 0l-.35-.35a3.74 3.74 0 0 0-5.32 0l-.38.37a.13.13 0 0 1-.19 0l-.86-.86a.26.26 0 0 1 0-.37l.27-.29Zm9.43 1.79.78.78a.26.26 0 0 1 0 .37l-3.54 3.54a.26.26 0 0 1-.37 0l-2.51-2.5a.07.07 0 0 0-.09 0l-2.51 2.5a.26.26 0 0 1-.37 0L3.46 10.9a.26.26 0 0 1 0-.37l.78-.78a.26.26 0 0 1 .37 0l2.5 2.5a.07.07 0 0 0 .1 0L9.72 9.75a.26.26 0 0 1 .37 0l2.5 2.5a.07.07 0 0 0 .1 0l2.5-2.5a.26.26 0 0 1 .37 0Z",
|
|
1706
|
+
fill: "#fff"
|
|
1707
|
+
}
|
|
1708
|
+
)
|
|
1709
|
+
]
|
|
1427
1710
|
}
|
|
1428
|
-
)
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
/* @__PURE__ */ _jsxruntime.
|
|
1435
|
-
|
|
1436
|
-
var SolBadgeIcon = () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1437
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "20", height: "20", rx: "10", fill: "#0C0C0C" }),
|
|
1438
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1439
|
-
"path",
|
|
1711
|
+
);
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
// src/components/ui/WalletBadgeIcons/EthBadgeIcon.tsx
|
|
1715
|
+
|
|
1716
|
+
function EthBadgeIcon() {
|
|
1717
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1718
|
+
"svg",
|
|
1440
1719
|
{
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
fill: "
|
|
1720
|
+
width: "20",
|
|
1721
|
+
height: "20",
|
|
1722
|
+
viewBox: "0 0 20 20",
|
|
1723
|
+
fill: "none",
|
|
1724
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1725
|
+
children: [
|
|
1726
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1727
|
+
"path",
|
|
1728
|
+
{
|
|
1729
|
+
d: "M9.99 19.93C15.48 19.93 19.93 15.48 19.93 9.99C19.93 4.51 15.48 0.06 9.99 0.06C4.51 0.06 0.06 4.51 0.06 9.99C0.06 15.48 4.51 19.93 9.99 19.93Z",
|
|
1730
|
+
fill: "#E3E3E3"
|
|
1731
|
+
}
|
|
1732
|
+
),
|
|
1733
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10.00 2.18L14.69 9.99L10.02 7.98L10.00 2.18Z", fill: "#2F3030" }),
|
|
1734
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M5.31 9.99L9.98 2.18L10.00 7.98L5.31 9.99Z", fill: "#828384" }),
|
|
1735
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M9.98 12.80L5.31 10.04L10.00 8.11L9.98 12.80Z", fill: "#343535" }),
|
|
1736
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M14.69 10.04L10.02 8.11L10.00 12.80L14.69 10.04Z", fill: "#131313" }),
|
|
1737
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10.00 14.00L14.69 11.24L10.00 17.80V14.00Z", fill: "#2F3030" }),
|
|
1738
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10.00 14.00L5.31 11.24L10.00 17.80V14.00Z", fill: "#828384" })
|
|
1739
|
+
]
|
|
1445
1740
|
}
|
|
1446
|
-
)
|
|
1447
|
-
|
|
1448
|
-
|
|
1741
|
+
);
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
// src/components/ui/WalletBadgeIcons/SolBadgeIcon.tsx
|
|
1745
|
+
|
|
1746
|
+
function SolBadgeIcon() {
|
|
1747
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1748
|
+
"svg",
|
|
1449
1749
|
{
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
gradientUnits: "userSpaceOnUse",
|
|
1750
|
+
width: "20",
|
|
1751
|
+
height: "20",
|
|
1752
|
+
viewBox: "0 0 20 20",
|
|
1753
|
+
fill: "none",
|
|
1754
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1456
1755
|
children: [
|
|
1457
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "
|
|
1458
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1756
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "20", height: "20", rx: "10", fill: "#0C0C0C" }),
|
|
1757
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1758
|
+
"path",
|
|
1759
|
+
{
|
|
1760
|
+
fillRule: "evenodd",
|
|
1761
|
+
clipRule: "evenodd",
|
|
1762
|
+
d: "M4.62 9.04H13.87C13.99 9.04 14.10 9.08 14.18 9.17L15.64 10.64C15.91 10.91 15.72 11.38 15.34 11.38H6.08C5.97 11.38 5.86 11.33 5.78 11.25L4.31 9.78C4.04 9.51 4.23 9.04 4.62 9.04ZM4.31 7.09L5.77 5.62C5.86 5.53 5.97 5.49 6.08 5.49H15.33C15.71 5.49 15.91 5.95 15.63 6.22L14.17 7.70C14.09 7.78 13.98 7.82 13.87 7.82H4.62C4.23 7.82 4.04 7.36 4.31 7.09ZM15.64 13.34L14.17 14.81C14.09 14.89 13.98 14.94 13.87 14.94H4.62C4.23 14.94 4.04 14.48 4.31 14.20L5.77 12.73C5.86 12.65 5.97 12.60 6.08 12.60H15.33C15.72 12.6 15.91 13.06 15.64 13.34Z",
|
|
1763
|
+
fill: "url(#rs-sol-badge-grad)"
|
|
1764
|
+
}
|
|
1765
|
+
),
|
|
1766
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "defs", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1767
|
+
"linearGradient",
|
|
1768
|
+
{
|
|
1769
|
+
id: "rs-sol-badge-grad",
|
|
1770
|
+
x1: "4.85",
|
|
1771
|
+
y1: "15.34",
|
|
1772
|
+
x2: "15.11",
|
|
1773
|
+
y2: "5.08",
|
|
1774
|
+
gradientUnits: "userSpaceOnUse",
|
|
1775
|
+
children: [
|
|
1776
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "#CB4EE8" }),
|
|
1777
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "#10F4B1" })
|
|
1778
|
+
]
|
|
1779
|
+
}
|
|
1780
|
+
) })
|
|
1459
1781
|
]
|
|
1460
1782
|
}
|
|
1461
|
-
)
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1783
|
+
);
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
// src/components/ui/WalletBadgeIcons/BaseBadgeIcon.tsx
|
|
1787
|
+
|
|
1788
|
+
function BaseBadgeIcon() {
|
|
1789
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1790
|
+
"svg",
|
|
1467
1791
|
{
|
|
1468
|
-
|
|
1469
|
-
|
|
1792
|
+
width: "20",
|
|
1793
|
+
height: "20",
|
|
1794
|
+
viewBox: "0 0 111 111",
|
|
1795
|
+
fill: "none",
|
|
1796
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1797
|
+
children: [
|
|
1798
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "55.5", cy: "55.5", r: "55.5", fill: "#0052FF" }),
|
|
1799
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1800
|
+
"path",
|
|
1801
|
+
{
|
|
1802
|
+
d: "M54.92 93.4c20.94 0 37.92-16.97 37.92-37.92S75.86 17.55 54.92 17.55c-19.49 0-35.57 14.72-37.65 33.64h49.82v5.54h-49.82C19.35 75.67 35.42 93.4 54.92 93.4z",
|
|
1803
|
+
fill: "#fff"
|
|
1804
|
+
}
|
|
1805
|
+
)
|
|
1806
|
+
]
|
|
1470
1807
|
}
|
|
1471
|
-
)
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletConnectIcon, {}) })
|
|
1477
|
-
] });
|
|
1478
|
-
var chainBadge = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-list-row-meta-icons", children: [
|
|
1479
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EthBadgeIcon, {}) }),
|
|
1480
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SolBadgeIcon, {}) }),
|
|
1481
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BaseBadgeIcon, {}) })
|
|
1482
|
-
] });
|
|
1808
|
+
);
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
// src/components/ui/WalletBadgeIcons/index.tsx
|
|
1812
|
+
|
|
1483
1813
|
function WalletBadgeIcons() {
|
|
1484
|
-
return
|
|
1814
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-list-row-meta-icons", children: [
|
|
1815
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RabbyIcon, {}) }),
|
|
1816
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PhantomIcon, {}) }),
|
|
1817
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletConnectIcon, {}) })
|
|
1818
|
+
] });
|
|
1485
1819
|
}
|
|
1486
1820
|
WalletBadgeIcons.displayName = "WalletBadgeIcons";
|
|
1487
1821
|
function ChainBadgeIcons() {
|
|
1488
|
-
return
|
|
1822
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-list-row-meta-icons", children: [
|
|
1823
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EthBadgeIcon, {}) }),
|
|
1824
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SolBadgeIcon, {}) }),
|
|
1825
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BaseBadgeIcon, {}) })
|
|
1826
|
+
] });
|
|
1489
1827
|
}
|
|
1490
1828
|
ChainBadgeIcons.displayName = "ChainBadgeIcons";
|
|
1491
1829
|
|
|
1492
1830
|
// src/components/steps/ConnectStep.tsx
|
|
1493
1831
|
|
|
1832
|
+
function formatBalanceUsd(value) {
|
|
1833
|
+
if (!Number.isFinite(value) || value <= 0) return "$0.00";
|
|
1834
|
+
return `$${value.toFixed(2)}`;
|
|
1835
|
+
}
|
|
1494
1836
|
function shorten(addr) {
|
|
1495
1837
|
return addr.length > 12 ? `${addr.slice(0, 6)}...${addr.slice(-4)}` : addr;
|
|
1496
1838
|
}
|
|
1497
|
-
function renderWalletLeading(
|
|
1498
|
-
if (
|
|
1839
|
+
function renderWalletLeading(row) {
|
|
1840
|
+
if (row.icon) {
|
|
1499
1841
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1500
1842
|
"img",
|
|
1501
1843
|
{
|
|
1502
|
-
src:
|
|
1844
|
+
src: row.icon,
|
|
1503
1845
|
alt: "",
|
|
1504
1846
|
style: { width: 24, height: 24, borderRadius: 6 }
|
|
1505
1847
|
}
|
|
@@ -1507,26 +1849,44 @@ function renderWalletLeading(option) {
|
|
|
1507
1849
|
}
|
|
1508
1850
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {});
|
|
1509
1851
|
}
|
|
1852
|
+
var TRANSFER_CRYPTO_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TransferCryptoIcon, {});
|
|
1853
|
+
var WALLET_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {});
|
|
1854
|
+
var SMALL_SPINNER = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Spinner, { className: "rs-spinner--sm" });
|
|
1855
|
+
var CONNECT_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1856
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletBadgeIcons, {}),
|
|
1857
|
+
"+100 wallets"
|
|
1858
|
+
] });
|
|
1859
|
+
var EXTRA_CHAIN_COUNT = Math.max(0, _chunk7JIDIX27cjs.getSupportedChainIds.call(void 0, ).length - 3);
|
|
1860
|
+
var CHAIN_BADGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1861
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
|
|
1862
|
+
EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT} chains` : "All chains"
|
|
1863
|
+
] });
|
|
1864
|
+
function renderRowTrailing(state) {
|
|
1865
|
+
if (state === "loading") {
|
|
1866
|
+
return SMALL_SPINNER;
|
|
1867
|
+
}
|
|
1868
|
+
return void 0;
|
|
1869
|
+
}
|
|
1510
1870
|
function ConnectStep({
|
|
1511
|
-
|
|
1871
|
+
walletRows,
|
|
1512
1872
|
onConfirmWallet,
|
|
1513
1873
|
onSelectTransferCrypto,
|
|
1874
|
+
transferCryptoState,
|
|
1875
|
+
transferCryptoErrorReason,
|
|
1514
1876
|
onRequestConnect,
|
|
1515
1877
|
onConnect,
|
|
1516
1878
|
onDisconnect,
|
|
1879
|
+
dappImports,
|
|
1880
|
+
onSelectDappImport,
|
|
1517
1881
|
title = "Deposit",
|
|
1518
1882
|
subtitle
|
|
1519
1883
|
}) {
|
|
1520
|
-
const
|
|
1884
|
+
const rows = _nullishCoalesce(walletRows, () => ( []));
|
|
1521
1885
|
const handleConnect = _nullishCoalesce(onConnect, () => ( onRequestConnect));
|
|
1522
|
-
const hasReownWallet =
|
|
1523
|
-
(
|
|
1886
|
+
const hasReownWallet = rows.some(
|
|
1887
|
+
(row) => row.kind === "external" || row.kind === "solana"
|
|
1524
1888
|
);
|
|
1525
|
-
const
|
|
1526
|
-
const chainBadge2 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1527
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
|
|
1528
|
-
extraChainCount > 0 ? `+${extraChainCount} chains` : "All chains"
|
|
1529
|
-
] });
|
|
1889
|
+
const showDappImports = (_nullishCoalesce(_optionalChain([dappImports, 'optionalAccess', _62 => _62.length]), () => ( 0))) > 0;
|
|
1530
1890
|
const defaultSubtitle = onSelectTransferCrypto ? "Add money to your balance" : "Choose a wallet to continue";
|
|
1531
1891
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
1532
1892
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
@@ -1542,39 +1902,103 @@ function ConnectStep({
|
|
|
1542
1902
|
onSelectTransferCrypto && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1543
1903
|
ListRow,
|
|
1544
1904
|
{
|
|
1545
|
-
leading:
|
|
1905
|
+
leading: TRANSFER_CRYPTO_LEADING,
|
|
1546
1906
|
title: "Transfer crypto",
|
|
1547
|
-
subtitle: "Instant - No limit",
|
|
1548
|
-
meta:
|
|
1549
|
-
onClick: onSelectTransferCrypto
|
|
1907
|
+
subtitle: transferCryptoState === "loading" ? "Preparing\u2026" : transferCryptoState === "error" ? _nullishCoalesce(transferCryptoErrorReason, () => ( "Couldn't prepare account \u2014 tap to retry")) : "Instant - No limit",
|
|
1908
|
+
meta: CHAIN_BADGE_META,
|
|
1909
|
+
onClick: onSelectTransferCrypto,
|
|
1910
|
+
disabled: transferCryptoState === "loading",
|
|
1911
|
+
trailing: transferCryptoState === "loading" ? SMALL_SPINNER : void 0
|
|
1550
1912
|
}
|
|
1551
1913
|
),
|
|
1552
|
-
|
|
1553
|
-
const
|
|
1914
|
+
rows.map((row) => {
|
|
1915
|
+
const collapseToExternal = Boolean(onSelectTransferCrypto) && row.kind !== "solana";
|
|
1916
|
+
const subtitleText = row.state === "loading" ? "Preparing\u2026" : row.state === "error" ? _nullishCoalesce(row.errorReason, () => ( "Couldn't prepare wallet \u2014 tap to retry")) : shorten(row.address);
|
|
1554
1917
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1555
1918
|
ListRow,
|
|
1556
1919
|
{
|
|
1557
|
-
leading: renderWalletLeading(
|
|
1558
|
-
title:
|
|
1559
|
-
subtitle:
|
|
1560
|
-
onClick: () => _optionalChain([onConfirmWallet, 'optionalCall',
|
|
1920
|
+
leading: renderWalletLeading(row),
|
|
1921
|
+
title: collapseToExternal ? "External wallet" : row.label,
|
|
1922
|
+
subtitle: subtitleText,
|
|
1923
|
+
onClick: () => _optionalChain([onConfirmWallet, 'optionalCall', _63 => _63(row.id)]),
|
|
1924
|
+
disabled: row.state === "loading",
|
|
1925
|
+
trailing: renderRowTrailing(row.state)
|
|
1561
1926
|
},
|
|
1562
|
-
|
|
1927
|
+
row.id
|
|
1563
1928
|
);
|
|
1564
1929
|
}),
|
|
1565
1930
|
!hasReownWallet && handleConnect && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1566
1931
|
ListRow,
|
|
1567
1932
|
{
|
|
1568
|
-
leading:
|
|
1933
|
+
leading: WALLET_LEADING,
|
|
1569
1934
|
title: "Connect wallet",
|
|
1570
1935
|
subtitle: "Instant - No limit",
|
|
1571
|
-
meta:
|
|
1572
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletBadgeIcons, {}),
|
|
1573
|
-
"+100 wallets"
|
|
1574
|
-
] }),
|
|
1936
|
+
meta: CONNECT_META,
|
|
1575
1937
|
onClick: handleConnect
|
|
1576
1938
|
}
|
|
1577
|
-
)
|
|
1939
|
+
),
|
|
1940
|
+
showDappImports && _optionalChain([dappImports, 'optionalAccess', _64 => _64.map, 'call', _65 => _65((row) => {
|
|
1941
|
+
if (!hasReownWallet) {
|
|
1942
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1943
|
+
ListRow,
|
|
1944
|
+
{
|
|
1945
|
+
leading: row.icon,
|
|
1946
|
+
title: row.label,
|
|
1947
|
+
subtitle: "Connect wallet to view balance",
|
|
1948
|
+
onClick: handleConnect,
|
|
1949
|
+
disabled: !handleConnect
|
|
1950
|
+
},
|
|
1951
|
+
row.id
|
|
1952
|
+
);
|
|
1953
|
+
}
|
|
1954
|
+
if (row.status === "loading" || row.status === "needs-connect") {
|
|
1955
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1956
|
+
ListRow,
|
|
1957
|
+
{
|
|
1958
|
+
leading: row.icon,
|
|
1959
|
+
title: row.label,
|
|
1960
|
+
subtitle: "Checking balance\u2026",
|
|
1961
|
+
disabled: true,
|
|
1962
|
+
trailing: SMALL_SPINNER
|
|
1963
|
+
},
|
|
1964
|
+
row.id
|
|
1965
|
+
);
|
|
1966
|
+
}
|
|
1967
|
+
if (row.status.enabled) {
|
|
1968
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1969
|
+
ListRow,
|
|
1970
|
+
{
|
|
1971
|
+
leading: row.icon,
|
|
1972
|
+
title: row.label,
|
|
1973
|
+
subtitle: formatBalanceUsd(row.status.balanceUsd),
|
|
1974
|
+
onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _66 => _66(row.id)])
|
|
1975
|
+
},
|
|
1976
|
+
row.id
|
|
1977
|
+
);
|
|
1978
|
+
}
|
|
1979
|
+
if (row.status.retryable) {
|
|
1980
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1981
|
+
ListRow,
|
|
1982
|
+
{
|
|
1983
|
+
leading: row.icon,
|
|
1984
|
+
title: row.label,
|
|
1985
|
+
subtitle: row.status.reason,
|
|
1986
|
+
onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _67 => _67(row.id)])
|
|
1987
|
+
},
|
|
1988
|
+
row.id
|
|
1989
|
+
);
|
|
1990
|
+
}
|
|
1991
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1992
|
+
ListRow,
|
|
1993
|
+
{
|
|
1994
|
+
leading: row.icon,
|
|
1995
|
+
title: row.label,
|
|
1996
|
+
subtitle: row.status.reason,
|
|
1997
|
+
disabled: true
|
|
1998
|
+
},
|
|
1999
|
+
row.id
|
|
2000
|
+
);
|
|
2001
|
+
})])
|
|
1578
2002
|
] })
|
|
1579
2003
|
] }),
|
|
1580
2004
|
onDisconnect && hasReownWallet && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-screen-tight-row", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1591,153 +2015,9 @@ function ConnectStep({
|
|
|
1591
2015
|
}
|
|
1592
2016
|
ConnectStep.displayName = "ConnectStep";
|
|
1593
2017
|
|
|
1594
|
-
// src/components/ui/Spinner.tsx
|
|
1595
|
-
|
|
1596
|
-
function Spinner({ className }) {
|
|
1597
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1598
|
-
"svg",
|
|
1599
|
-
{
|
|
1600
|
-
className: `rs-spinner ${className || ""}`,
|
|
1601
|
-
fill: "none",
|
|
1602
|
-
viewBox: "0 0 20 21",
|
|
1603
|
-
children: [
|
|
1604
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1605
|
-
"path",
|
|
1606
|
-
{
|
|
1607
|
-
d: "M10 0.5C8.02219 0.5 6.08879 1.08649 4.4443 2.1853C2.79981 3.28412 1.51809 4.8459 0.761209 6.67316C0.00433288 8.50043 -0.1937 10.5111 0.192152 12.4509C0.578004 14.3907 1.53041 16.1725 2.92894 17.5711C4.32746 18.9696 6.10929 19.922 8.0491 20.3078C9.98891 20.6937 11.9996 20.4957 13.8268 19.7388C15.6541 18.9819 17.2159 17.7002 18.3147 16.0557C19.4135 14.4112 20 12.4778 20 10.5C20 7.84783 18.9464 5.3043 17.0711 3.42893C15.1957 1.55357 12.6522 0.5 10 0.5ZM10 17.7727C8.56159 17.7727 7.15549 17.3462 5.95949 16.547C4.7635 15.7479 3.83134 14.6121 3.28088 13.2831C2.73042 11.9542 2.5864 10.4919 2.86702 9.08116C3.14764 7.67039 3.8403 6.37451 4.85741 5.3574C5.87452 4.3403 7.17039 3.64764 8.58116 3.36702C9.99193 3.0864 11.4542 3.23042 12.7832 3.78088C14.1121 4.33133 15.2479 5.26349 16.0471 6.45949C16.8462 7.65548 17.2727 9.06159 17.2727 10.5C17.2727 12.4288 16.5065 14.2787 15.1426 15.6426C13.7787 17.0065 11.9288 17.7727 10 17.7727Z",
|
|
1608
|
-
fill: "currentColor",
|
|
1609
|
-
opacity: 0.3
|
|
1610
|
-
}
|
|
1611
|
-
),
|
|
1612
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1613
|
-
"path",
|
|
1614
|
-
{
|
|
1615
|
-
d: "M10 3.22767C11.7423 3.22846 13.4276 3.8412 14.7556 4.95667C16.0837 6.07214 16.9681 7.61784 17.2512 9.31825C17.3012 9.64364 17.4662 9.94096 17.7169 10.1573C17.9677 10.3737 18.2878 10.4951 18.6205 10.5C18.8211 10.5001 19.0193 10.457 19.2012 10.3735C19.3832 10.2901 19.5445 10.1684 19.674 10.017C19.8036 9.86549 19.8981 9.68789 19.9511 9.49656C20.004 9.30523 20.0141 9.10478 19.9807 8.90918C19.5986 6.56305 18.3843 4.42821 16.5554 2.88726C14.7265 1.34631 12.4025 0.5 10 0.5C7.59751 0.5 5.27354 1.34631 3.44461 2.88726C1.61569 4.42821 0.401366 6.56305 0.0192815 8.90918C-0.0141442 9.10478 -0.00402016 9.30523 0.0489472 9.49656C0.101914 9.68789 0.196449 9.86549 0.325956 10.017C0.455463 10.1684 0.616823 10.2901 0.798778 10.3735C0.980732 10.457 1.1789 10.5001 1.37945 10.5C1.71216 10.4951 2.03235 10.3737 2.28307 10.1573C2.5338 9.94096 2.69883 9.64364 2.74882 9.31825C3.03193 7.61784 3.91633 6.07214 5.24436 4.95667C6.57239 3.8412 8.25775 3.22846 10 3.22767Z",
|
|
1616
|
-
fill: "currentColor"
|
|
1617
|
-
}
|
|
1618
|
-
)
|
|
1619
|
-
]
|
|
1620
|
-
}
|
|
1621
|
-
);
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
|
-
// src/core/session-owner.ts
|
|
1625
|
-
var _viem = require('viem');
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
var _accounts = require('viem/accounts');
|
|
1630
|
-
var STORAGE_PREFIX = "rhinestone:session-owner";
|
|
1631
|
-
function storageKey(eoaAddress) {
|
|
1632
|
-
return `${STORAGE_PREFIX}:${eoaAddress.toLowerCase()}`;
|
|
1633
|
-
}
|
|
1634
|
-
function loadSessionOwnerFromStorage(eoaAddress) {
|
|
1635
|
-
if (typeof window === "undefined") return null;
|
|
1636
|
-
const raw = window.localStorage.getItem(storageKey(eoaAddress));
|
|
1637
|
-
if (!raw) return null;
|
|
1638
|
-
try {
|
|
1639
|
-
const parsed = JSON.parse(raw);
|
|
1640
|
-
if (!parsed.privateKey) return null;
|
|
1641
|
-
const account = _accounts.privateKeyToAccount.call(void 0, parsed.privateKey);
|
|
1642
|
-
return {
|
|
1643
|
-
privateKey: parsed.privateKey,
|
|
1644
|
-
address: account.address
|
|
1645
|
-
};
|
|
1646
|
-
} catch (e2) {
|
|
1647
|
-
return null;
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
function saveSessionOwnerToStorage(eoaAddress, privateKey, address) {
|
|
1651
|
-
if (typeof window === "undefined") return;
|
|
1652
|
-
if (!_viem.isAddress.call(void 0, address)) return;
|
|
1653
|
-
const payload = {
|
|
1654
|
-
privateKey,
|
|
1655
|
-
address,
|
|
1656
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1657
|
-
};
|
|
1658
|
-
window.localStorage.setItem(storageKey(eoaAddress), JSON.stringify(payload));
|
|
1659
|
-
}
|
|
1660
|
-
function createSessionOwnerKey() {
|
|
1661
|
-
const privateKey = _accounts.generatePrivateKey.call(void 0, );
|
|
1662
|
-
const account = _accounts.privateKeyToAccount.call(void 0, privateKey);
|
|
1663
|
-
return {
|
|
1664
|
-
privateKey,
|
|
1665
|
-
account,
|
|
1666
|
-
address: account.address
|
|
1667
|
-
};
|
|
1668
|
-
}
|
|
1669
|
-
function accountFromPrivateKey(privateKey) {
|
|
1670
|
-
return _accounts.privateKeyToAccount.call(void 0, privateKey);
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
// src/core/formatters.ts
|
|
1674
|
-
var currencyFormatter = new Intl.NumberFormat("en-US", {
|
|
1675
|
-
style: "currency",
|
|
1676
|
-
currency: "USD",
|
|
1677
|
-
maximumFractionDigits: 2
|
|
1678
|
-
});
|
|
1679
|
-
var tokenFormatter = new Intl.NumberFormat("en-US", {
|
|
1680
|
-
maximumFractionDigits: 6
|
|
1681
|
-
});
|
|
1682
|
-
function formatUserError(raw) {
|
|
1683
|
-
const lower = raw.toLowerCase();
|
|
1684
|
-
if (lower.includes("user rejected") || lower.includes("user denied")) {
|
|
1685
|
-
return "Transaction cancelled";
|
|
1686
|
-
}
|
|
1687
|
-
if (lower.includes("insufficient funds")) {
|
|
1688
|
-
return "Insufficient funds for this transaction";
|
|
1689
|
-
}
|
|
1690
|
-
if (lower.includes("nonce too low") || lower.includes("nonce too high")) {
|
|
1691
|
-
return "Transaction conflict \u2014 please try again";
|
|
1692
|
-
}
|
|
1693
|
-
if (lower.includes("execution reverted")) {
|
|
1694
|
-
return "Transaction would fail on-chain";
|
|
1695
|
-
}
|
|
1696
|
-
if (lower.includes("timed out") || lower.includes("took too long")) {
|
|
1697
|
-
return "Request timed out \u2014 please try again";
|
|
1698
|
-
}
|
|
1699
|
-
if (lower.includes("econnrefused") || lower.includes("econnreset") || lower.includes("enotfound") || lower.includes("fetch failed")) {
|
|
1700
|
-
return "Service unavailable \u2014 please try again";
|
|
1701
|
-
}
|
|
1702
|
-
if (lower.includes("recent blockhash") || lower.includes("latest blockhash")) {
|
|
1703
|
-
return "Solana RPC unavailable \u2014 please retry";
|
|
1704
|
-
}
|
|
1705
|
-
if (lower.includes("network") || lower.includes("disconnected")) {
|
|
1706
|
-
return "Network error \u2014 check your connection";
|
|
1707
|
-
}
|
|
1708
|
-
if (lower.includes("rate limit") || lower.includes("429")) {
|
|
1709
|
-
return "Rate limited \u2014 please try again shortly";
|
|
1710
|
-
}
|
|
1711
|
-
let cleaned = raw;
|
|
1712
|
-
const stripMarkers = [
|
|
1713
|
-
"\n\nRequest Arguments:",
|
|
1714
|
-
"\nRaw Call Arguments:",
|
|
1715
|
-
"\nRequest body:",
|
|
1716
|
-
"\nContract Call:",
|
|
1717
|
-
"\nDocs:",
|
|
1718
|
-
"\nDetails:",
|
|
1719
|
-
"\nVersion:",
|
|
1720
|
-
"\nURL:"
|
|
1721
|
-
];
|
|
1722
|
-
for (const marker of stripMarkers) {
|
|
1723
|
-
const idx = cleaned.indexOf(marker);
|
|
1724
|
-
if (idx !== -1) {
|
|
1725
|
-
cleaned = cleaned.slice(0, idx).trim();
|
|
1726
|
-
}
|
|
1727
|
-
}
|
|
1728
|
-
cleaned = cleaned.replace(/https?:\/\/\S+/g, "").trim();
|
|
1729
|
-
if (cleaned.length === 0) {
|
|
1730
|
-
return "An unexpected error occurred";
|
|
1731
|
-
}
|
|
1732
|
-
if (cleaned.length > 120) {
|
|
1733
|
-
return cleaned.slice(0, 120) + "...";
|
|
1734
|
-
}
|
|
1735
|
-
return cleaned;
|
|
1736
|
-
}
|
|
1737
|
-
|
|
1738
2018
|
// src/components/steps/ProcessingStep.tsx
|
|
1739
2019
|
|
|
1740
|
-
|
|
2020
|
+
var _viem = require('viem');
|
|
1741
2021
|
|
|
1742
2022
|
// src/components/ui/Button.tsx
|
|
1743
2023
|
|
|
@@ -1808,15 +2088,15 @@ function Tooltip({ content, children, className }) {
|
|
|
1808
2088
|
function handleOutside(event) {
|
|
1809
2089
|
const target = event.target;
|
|
1810
2090
|
if (!target) return;
|
|
1811
|
-
if (_optionalChain([triggerRef, 'access',
|
|
1812
|
-
if (_optionalChain([bubbleRef, 'access',
|
|
2091
|
+
if (_optionalChain([triggerRef, 'access', _68 => _68.current, 'optionalAccess', _69 => _69.contains, 'call', _70 => _70(target)])) return;
|
|
2092
|
+
if (_optionalChain([bubbleRef, 'access', _71 => _71.current, 'optionalAccess', _72 => _72.contains, 'call', _73 => _73(target)])) return;
|
|
1813
2093
|
setOpen(false);
|
|
1814
2094
|
}
|
|
1815
2095
|
function handleKey(event) {
|
|
1816
2096
|
if (event.key === "Escape") setOpen(false);
|
|
1817
2097
|
}
|
|
1818
2098
|
document.addEventListener("mousedown", handleOutside);
|
|
1819
|
-
document.addEventListener("touchstart", handleOutside);
|
|
2099
|
+
document.addEventListener("touchstart", handleOutside, { passive: true });
|
|
1820
2100
|
document.addEventListener("keydown", handleKey);
|
|
1821
2101
|
window.addEventListener("scroll", updatePosition, true);
|
|
1822
2102
|
window.addEventListener("resize", updatePosition);
|
|
@@ -1876,6 +2156,46 @@ function Tooltip({ content, children, className }) {
|
|
|
1876
2156
|
}
|
|
1877
2157
|
Tooltip.displayName = "Tooltip";
|
|
1878
2158
|
|
|
2159
|
+
// src/components/ui/Callout.tsx
|
|
2160
|
+
|
|
2161
|
+
function CircleAlertIcon() {
|
|
2162
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2163
|
+
"svg",
|
|
2164
|
+
{
|
|
2165
|
+
width: "16",
|
|
2166
|
+
height: "16",
|
|
2167
|
+
viewBox: "0 0 16 16",
|
|
2168
|
+
fill: "none",
|
|
2169
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2170
|
+
"aria-hidden": "true",
|
|
2171
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2172
|
+
"path",
|
|
2173
|
+
{
|
|
2174
|
+
d: "M10 5.99L6 9.99M6 5.99L10 9.99M14.66 7.99C14.66 11.68 11.68 14.66 8 14.66C4.31 14.66 1.33 11.68 1.33 7.99C1.33 4.31 4.31 1.33 8 1.33C11.68 1.33 14.66 4.31 14.66 7.99Z",
|
|
2175
|
+
stroke: "currentColor",
|
|
2176
|
+
strokeWidth: "1.33",
|
|
2177
|
+
strokeLinecap: "round",
|
|
2178
|
+
strokeLinejoin: "round"
|
|
2179
|
+
}
|
|
2180
|
+
)
|
|
2181
|
+
}
|
|
2182
|
+
);
|
|
2183
|
+
}
|
|
2184
|
+
function Callout({ variant = "error", children, role }) {
|
|
2185
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2186
|
+
"div",
|
|
2187
|
+
{
|
|
2188
|
+
className: `rs-callout rs-callout--${variant}`,
|
|
2189
|
+
role: _nullishCoalesce(role, () => ( (variant === "error" ? "alert" : "status"))),
|
|
2190
|
+
children: [
|
|
2191
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-callout-icon", children: variant === "error" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CircleAlertIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertTriangleIcon, {}) }),
|
|
2192
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-callout-text", children })
|
|
2193
|
+
]
|
|
2194
|
+
}
|
|
2195
|
+
);
|
|
2196
|
+
}
|
|
2197
|
+
Callout.displayName = "Callout";
|
|
2198
|
+
|
|
1879
2199
|
// src/core/webhook.ts
|
|
1880
2200
|
function isRecord(value) {
|
|
1881
2201
|
return typeof value === "object" && value !== null;
|
|
@@ -1889,7 +2209,7 @@ function asNumber(value) {
|
|
|
1889
2209
|
const trimmed = value.trim();
|
|
1890
2210
|
if (!trimmed) return void 0;
|
|
1891
2211
|
const caipMatch = trimmed.match(/^eip155:(\d+)$/);
|
|
1892
|
-
if (_optionalChain([caipMatch, 'optionalAccess',
|
|
2212
|
+
if (_optionalChain([caipMatch, 'optionalAccess', _74 => _74[1]])) {
|
|
1893
2213
|
const parsed2 = Number(caipMatch[1]);
|
|
1894
2214
|
return Number.isFinite(parsed2) ? parsed2 : void 0;
|
|
1895
2215
|
}
|
|
@@ -1908,28 +2228,28 @@ function asAddress(value) {
|
|
|
1908
2228
|
return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
|
|
1909
2229
|
}
|
|
1910
2230
|
function getEventTxHash(event) {
|
|
1911
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
2231
|
+
if (!_optionalChain([event, 'optionalAccess', _75 => _75.type])) return void 0;
|
|
1912
2232
|
if (event.type === "deposit-received") {
|
|
1913
|
-
return asString(_optionalChain([event, 'access',
|
|
2233
|
+
return asString(_optionalChain([event, 'access', _76 => _76.data, 'optionalAccess', _77 => _77.transactionHash]));
|
|
1914
2234
|
}
|
|
1915
2235
|
if (event.type === "bridge-started" || event.type === "bridge-complete") {
|
|
1916
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
1917
|
-
const source = isRecord(_optionalChain([event, 'access',
|
|
1918
|
-
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess',
|
|
2236
|
+
const deposit = isRecord(_optionalChain([event, 'access', _78 => _78.data, 'optionalAccess', _79 => _79.deposit])) ? event.data.deposit : void 0;
|
|
2237
|
+
const source = isRecord(_optionalChain([event, 'access', _80 => _80.data, 'optionalAccess', _81 => _81.source])) ? event.data.source : void 0;
|
|
2238
|
+
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _82 => _82.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _83 => _83.transactionHash]))));
|
|
1919
2239
|
}
|
|
1920
2240
|
if (event.type === "bridge-failed" || event.type === "error") {
|
|
1921
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
1922
|
-
const source = isRecord(_optionalChain([event, 'access',
|
|
1923
|
-
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess',
|
|
2241
|
+
const deposit = isRecord(_optionalChain([event, 'access', _84 => _84.data, 'optionalAccess', _85 => _85.deposit])) ? event.data.deposit : void 0;
|
|
2242
|
+
const source = isRecord(_optionalChain([event, 'access', _86 => _86.data, 'optionalAccess', _87 => _87.source])) ? event.data.source : void 0;
|
|
2243
|
+
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _88 => _88.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _89 => _89.transactionHash]))));
|
|
1924
2244
|
}
|
|
1925
2245
|
if (event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed") {
|
|
1926
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
1927
|
-
return asString(_optionalChain([deposit, 'optionalAccess',
|
|
2246
|
+
const deposit = isRecord(_optionalChain([event, 'access', _90 => _90.data, 'optionalAccess', _91 => _91.deposit])) ? event.data.deposit : void 0;
|
|
2247
|
+
return asString(_optionalChain([deposit, 'optionalAccess', _92 => _92.transactionHash]));
|
|
1928
2248
|
}
|
|
1929
2249
|
return void 0;
|
|
1930
2250
|
}
|
|
1931
2251
|
function getEventSourceDetails(event) {
|
|
1932
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
2252
|
+
if (!_optionalChain([event, 'optionalAccess', _93 => _93.type]) || !isRecord(event.data)) return {};
|
|
1933
2253
|
if (event.type === "deposit-received") {
|
|
1934
2254
|
return {
|
|
1935
2255
|
chainId: asNumber(event.data.chain),
|
|
@@ -1941,15 +2261,15 @@ function getEventSourceDetails(event) {
|
|
|
1941
2261
|
const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
|
|
1942
2262
|
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") {
|
|
1943
2263
|
return {
|
|
1944
|
-
chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess',
|
|
1945
|
-
amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess',
|
|
1946
|
-
token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess',
|
|
2264
|
+
chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _94 => _94.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _95 => _95.chain])))),
|
|
2265
|
+
amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _96 => _96.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _97 => _97.amount])))),
|
|
2266
|
+
token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _98 => _98.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _99 => _99.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _100 => _100.token]))))
|
|
1947
2267
|
};
|
|
1948
2268
|
}
|
|
1949
2269
|
return {};
|
|
1950
2270
|
}
|
|
1951
2271
|
function isDepositEvent(event) {
|
|
1952
|
-
return _optionalChain([event, 'optionalAccess',
|
|
2272
|
+
return _optionalChain([event, 'optionalAccess', _101 => _101.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _102 => _102.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _103 => _103.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _104 => _104.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _105 => _105.type]) === "post-bridge-swap-complete" || _optionalChain([event, 'optionalAccess', _106 => _106.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _107 => _107.type]) === "error";
|
|
1953
2273
|
}
|
|
1954
2274
|
function isHexString(value) {
|
|
1955
2275
|
return value.startsWith("0x") || value.startsWith("0X");
|
|
@@ -1963,6 +2283,66 @@ function txRefsMatch(a, b) {
|
|
|
1963
2283
|
|
|
1964
2284
|
// src/components/steps/ProcessingStep.tsx
|
|
1965
2285
|
|
|
2286
|
+
function SuccessBadge() {
|
|
2287
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2288
|
+
"svg",
|
|
2289
|
+
{
|
|
2290
|
+
width: "40",
|
|
2291
|
+
height: "40",
|
|
2292
|
+
viewBox: "0 0 40 40",
|
|
2293
|
+
fill: "none",
|
|
2294
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2295
|
+
"aria-hidden": "true",
|
|
2296
|
+
children: [
|
|
2297
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2298
|
+
"rect",
|
|
2299
|
+
{
|
|
2300
|
+
width: "40",
|
|
2301
|
+
height: "40",
|
|
2302
|
+
rx: "8",
|
|
2303
|
+
fill: "var(--rs-icon-wrapper-bg)"
|
|
2304
|
+
}
|
|
2305
|
+
),
|
|
2306
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2307
|
+
"path",
|
|
2308
|
+
{
|
|
2309
|
+
d: "M28 14L17 25L12 20",
|
|
2310
|
+
stroke: "var(--rs-icon-wrapper-icon)",
|
|
2311
|
+
strokeWidth: "2",
|
|
2312
|
+
strokeLinecap: "round",
|
|
2313
|
+
strokeLinejoin: "round"
|
|
2314
|
+
}
|
|
2315
|
+
)
|
|
2316
|
+
]
|
|
2317
|
+
}
|
|
2318
|
+
);
|
|
2319
|
+
}
|
|
2320
|
+
function FailedBadge() {
|
|
2321
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2322
|
+
"svg",
|
|
2323
|
+
{
|
|
2324
|
+
width: "40",
|
|
2325
|
+
height: "40",
|
|
2326
|
+
viewBox: "0 0 40 40",
|
|
2327
|
+
fill: "none",
|
|
2328
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2329
|
+
"aria-hidden": "true",
|
|
2330
|
+
children: [
|
|
2331
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "40", height: "40", rx: "8", fill: "#FB2C36" }),
|
|
2332
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2333
|
+
"path",
|
|
2334
|
+
{
|
|
2335
|
+
d: "M26 14L14 26M14 14L26 26",
|
|
2336
|
+
stroke: "white",
|
|
2337
|
+
strokeWidth: "2",
|
|
2338
|
+
strokeLinecap: "round",
|
|
2339
|
+
strokeLinejoin: "round"
|
|
2340
|
+
}
|
|
2341
|
+
)
|
|
2342
|
+
]
|
|
2343
|
+
}
|
|
2344
|
+
);
|
|
2345
|
+
}
|
|
1966
2346
|
var INITIAL_POLL_INTERVAL = 3e3;
|
|
1967
2347
|
var MAX_POLL_INTERVAL = 3e4;
|
|
1968
2348
|
var BACKOFF_MULTIPLIER = 1.5;
|
|
@@ -2001,7 +2381,7 @@ function isEventForTx(event, txHash) {
|
|
|
2001
2381
|
return txRefsMatch(eventTxHash, txHash);
|
|
2002
2382
|
}
|
|
2003
2383
|
function formatBridgeFailedMessage(event) {
|
|
2004
|
-
const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess',
|
|
2384
|
+
const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _108 => _108.data]), () => ( {}));
|
|
2005
2385
|
const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
|
|
2006
2386
|
const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
|
|
2007
2387
|
function toUserFacingFailure(raw) {
|
|
@@ -2033,12 +2413,12 @@ function formatBridgeFailedMessage(event) {
|
|
|
2033
2413
|
return { message: "Bridge failed" };
|
|
2034
2414
|
}
|
|
2035
2415
|
function parseWebhookTimestamp(event) {
|
|
2036
|
-
if (typeof _optionalChain([event, 'optionalAccess',
|
|
2416
|
+
if (typeof _optionalChain([event, 'optionalAccess', _109 => _109.time]) !== "string") return void 0;
|
|
2037
2417
|
const timestamp = Date.parse(event.time);
|
|
2038
2418
|
return Number.isFinite(timestamp) ? timestamp : void 0;
|
|
2039
2419
|
}
|
|
2040
2420
|
function syncPhaseTimings(previous, event) {
|
|
2041
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
2421
|
+
if (!_optionalChain([event, 'optionalAccess', _110 => _110.type])) return previous;
|
|
2042
2422
|
const timestamp = _nullishCoalesce(parseWebhookTimestamp(event), () => ( Date.now()));
|
|
2043
2423
|
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;
|
|
2044
2424
|
const setBridging = (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "post-bridge-swap-complete") && previous.bridgingAt === void 0;
|
|
@@ -2051,11 +2431,35 @@ function syncPhaseTimings(previous, event) {
|
|
|
2051
2431
|
...setCompleted && { completedAt: timestamp }
|
|
2052
2432
|
};
|
|
2053
2433
|
}
|
|
2054
|
-
function
|
|
2055
|
-
|
|
2056
|
-
const mins = Math.floor(
|
|
2057
|
-
const secs =
|
|
2058
|
-
return `${mins}
|
|
2434
|
+
function formatTimer(seconds) {
|
|
2435
|
+
const safe = Math.max(0, seconds);
|
|
2436
|
+
const mins = Math.floor(safe / 60);
|
|
2437
|
+
const secs = safe % 60;
|
|
2438
|
+
return `${mins}:${String(secs).padStart(2, "0")}`;
|
|
2439
|
+
}
|
|
2440
|
+
function TickerChar({ value }) {
|
|
2441
|
+
const [current, setCurrent] = _react.useState.call(void 0, value);
|
|
2442
|
+
const [previous, setPrevious] = _react.useState.call(void 0, null);
|
|
2443
|
+
const [animKey, setAnimKey] = _react.useState.call(void 0, 0);
|
|
2444
|
+
_react.useEffect.call(void 0, () => {
|
|
2445
|
+
if (value === current) return;
|
|
2446
|
+
setPrevious(current);
|
|
2447
|
+
setCurrent(value);
|
|
2448
|
+
setAnimKey((k) => k + 1);
|
|
2449
|
+
const timeout = setTimeout(() => setPrevious(null), 360);
|
|
2450
|
+
return () => clearTimeout(timeout);
|
|
2451
|
+
}, [value, current]);
|
|
2452
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-ticker-slot", children: [
|
|
2453
|
+
previous !== null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-ticker-out", children: previous }, `out-${animKey}`),
|
|
2454
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-ticker-in", children: current }, `in-${animKey}`)
|
|
2455
|
+
] });
|
|
2456
|
+
}
|
|
2457
|
+
function Ticker({ value }) {
|
|
2458
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-ticker", "aria-label": value, children: value.split("").map((char, index) => (
|
|
2459
|
+
// Position-stable key so each slot keeps its own animation state.
|
|
2460
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
2461
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TickerChar, { value: char }, index)
|
|
2462
|
+
)) });
|
|
2059
2463
|
}
|
|
2060
2464
|
function getPhaseStartTime(phaseId, phaseTimings) {
|
|
2061
2465
|
if (phaseId === "confirming") return phaseTimings.startedAt;
|
|
@@ -2069,19 +2473,16 @@ function getFailedPhaseId(phaseTimings) {
|
|
|
2069
2473
|
if (phaseTimings.receivedAt !== void 0) return "received";
|
|
2070
2474
|
return "confirming";
|
|
2071
2475
|
}
|
|
2072
|
-
function getCurrentPhaseId(state, phaseTimings
|
|
2476
|
+
function getCurrentPhaseId(state, phaseTimings) {
|
|
2073
2477
|
if (state.type === "failed") {
|
|
2074
2478
|
return getFailedPhaseId(phaseTimings);
|
|
2075
2479
|
}
|
|
2076
|
-
if (isEarlyComplete) {
|
|
2077
|
-
return "bridging";
|
|
2078
|
-
}
|
|
2079
2480
|
if (state.type === "complete") {
|
|
2080
2481
|
return void 0;
|
|
2081
2482
|
}
|
|
2082
|
-
if (_optionalChain([state, 'access',
|
|
2483
|
+
if (_optionalChain([state, 'access', _111 => _111.lastEvent, 'optionalAccess', _112 => _112.type]) === "bridge-started" || _optionalChain([state, 'access', _113 => _113.lastEvent, 'optionalAccess', _114 => _114.type]) === "bridge-complete")
|
|
2083
2484
|
return "bridging";
|
|
2084
|
-
if (_optionalChain([state, 'access',
|
|
2485
|
+
if (_optionalChain([state, 'access', _115 => _115.lastEvent, 'optionalAccess', _116 => _116.type]) === "deposit-received") return "received";
|
|
2085
2486
|
return "confirming";
|
|
2086
2487
|
}
|
|
2087
2488
|
function ProcessingStep({
|
|
@@ -2094,7 +2495,6 @@ function ProcessingStep({
|
|
|
2094
2495
|
amount,
|
|
2095
2496
|
sourceSymbol: providedSourceSymbol,
|
|
2096
2497
|
sourceDecimals: providedSourceDecimals,
|
|
2097
|
-
waitForFinalTx,
|
|
2098
2498
|
hasPostBridgeActions,
|
|
2099
2499
|
service,
|
|
2100
2500
|
directTransfer,
|
|
@@ -2102,7 +2502,6 @@ function ProcessingStep({
|
|
|
2102
2502
|
debug,
|
|
2103
2503
|
targetToken,
|
|
2104
2504
|
uiConfig,
|
|
2105
|
-
estimatedTime = "< 1 min",
|
|
2106
2505
|
quotedFeeAmount = "0.1",
|
|
2107
2506
|
quotedFeeSymbol,
|
|
2108
2507
|
balanceAfterUsd,
|
|
@@ -2123,7 +2522,6 @@ function ProcessingStep({
|
|
|
2123
2522
|
sourceToken,
|
|
2124
2523
|
targetChain,
|
|
2125
2524
|
targetToken,
|
|
2126
|
-
waitForFinalTx,
|
|
2127
2525
|
hasPostBridgeActions
|
|
2128
2526
|
});
|
|
2129
2527
|
const onDepositCompleteRef = useLatestRef(onDepositComplete);
|
|
@@ -2142,20 +2540,30 @@ function ProcessingStep({
|
|
|
2142
2540
|
return { startedAt: startTimeRef.current };
|
|
2143
2541
|
});
|
|
2144
2542
|
const [hasEscalatedDelay, setHasEscalatedDelay] = _react.useState.call(void 0, false);
|
|
2543
|
+
const updatePhaseTimings = _react.useCallback.call(void 0,
|
|
2544
|
+
(updater) => {
|
|
2545
|
+
setPhaseTimings((previous) => {
|
|
2546
|
+
const next = updater(previous);
|
|
2547
|
+
savePhaseTimings(txHash, next);
|
|
2548
|
+
return next;
|
|
2549
|
+
});
|
|
2550
|
+
},
|
|
2551
|
+
[txHash]
|
|
2552
|
+
);
|
|
2145
2553
|
_react.useEffect.call(void 0, () => {
|
|
2146
2554
|
if (!directTransfer) return;
|
|
2147
2555
|
const completedAt = Date.now();
|
|
2148
|
-
|
|
2556
|
+
updatePhaseTimings(() => ({
|
|
2149
2557
|
startedAt: startTimeRef.current,
|
|
2150
2558
|
completedAt,
|
|
2151
2559
|
endedAt: completedAt
|
|
2152
|
-
});
|
|
2560
|
+
}));
|
|
2153
2561
|
debugLog(debug, "processing", "direct-transfer:complete", {
|
|
2154
2562
|
txHash,
|
|
2155
2563
|
flowLabel
|
|
2156
2564
|
});
|
|
2157
2565
|
const context = processingContextRef.current;
|
|
2158
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
2566
|
+
_optionalChain([onDepositCompleteRef, 'access', _117 => _117.current, 'optionalCall', _118 => _118(txHash, void 0, {
|
|
2159
2567
|
amount: context.amount,
|
|
2160
2568
|
sourceChain: context.sourceChain,
|
|
2161
2569
|
sourceToken: context.sourceToken,
|
|
@@ -2168,7 +2576,8 @@ function ProcessingStep({
|
|
|
2168
2576
|
flowLabel,
|
|
2169
2577
|
onDepositCompleteRef,
|
|
2170
2578
|
processingContextRef,
|
|
2171
|
-
txHash
|
|
2579
|
+
txHash,
|
|
2580
|
+
updatePhaseTimings
|
|
2172
2581
|
]);
|
|
2173
2582
|
_react.useEffect.call(void 0, () => {
|
|
2174
2583
|
if (directTransfer || state.type !== "processing") return;
|
|
@@ -2185,17 +2594,16 @@ function ProcessingStep({
|
|
|
2185
2594
|
if (state.type === "processing") return;
|
|
2186
2595
|
const endedAt = state.type === "complete" ? _nullishCoalesce(phaseTimings.completedAt, () => ( Date.now())) : Date.now();
|
|
2187
2596
|
setElapsedSeconds(Math.floor((endedAt - startTimeRef.current) / 1e3));
|
|
2188
|
-
|
|
2597
|
+
updatePhaseTimings(
|
|
2189
2598
|
(previous) => previous.endedAt !== void 0 ? previous : { ...previous, endedAt }
|
|
2190
2599
|
);
|
|
2191
|
-
}, [phaseTimings.completedAt, state.type]);
|
|
2600
|
+
}, [phaseTimings.completedAt, state.type, updatePhaseTimings]);
|
|
2192
2601
|
_react.useEffect.call(void 0, () => {
|
|
2193
2602
|
if (!state.lastEvent) return;
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
}, [txHash, phaseTimings]);
|
|
2603
|
+
updatePhaseTimings(
|
|
2604
|
+
(previous) => syncPhaseTimings(previous, state.lastEvent)
|
|
2605
|
+
);
|
|
2606
|
+
}, [_optionalChain([state, 'access', _119 => _119.lastEvent, 'optionalAccess', _120 => _120.time]), _optionalChain([state, 'access', _121 => _121.lastEvent, 'optionalAccess', _122 => _122.type]), updatePhaseTimings]);
|
|
2199
2607
|
_react.useEffect.call(void 0, () => {
|
|
2200
2608
|
if (directTransfer) return;
|
|
2201
2609
|
if (state.type !== "processing") {
|
|
@@ -2220,21 +2628,21 @@ function ProcessingStep({
|
|
|
2220
2628
|
debugLog(debug, "processing", "poll:event", {
|
|
2221
2629
|
type: lastEvent2.type,
|
|
2222
2630
|
matchesTx: eventMatchesTx,
|
|
2223
|
-
intentId: _optionalChain([eventData, 'optionalAccess',
|
|
2631
|
+
intentId: _optionalChain([eventData, 'optionalAccess', _123 => _123.intentId])
|
|
2224
2632
|
});
|
|
2225
2633
|
}
|
|
2226
2634
|
if (!isMounted) return;
|
|
2227
|
-
const awaitingPostBridgeSwap = processingContextRef.current.
|
|
2228
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
2635
|
+
const awaitingPostBridgeSwap = processingContextRef.current.hasPostBridgeActions;
|
|
2636
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _124 => _124.type]) === "post-bridge-swap-complete") {
|
|
2229
2637
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
2230
|
-
const swapTxHash = _optionalChain([eventForCurrentTx, 'access',
|
|
2638
|
+
const swapTxHash = _optionalChain([eventForCurrentTx, 'access', _125 => _125.data, 'optionalAccess', _126 => _126.swap, 'optionalAccess', _127 => _127.transactionHash]);
|
|
2231
2639
|
debugLog(debug, "processing", "state:complete", {
|
|
2232
2640
|
txHash,
|
|
2233
2641
|
destinationTxHash: swapTxHash,
|
|
2234
2642
|
event: eventForCurrentTx.type
|
|
2235
2643
|
});
|
|
2236
2644
|
const context = processingContextRef.current;
|
|
2237
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
2645
|
+
_optionalChain([onDepositCompleteRef, 'access', _128 => _128.current, 'optionalCall', _129 => _129(txHash, swapTxHash, {
|
|
2238
2646
|
amount: context.amount,
|
|
2239
2647
|
sourceChain: context.sourceChain,
|
|
2240
2648
|
sourceToken: context.sourceToken,
|
|
@@ -2243,7 +2651,7 @@ function ProcessingStep({
|
|
|
2243
2651
|
})]);
|
|
2244
2652
|
return;
|
|
2245
2653
|
}
|
|
2246
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
2654
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _130 => _130.type]) === "post-bridge-swap-failed") {
|
|
2247
2655
|
const formatted = formatBridgeFailedMessage(eventForCurrentTx);
|
|
2248
2656
|
setState({
|
|
2249
2657
|
type: "failed",
|
|
@@ -2255,19 +2663,19 @@ function ProcessingStep({
|
|
|
2255
2663
|
message: formatted.message,
|
|
2256
2664
|
code: formatted.code
|
|
2257
2665
|
});
|
|
2258
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
2666
|
+
_optionalChain([onDepositFailedRef, 'access', _131 => _131.current, 'optionalCall', _132 => _132(txHash, formatted.message)]);
|
|
2259
2667
|
return;
|
|
2260
2668
|
}
|
|
2261
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
2669
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _133 => _133.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
|
|
2262
2670
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
2263
|
-
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access',
|
|
2671
|
+
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _134 => _134.data, 'optionalAccess', _135 => _135.destination, 'optionalAccess', _136 => _136.transactionHash]);
|
|
2264
2672
|
debugLog(debug, "processing", "state:complete", {
|
|
2265
2673
|
txHash,
|
|
2266
2674
|
destinationTxHash: destinationTxHash2,
|
|
2267
2675
|
event: eventForCurrentTx.type
|
|
2268
2676
|
});
|
|
2269
2677
|
const context = processingContextRef.current;
|
|
2270
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
2678
|
+
_optionalChain([onDepositCompleteRef, 'access', _137 => _137.current, 'optionalCall', _138 => _138(txHash, destinationTxHash2, {
|
|
2271
2679
|
amount: context.amount,
|
|
2272
2680
|
sourceChain: context.sourceChain,
|
|
2273
2681
|
sourceToken: context.sourceToken,
|
|
@@ -2276,23 +2684,7 @@ function ProcessingStep({
|
|
|
2276
2684
|
})]);
|
|
2277
2685
|
return;
|
|
2278
2686
|
}
|
|
2279
|
-
if (
|
|
2280
|
-
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
2281
|
-
debugLog(debug, "processing", "state:early-complete", {
|
|
2282
|
-
txHash,
|
|
2283
|
-
event: eventForCurrentTx.type
|
|
2284
|
-
});
|
|
2285
|
-
const context = processingContextRef.current;
|
|
2286
|
-
_optionalChain([onDepositCompleteRef, 'access', _129 => _129.current, 'optionalCall', _130 => _130(txHash, void 0, {
|
|
2287
|
-
amount: context.amount,
|
|
2288
|
-
sourceChain: context.sourceChain,
|
|
2289
|
-
sourceToken: context.sourceToken,
|
|
2290
|
-
targetChain: context.targetChain,
|
|
2291
|
-
targetToken: context.targetToken
|
|
2292
|
-
})]);
|
|
2293
|
-
return;
|
|
2294
|
-
}
|
|
2295
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _131 => _131.type]) === "bridge-failed") {
|
|
2687
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _139 => _139.type]) === "bridge-failed") {
|
|
2296
2688
|
const formatted = formatBridgeFailedMessage(eventForCurrentTx);
|
|
2297
2689
|
setState({
|
|
2298
2690
|
type: "failed",
|
|
@@ -2304,11 +2696,11 @@ function ProcessingStep({
|
|
|
2304
2696
|
message: formatted.message,
|
|
2305
2697
|
code: formatted.code
|
|
2306
2698
|
});
|
|
2307
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
2699
|
+
_optionalChain([onDepositFailedRef, 'access', _140 => _140.current, 'optionalCall', _141 => _141(txHash, formatted.message)]);
|
|
2308
2700
|
return;
|
|
2309
2701
|
}
|
|
2310
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
2311
|
-
const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access',
|
|
2702
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _142 => _142.type]) === "error") {
|
|
2703
|
+
const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _143 => _143.data, 'optionalAccess', _144 => _144.message]), () => ( "Unknown error"));
|
|
2312
2704
|
setState({
|
|
2313
2705
|
type: "failed",
|
|
2314
2706
|
message: errorMessage,
|
|
@@ -2318,7 +2710,7 @@ function ProcessingStep({
|
|
|
2318
2710
|
txHash,
|
|
2319
2711
|
message: errorMessage
|
|
2320
2712
|
});
|
|
2321
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
2713
|
+
_optionalChain([onDepositFailedRef, 'access', _145 => _145.current, 'optionalCall', _146 => _146(txHash, errorMessage)]);
|
|
2322
2714
|
return;
|
|
2323
2715
|
}
|
|
2324
2716
|
setState((previous) => ({
|
|
@@ -2379,7 +2771,7 @@ function ProcessingStep({
|
|
|
2379
2771
|
txHash,
|
|
2380
2772
|
timeoutMs: ESCALATED_DELAY_MS
|
|
2381
2773
|
});
|
|
2382
|
-
_optionalChain([onErrorRef, 'access',
|
|
2774
|
+
_optionalChain([onErrorRef, 'access', _147 => _147.current, 'optionalCall', _148 => _148(message, "PROCESS_TIMEOUT")]);
|
|
2383
2775
|
}, ESCALATED_DELAY_MS);
|
|
2384
2776
|
return () => clearTimeout(timeoutId);
|
|
2385
2777
|
}, [debug, directTransfer, onErrorRef, state.type, txHash]);
|
|
@@ -2388,21 +2780,20 @@ function ProcessingStep({
|
|
|
2388
2780
|
const isProcessing = state.type === "processing";
|
|
2389
2781
|
const lastEvent = state.lastEvent;
|
|
2390
2782
|
const failureMessage = state.type === "failed" ? state.message : void 0;
|
|
2391
|
-
const isEarlyComplete = !waitForFinalTx && _optionalChain([lastEvent, 'optionalAccess', _141 => _141.type]) === "bridge-started";
|
|
2392
2783
|
const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
|
|
2393
2784
|
const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
|
|
2394
2785
|
const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
|
|
2395
|
-
const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess',
|
|
2396
|
-
const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess',
|
|
2786
|
+
const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess', _149 => _149.type]) === "post-bridge-swap-complete" || _optionalChain([lastEvent, 'optionalAccess', _150 => _150.type]) === "post-bridge-swap-failed";
|
|
2787
|
+
const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _151 => _151.data, 'optionalAccess', _152 => _152.swap, 'optionalAccess', _153 => _153.transactionHash]) || null : _optionalChain([lastEvent, 'optionalAccess', _154 => _154.data, 'optionalAccess', _155 => _155.destination, 'optionalAccess', _156 => _156.transactionHash]) || null;
|
|
2397
2788
|
const sourceDetails = getEventSourceDetails(lastEvent);
|
|
2398
2789
|
const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
|
|
2399
2790
|
const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
|
|
2400
2791
|
const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
|
|
2401
|
-
const sourceExplorerUrl =
|
|
2402
|
-
const destExplorerUrl = destinationTxHash ?
|
|
2792
|
+
const sourceExplorerUrl = _chunk7JIDIX27cjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
|
|
2793
|
+
const destExplorerUrl = destinationTxHash ? _chunk7JIDIX27cjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
|
|
2403
2794
|
const isEvmSourceToken = /^0x[a-fA-F0-9]{40}$/.test(displaySourceToken);
|
|
2404
|
-
const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ?
|
|
2405
|
-
const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ?
|
|
2795
|
+
const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ? _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, displaySourceToken, displaySourceChain) : _nullishCoalesce(providedSourceSymbol, () => ( "Token"));
|
|
2796
|
+
const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ? _chunk7JIDIX27cjs.getTokenDecimalsByAddress.call(void 0,
|
|
2406
2797
|
displaySourceToken,
|
|
2407
2798
|
displaySourceChain
|
|
2408
2799
|
) : _nullishCoalesce(providedSourceDecimals, () => ( 18));
|
|
@@ -2411,143 +2802,144 @@ function ProcessingStep({
|
|
|
2411
2802
|
const raw = _viem.formatUnits.call(void 0, BigInt(displayAmount), sourceDecimals);
|
|
2412
2803
|
const numeric = Number(raw);
|
|
2413
2804
|
if (!Number.isFinite(numeric)) return raw;
|
|
2414
|
-
return numeric.toLocaleString("en-US", {
|
|
2805
|
+
return numeric.toLocaleString("en-US", {
|
|
2806
|
+
minimumFractionDigits: 2,
|
|
2807
|
+
maximumFractionDigits: 6
|
|
2808
|
+
});
|
|
2415
2809
|
} catch (e5) {
|
|
2416
2810
|
return Number(displayAmount).toLocaleString("en-US", {
|
|
2811
|
+
minimumFractionDigits: 2,
|
|
2417
2812
|
maximumFractionDigits: 6
|
|
2418
2813
|
});
|
|
2419
2814
|
}
|
|
2420
2815
|
})();
|
|
2421
|
-
const currentPhaseId = getCurrentPhaseId(state, phaseTimings
|
|
2816
|
+
const currentPhaseId = getCurrentPhaseId(state, phaseTimings);
|
|
2422
2817
|
const activePhaseStartedAt = currentPhaseId ? getPhaseStartTime(currentPhaseId, phaseTimings) : void 0;
|
|
2423
2818
|
const activePhaseElapsedMs = isProcessing && activePhaseStartedAt !== void 0 ? timelineNowMs - activePhaseStartedAt : 0;
|
|
2424
2819
|
const delayPhaseId = isProcessing && currentPhaseId && activePhaseElapsedMs >= SOFT_DELAY_MS[currentPhaseId] ? currentPhaseId : void 0;
|
|
2425
2820
|
void delayPhaseId;
|
|
2426
2821
|
void hasEscalatedDelay;
|
|
2427
2822
|
const targetSymbol = (() => {
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
}
|
|
2431
|
-
return _nullishCoalesce(providedSourceSymbol, () => ( "USDC"));
|
|
2823
|
+
const resolved = _chunk7JIDIX27cjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
|
|
2824
|
+
return resolved !== "Token" ? resolved : _nullishCoalesce(providedSourceSymbol, () => ( "USDC"));
|
|
2432
2825
|
})();
|
|
2433
|
-
const targetTokenIcon =
|
|
2434
|
-
const sourceChainIcon =
|
|
2435
|
-
const targetChainIcon =
|
|
2436
|
-
const sourceTokenIcon =
|
|
2437
|
-
const sourceChainName =
|
|
2438
|
-
const targetChainName =
|
|
2439
|
-
const
|
|
2440
|
-
const
|
|
2441
|
-
const
|
|
2442
|
-
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _151 => _151.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
|
|
2826
|
+
const targetTokenIcon = _chunk7JIDIX27cjs.getTokenIcon.call(void 0, targetSymbol);
|
|
2827
|
+
const sourceChainIcon = _chunk7JIDIX27cjs.getChainIcon.call(void 0, displaySourceChain);
|
|
2828
|
+
const targetChainIcon = _chunk7JIDIX27cjs.getChainIcon.call(void 0, targetChain);
|
|
2829
|
+
const sourceTokenIcon = _chunk7JIDIX27cjs.getTokenIcon.call(void 0, sourceSymbol);
|
|
2830
|
+
const sourceChainName = _chunk7JIDIX27cjs.getChainName.call(void 0, displaySourceChain);
|
|
2831
|
+
const targetChainName = _chunk7JIDIX27cjs.getChainName.call(void 0, targetChain);
|
|
2832
|
+
const timerText = formatTimer(elapsedSeconds);
|
|
2833
|
+
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _157 => _157.feeSponsored]), () => ( false));
|
|
2834
|
+
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _158 => _158.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
|
|
2443
2835
|
const stateTitle = isComplete ? `${flowCapitalized} successful` : isFailed ? `${flowCapitalized} failed` : "Processing...";
|
|
2444
|
-
const stateVariant = isComplete ? "success" : isFailed ? "error" : "default";
|
|
2445
|
-
const stateIcon = isComplete ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CheckIcon, {}) : isFailed ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CloseIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {});
|
|
2446
2836
|
const handleRetry = _nullishCoalesce(onRetry, () => ( onNewDeposit));
|
|
2837
|
+
const headerContent = isComplete ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
|
|
2838
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SuccessBadge, {}),
|
|
2839
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-body-header-text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "rs-body-header-title", children: stateTitle }) })
|
|
2840
|
+
] }) : isFailed ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
|
|
2841
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, FailedBadge, {}),
|
|
2842
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-body-header-text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "rs-body-header-title", children: stateTitle }) })
|
|
2843
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {}), title: stateTitle });
|
|
2447
2844
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
2448
2845
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
{
|
|
2452
|
-
variant: stateVariant,
|
|
2453
|
-
icon: stateIcon,
|
|
2454
|
-
title: stateTitle
|
|
2455
|
-
}
|
|
2456
|
-
),
|
|
2457
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-details", children: [
|
|
2458
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
2846
|
+
headerContent,
|
|
2847
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
|
|
2848
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
2459
2849
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
2460
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-
|
|
2850
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
2461
2851
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
2462
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-
|
|
2852
|
+
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: sourceChainIcon, alt: "" }) }),
|
|
2463
2853
|
sourceExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2464
2854
|
"a",
|
|
2465
2855
|
{
|
|
2466
2856
|
href: sourceExplorerUrl,
|
|
2467
2857
|
target: "_blank",
|
|
2468
2858
|
rel: "noopener noreferrer",
|
|
2469
|
-
className: "rs-
|
|
2859
|
+
className: "rs-review-detail-link",
|
|
2470
2860
|
"aria-label": "View source transaction",
|
|
2471
2861
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExternalLinkIcon, {})
|
|
2472
2862
|
}
|
|
2473
2863
|
)
|
|
2474
2864
|
] })
|
|
2475
2865
|
] }),
|
|
2476
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-
|
|
2866
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
2477
2867
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
2478
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-
|
|
2868
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
2479
2869
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
2480
|
-
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-
|
|
2870
|
+
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: targetChainIcon, alt: "" }) }),
|
|
2481
2871
|
destExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2482
2872
|
"a",
|
|
2483
2873
|
{
|
|
2484
2874
|
href: destExplorerUrl,
|
|
2485
2875
|
target: "_blank",
|
|
2486
2876
|
rel: "noopener noreferrer",
|
|
2487
|
-
className: "rs-
|
|
2877
|
+
className: "rs-review-detail-link",
|
|
2488
2878
|
"aria-label": "View destination transaction",
|
|
2489
2879
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExternalLinkIcon, {})
|
|
2490
2880
|
}
|
|
2491
2881
|
)
|
|
2492
2882
|
] })
|
|
2493
2883
|
] }),
|
|
2494
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-
|
|
2495
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "
|
|
2496
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-
|
|
2884
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
2885
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "Time elapsed" : "Total time" }),
|
|
2886
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Ticker, { value: timerText }) })
|
|
2497
2887
|
] }),
|
|
2498
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-
|
|
2888
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
2499
2889
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "You send" }),
|
|
2500
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-
|
|
2890
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
2501
2891
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
2502
2892
|
formattedReceivedAmount,
|
|
2503
2893
|
" ",
|
|
2504
2894
|
sourceSymbol
|
|
2505
2895
|
] }),
|
|
2506
|
-
sourceTokenIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-
|
|
2896
|
+
sourceTokenIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: sourceTokenIcon, alt: "" }) })
|
|
2507
2897
|
] })
|
|
2508
2898
|
] }),
|
|
2509
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-
|
|
2899
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
2510
2900
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Receive" }),
|
|
2511
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-
|
|
2901
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
2512
2902
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
2513
2903
|
"~",
|
|
2514
2904
|
formattedReceivedAmount,
|
|
2515
2905
|
" ",
|
|
2516
2906
|
targetSymbol
|
|
2517
2907
|
] }),
|
|
2518
|
-
targetTokenIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-
|
|
2908
|
+
targetTokenIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: targetTokenIcon, alt: "" }) })
|
|
2519
2909
|
] })
|
|
2520
2910
|
] }),
|
|
2521
|
-
isFailed && balanceAfterUsd !== void 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-
|
|
2911
|
+
isFailed && balanceAfterUsd !== void 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
2522
2912
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance" }),
|
|
2523
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-
|
|
2913
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
2524
2914
|
"$",
|
|
2525
2915
|
balanceAfterUsd.toFixed(2)
|
|
2526
2916
|
] })
|
|
2527
2917
|
] }),
|
|
2528
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-
|
|
2918
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
2529
2919
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
|
|
2530
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-
|
|
2531
|
-
/* @__PURE__ */ _jsxruntime.
|
|
2920
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
2921
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2532
2922
|
"span",
|
|
2533
2923
|
{
|
|
2534
2924
|
style: feeSponsored ? { textDecoration: "line-through" } : void 0,
|
|
2535
|
-
children:
|
|
2536
|
-
quotedFeeAmount,
|
|
2537
|
-
" ",
|
|
2538
|
-
feeSymbol
|
|
2539
|
-
]
|
|
2925
|
+
children: "$0.04"
|
|
2540
2926
|
}
|
|
2541
2927
|
),
|
|
2542
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Tooltip, { content: feeTooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-
|
|
2928
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Tooltip, { content: feeTooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InfoIcon, {}) }) })
|
|
2543
2929
|
] })
|
|
2544
2930
|
] })
|
|
2545
2931
|
] }),
|
|
2546
|
-
isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2932
|
+
isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Callout, { variant: "error", children: failureMessage }),
|
|
2933
|
+
isProcessing && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2934
|
+
Button,
|
|
2935
|
+
{
|
|
2936
|
+
fullWidth: true,
|
|
2937
|
+
disabled: true,
|
|
2938
|
+
loading: true,
|
|
2939
|
+
loadingText: "Submitting transaction\u2026",
|
|
2940
|
+
children: "Submitting transaction\u2026"
|
|
2941
|
+
}
|
|
2942
|
+
),
|
|
2551
2943
|
isComplete && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
|
|
2552
2944
|
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: [
|
|
2553
2945
|
"New ",
|
|
@@ -2564,13 +2956,298 @@ function ProcessingStep({
|
|
|
2564
2956
|
] });
|
|
2565
2957
|
}
|
|
2566
2958
|
|
|
2959
|
+
// src/core/safe.ts
|
|
2960
|
+
|
|
2961
|
+
|
|
2962
|
+
|
|
2963
|
+
|
|
2964
|
+
|
|
2965
|
+
|
|
2966
|
+
|
|
2967
|
+
|
|
2968
|
+
|
|
2969
|
+
|
|
2970
|
+
var SAFE_ABI = [
|
|
2971
|
+
{
|
|
2972
|
+
type: "function",
|
|
2973
|
+
name: "isOwner",
|
|
2974
|
+
stateMutability: "view",
|
|
2975
|
+
inputs: [{ name: "owner", type: "address" }],
|
|
2976
|
+
outputs: [{ name: "", type: "bool" }]
|
|
2977
|
+
},
|
|
2978
|
+
{
|
|
2979
|
+
type: "function",
|
|
2980
|
+
name: "nonce",
|
|
2981
|
+
stateMutability: "view",
|
|
2982
|
+
inputs: [],
|
|
2983
|
+
outputs: [{ type: "uint256" }]
|
|
2984
|
+
},
|
|
2985
|
+
{
|
|
2986
|
+
type: "function",
|
|
2987
|
+
name: "execTransaction",
|
|
2988
|
+
stateMutability: "payable",
|
|
2989
|
+
inputs: [
|
|
2990
|
+
{ name: "to", type: "address" },
|
|
2991
|
+
{ name: "value", type: "uint256" },
|
|
2992
|
+
{ name: "data", type: "bytes" },
|
|
2993
|
+
{ name: "operation", type: "uint8" },
|
|
2994
|
+
{ name: "safeTxGas", type: "uint256" },
|
|
2995
|
+
{ name: "baseGas", type: "uint256" },
|
|
2996
|
+
{ name: "gasPrice", type: "uint256" },
|
|
2997
|
+
{ name: "gasToken", type: "address" },
|
|
2998
|
+
{ name: "refundReceiver", type: "address" },
|
|
2999
|
+
{ name: "signatures", type: "bytes" }
|
|
3000
|
+
],
|
|
3001
|
+
outputs: [{ name: "success", type: "bool" }]
|
|
3002
|
+
},
|
|
3003
|
+
{
|
|
3004
|
+
type: "event",
|
|
3005
|
+
name: "ExecutionSuccess",
|
|
3006
|
+
inputs: [
|
|
3007
|
+
{ name: "txHash", type: "bytes32", indexed: true },
|
|
3008
|
+
{ name: "payment", type: "uint256", indexed: false }
|
|
3009
|
+
],
|
|
3010
|
+
anonymous: false
|
|
3011
|
+
},
|
|
3012
|
+
{
|
|
3013
|
+
type: "event",
|
|
3014
|
+
name: "ExecutionFailure",
|
|
3015
|
+
inputs: [
|
|
3016
|
+
{ name: "txHash", type: "bytes32", indexed: true },
|
|
3017
|
+
{ name: "payment", type: "uint256", indexed: false }
|
|
3018
|
+
],
|
|
3019
|
+
anonymous: false
|
|
3020
|
+
}
|
|
3021
|
+
];
|
|
3022
|
+
async function executeSafeEthTransfer(params) {
|
|
3023
|
+
const {
|
|
3024
|
+
walletClient,
|
|
3025
|
+
publicClient,
|
|
3026
|
+
safeAddress,
|
|
3027
|
+
recipient,
|
|
3028
|
+
amount,
|
|
3029
|
+
chainId
|
|
3030
|
+
} = params;
|
|
3031
|
+
const account = walletClient.account;
|
|
3032
|
+
const chain = walletClient.chain;
|
|
3033
|
+
if (!account || !chain) {
|
|
3034
|
+
throw new Error("Wallet not connected");
|
|
3035
|
+
}
|
|
3036
|
+
if (chain.id !== chainId) {
|
|
3037
|
+
throw new Error(`Switch to ${_chunk7JIDIX27cjs.getChainName.call(void 0, chainId)} to sign`);
|
|
3038
|
+
}
|
|
3039
|
+
const isOwner = await publicClient.readContract({
|
|
3040
|
+
address: safeAddress,
|
|
3041
|
+
abi: SAFE_ABI,
|
|
3042
|
+
functionName: "isOwner",
|
|
3043
|
+
args: [account.address]
|
|
3044
|
+
});
|
|
3045
|
+
if (!isOwner) {
|
|
3046
|
+
throw new Error("Connected wallet is not a Safe owner");
|
|
3047
|
+
}
|
|
3048
|
+
const safeTx = {
|
|
3049
|
+
to: recipient,
|
|
3050
|
+
value: amount,
|
|
3051
|
+
data: "0x",
|
|
3052
|
+
operation: 0,
|
|
3053
|
+
safeTxGas: 0n,
|
|
3054
|
+
baseGas: 0n,
|
|
3055
|
+
gasPrice: 0n,
|
|
3056
|
+
gasToken: _viem.zeroAddress,
|
|
3057
|
+
refundReceiver: _viem.zeroAddress
|
|
3058
|
+
};
|
|
3059
|
+
const signature = _viem.concat.call(void 0, [
|
|
3060
|
+
_viem.pad.call(void 0, account.address, { size: 32 }),
|
|
3061
|
+
_viem.pad.call(void 0, _viem.toHex.call(void 0, 0), { size: 32 }),
|
|
3062
|
+
_viem.toHex.call(void 0, 1, { size: 1 })
|
|
3063
|
+
]);
|
|
3064
|
+
const txHash = await walletClient.writeContract({
|
|
3065
|
+
account,
|
|
3066
|
+
chain,
|
|
3067
|
+
address: safeAddress,
|
|
3068
|
+
abi: SAFE_ABI,
|
|
3069
|
+
functionName: "execTransaction",
|
|
3070
|
+
args: [
|
|
3071
|
+
safeTx.to,
|
|
3072
|
+
safeTx.value,
|
|
3073
|
+
safeTx.data,
|
|
3074
|
+
safeTx.operation,
|
|
3075
|
+
safeTx.safeTxGas,
|
|
3076
|
+
safeTx.baseGas,
|
|
3077
|
+
safeTx.gasPrice,
|
|
3078
|
+
safeTx.gasToken,
|
|
3079
|
+
safeTx.refundReceiver,
|
|
3080
|
+
signature
|
|
3081
|
+
]
|
|
3082
|
+
});
|
|
3083
|
+
const receipt = await publicClient.waitForTransactionReceipt({
|
|
3084
|
+
hash: txHash
|
|
3085
|
+
});
|
|
3086
|
+
const safeLogs = receipt.logs.filter(
|
|
3087
|
+
(log) => log.address.toLowerCase() === safeAddress.toLowerCase()
|
|
3088
|
+
);
|
|
3089
|
+
const parsed = _viem.parseEventLogs.call(void 0, {
|
|
3090
|
+
abi: SAFE_ABI,
|
|
3091
|
+
logs: safeLogs,
|
|
3092
|
+
strict: false
|
|
3093
|
+
});
|
|
3094
|
+
const failed = parsed.find((log) => log.eventName === "ExecutionFailure");
|
|
3095
|
+
if (failed) {
|
|
3096
|
+
throw new Error("Safe transaction failed");
|
|
3097
|
+
}
|
|
3098
|
+
const succeeded = parsed.find((log) => log.eventName === "ExecutionSuccess");
|
|
3099
|
+
if (!succeeded) {
|
|
3100
|
+
throw new Error("Safe transaction status unavailable");
|
|
3101
|
+
}
|
|
3102
|
+
return { txHash };
|
|
3103
|
+
}
|
|
3104
|
+
async function executeSafeErc20Transfer(params) {
|
|
3105
|
+
const {
|
|
3106
|
+
walletClient,
|
|
3107
|
+
publicClient,
|
|
3108
|
+
safeAddress,
|
|
3109
|
+
tokenAddress,
|
|
3110
|
+
recipient,
|
|
3111
|
+
amount,
|
|
3112
|
+
chainId
|
|
3113
|
+
} = params;
|
|
3114
|
+
const account = walletClient.account;
|
|
3115
|
+
const chain = walletClient.chain;
|
|
3116
|
+
if (!account || !chain) {
|
|
3117
|
+
throw new Error("Wallet not connected");
|
|
3118
|
+
}
|
|
3119
|
+
if (chain.id !== chainId) {
|
|
3120
|
+
throw new Error(`Switch to ${_chunk7JIDIX27cjs.getChainName.call(void 0, chainId)} to sign`);
|
|
3121
|
+
}
|
|
3122
|
+
const isOwner = await publicClient.readContract({
|
|
3123
|
+
address: safeAddress,
|
|
3124
|
+
abi: SAFE_ABI,
|
|
3125
|
+
functionName: "isOwner",
|
|
3126
|
+
args: [account.address]
|
|
3127
|
+
});
|
|
3128
|
+
if (!isOwner) {
|
|
3129
|
+
throw new Error("Connected wallet is not a Safe owner");
|
|
3130
|
+
}
|
|
3131
|
+
const data = _viem.encodeFunctionData.call(void 0, {
|
|
3132
|
+
abi: _viem.erc20Abi,
|
|
3133
|
+
functionName: "transfer",
|
|
3134
|
+
args: [recipient, amount]
|
|
3135
|
+
});
|
|
3136
|
+
const safeTx = {
|
|
3137
|
+
to: tokenAddress,
|
|
3138
|
+
value: 0n,
|
|
3139
|
+
data,
|
|
3140
|
+
operation: 0,
|
|
3141
|
+
safeTxGas: 0n,
|
|
3142
|
+
baseGas: 0n,
|
|
3143
|
+
gasPrice: 0n,
|
|
3144
|
+
gasToken: _viem.zeroAddress,
|
|
3145
|
+
refundReceiver: _viem.zeroAddress
|
|
3146
|
+
};
|
|
3147
|
+
const signature = _viem.concat.call(void 0, [
|
|
3148
|
+
_viem.pad.call(void 0, account.address, { size: 32 }),
|
|
3149
|
+
_viem.pad.call(void 0, _viem.toHex.call(void 0, 0), { size: 32 }),
|
|
3150
|
+
_viem.toHex.call(void 0, 1, { size: 1 })
|
|
3151
|
+
]);
|
|
3152
|
+
const txHash = await walletClient.writeContract({
|
|
3153
|
+
account,
|
|
3154
|
+
chain,
|
|
3155
|
+
address: safeAddress,
|
|
3156
|
+
abi: SAFE_ABI,
|
|
3157
|
+
functionName: "execTransaction",
|
|
3158
|
+
args: [
|
|
3159
|
+
safeTx.to,
|
|
3160
|
+
safeTx.value,
|
|
3161
|
+
safeTx.data,
|
|
3162
|
+
safeTx.operation,
|
|
3163
|
+
safeTx.safeTxGas,
|
|
3164
|
+
safeTx.baseGas,
|
|
3165
|
+
safeTx.gasPrice,
|
|
3166
|
+
safeTx.gasToken,
|
|
3167
|
+
safeTx.refundReceiver,
|
|
3168
|
+
signature
|
|
3169
|
+
]
|
|
3170
|
+
});
|
|
3171
|
+
const receipt = await publicClient.waitForTransactionReceipt({
|
|
3172
|
+
hash: txHash
|
|
3173
|
+
});
|
|
3174
|
+
const safeLogs = receipt.logs.filter(
|
|
3175
|
+
(log) => log.address.toLowerCase() === safeAddress.toLowerCase()
|
|
3176
|
+
);
|
|
3177
|
+
const parsed = _viem.parseEventLogs.call(void 0, {
|
|
3178
|
+
abi: SAFE_ABI,
|
|
3179
|
+
logs: safeLogs,
|
|
3180
|
+
strict: false
|
|
3181
|
+
});
|
|
3182
|
+
const failed = parsed.find((log) => log.eventName === "ExecutionFailure");
|
|
3183
|
+
if (failed) {
|
|
3184
|
+
throw new Error("Safe transaction failed");
|
|
3185
|
+
}
|
|
3186
|
+
const succeeded = parsed.find((log) => log.eventName === "ExecutionSuccess");
|
|
3187
|
+
if (!succeeded) {
|
|
3188
|
+
throw new Error("Safe transaction status unavailable");
|
|
3189
|
+
}
|
|
3190
|
+
return { txHash };
|
|
3191
|
+
}
|
|
3192
|
+
var SAFE_TX_TYPES = {
|
|
3193
|
+
SafeTx: [
|
|
3194
|
+
{ name: "to", type: "address" },
|
|
3195
|
+
{ name: "value", type: "uint256" },
|
|
3196
|
+
{ name: "data", type: "bytes" },
|
|
3197
|
+
{ name: "operation", type: "uint8" },
|
|
3198
|
+
{ name: "safeTxGas", type: "uint256" },
|
|
3199
|
+
{ name: "baseGas", type: "uint256" },
|
|
3200
|
+
{ name: "gasPrice", type: "uint256" },
|
|
3201
|
+
{ name: "gasToken", type: "address" },
|
|
3202
|
+
{ name: "refundReceiver", type: "address" },
|
|
3203
|
+
{ name: "nonce", type: "uint256" }
|
|
3204
|
+
]
|
|
3205
|
+
};
|
|
3206
|
+
async function buildSafeTransaction(params) {
|
|
3207
|
+
const { publicClient, safeAddress, to, value, data, chainId } = params;
|
|
3208
|
+
const nonce = await publicClient.readContract({
|
|
3209
|
+
address: safeAddress,
|
|
3210
|
+
abi: SAFE_ABI,
|
|
3211
|
+
functionName: "nonce"
|
|
3212
|
+
});
|
|
3213
|
+
const message = {
|
|
3214
|
+
to,
|
|
3215
|
+
value,
|
|
3216
|
+
data,
|
|
3217
|
+
operation: 0,
|
|
3218
|
+
safeTxGas: 0n,
|
|
3219
|
+
baseGas: 0n,
|
|
3220
|
+
gasPrice: 0n,
|
|
3221
|
+
gasToken: _viem.zeroAddress,
|
|
3222
|
+
refundReceiver: _viem.zeroAddress,
|
|
3223
|
+
nonce
|
|
3224
|
+
};
|
|
3225
|
+
const safeTxHash = _viem.hashTypedData.call(void 0, {
|
|
3226
|
+
domain: { chainId, verifyingContract: safeAddress },
|
|
3227
|
+
types: SAFE_TX_TYPES,
|
|
3228
|
+
primaryType: "SafeTx",
|
|
3229
|
+
message
|
|
3230
|
+
});
|
|
3231
|
+
return {
|
|
3232
|
+
chainId,
|
|
3233
|
+
safeAddress,
|
|
3234
|
+
safeTxHash,
|
|
3235
|
+
typedData: {
|
|
3236
|
+
domain: { chainId, verifyingContract: safeAddress },
|
|
3237
|
+
types: SAFE_TX_TYPES,
|
|
3238
|
+
primaryType: "SafeTx",
|
|
3239
|
+
message
|
|
3240
|
+
}
|
|
3241
|
+
};
|
|
3242
|
+
}
|
|
3243
|
+
|
|
2567
3244
|
// src/core/public-client.ts
|
|
2568
3245
|
|
|
2569
3246
|
var clientCache = /* @__PURE__ */ new Map();
|
|
2570
3247
|
function getPublicClient(chainId) {
|
|
2571
3248
|
let client = clientCache.get(chainId);
|
|
2572
3249
|
if (!client) {
|
|
2573
|
-
const chain =
|
|
3250
|
+
const chain = _chunk7JIDIX27cjs.CHAIN_BY_ID[chainId];
|
|
2574
3251
|
client = _viem.createPublicClient.call(void 0, {
|
|
2575
3252
|
chain,
|
|
2576
3253
|
transport: _viem.http.call(void 0, )
|
|
@@ -2580,6 +3257,62 @@ function getPublicClient(chainId) {
|
|
|
2580
3257
|
return client;
|
|
2581
3258
|
}
|
|
2582
3259
|
|
|
3260
|
+
// src/core/session-owner.ts
|
|
3261
|
+
|
|
3262
|
+
|
|
3263
|
+
|
|
3264
|
+
|
|
3265
|
+
var _accounts = require('viem/accounts');
|
|
3266
|
+
var STORAGE_PREFIX = "rhinestone:session-owner";
|
|
3267
|
+
function storageKey(eoaAddress) {
|
|
3268
|
+
return `${STORAGE_PREFIX}:${eoaAddress.toLowerCase()}`;
|
|
3269
|
+
}
|
|
3270
|
+
function loadSessionOwnerFromStorage(eoaAddress) {
|
|
3271
|
+
if (typeof window === "undefined") return null;
|
|
3272
|
+
const raw = window.localStorage.getItem(storageKey(eoaAddress));
|
|
3273
|
+
if (!raw) return null;
|
|
3274
|
+
try {
|
|
3275
|
+
const parsed = JSON.parse(raw);
|
|
3276
|
+
if (!parsed.privateKey) return null;
|
|
3277
|
+
const account = _accounts.privateKeyToAccount.call(void 0, parsed.privateKey);
|
|
3278
|
+
return {
|
|
3279
|
+
privateKey: parsed.privateKey,
|
|
3280
|
+
address: account.address
|
|
3281
|
+
};
|
|
3282
|
+
} catch (e6) {
|
|
3283
|
+
return null;
|
|
3284
|
+
}
|
|
3285
|
+
}
|
|
3286
|
+
function saveSessionOwnerToStorage(eoaAddress, privateKey, address) {
|
|
3287
|
+
if (typeof window === "undefined") return;
|
|
3288
|
+
if (!_viem.isAddress.call(void 0, address)) return;
|
|
3289
|
+
const payload = {
|
|
3290
|
+
privateKey,
|
|
3291
|
+
address,
|
|
3292
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
3293
|
+
};
|
|
3294
|
+
window.localStorage.setItem(storageKey(eoaAddress), JSON.stringify(payload));
|
|
3295
|
+
}
|
|
3296
|
+
function createSessionOwnerKey() {
|
|
3297
|
+
const privateKey = _accounts.generatePrivateKey.call(void 0, );
|
|
3298
|
+
const account = _accounts.privateKeyToAccount.call(void 0, privateKey);
|
|
3299
|
+
return {
|
|
3300
|
+
privateKey,
|
|
3301
|
+
account,
|
|
3302
|
+
address: account.address
|
|
3303
|
+
};
|
|
3304
|
+
}
|
|
3305
|
+
function accountFromPrivateKey(privateKey) {
|
|
3306
|
+
return _accounts.privateKeyToAccount.call(void 0, privateKey);
|
|
3307
|
+
}
|
|
3308
|
+
|
|
3309
|
+
|
|
3310
|
+
|
|
3311
|
+
|
|
3312
|
+
|
|
3313
|
+
|
|
3314
|
+
|
|
3315
|
+
|
|
2583
3316
|
|
|
2584
3317
|
|
|
2585
3318
|
|
|
@@ -2628,4 +3361,4 @@ function getPublicClient(chainId) {
|
|
|
2628
3361
|
|
|
2629
3362
|
|
|
2630
3363
|
|
|
2631
|
-
exports.Modal = Modal; exports.WalletIcon = WalletIcon; exports.ExternalLinkIcon = ExternalLinkIcon; exports.CheckIcon = CheckIcon; exports.
|
|
3364
|
+
exports.Modal = Modal; exports.WalletIcon = WalletIcon; exports.ExternalLinkIcon = ExternalLinkIcon; exports.CheckIcon = CheckIcon; exports.TransferCryptoIcon = TransferCryptoIcon; exports.ChevronLeftIcon = ChevronLeftIcon; exports.ChevronDownIcon = ChevronDownIcon; exports.CloseIcon = CloseIcon; exports.HistoryIcon = HistoryIcon; exports.InfoIcon = InfoIcon; exports.CopyIcon = CopyIcon; exports.ArrowUpRightIcon = ArrowUpRightIcon; exports.AlertTriangleIcon = AlertTriangleIcon; exports.PercentIcon = PercentIcon; exports.ClockIcon = ClockIcon; exports.PlusCircleIcon = PlusCircleIcon; exports.CircleArrowOutUpLeftIcon = CircleArrowOutUpLeftIcon; exports.BodyHeader = BodyHeader; exports.PoweredBy = PoweredBy; exports.Spinner = Spinner; exports.ConnectStep = ConnectStep; exports.useLatestRef = useLatestRef; exports.Button = Button; exports.Callout = Callout; exports.debugLog = debugLog; exports.debugError = debugError; exports.toEvmCaip2 = toEvmCaip2; exports.targetChainToCaip2 = targetChainToCaip2; exports.parseEvmChainId = parseEvmChainId; exports.isSolanaCaip2 = isSolanaCaip2; exports.getAssetId = getAssetId; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.buildSessionDetails = buildSessionDetails; exports.createDepositService = createDepositService; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.isUnsupportedChainSwitchError = isUnsupportedChainSwitchError; exports.formatUserError = formatUserError; exports.Tooltip = Tooltip; exports.getEventTxHash = getEventTxHash; exports.isDepositEvent = isDepositEvent; exports.txRefsMatch = txRefsMatch; exports.ProcessingStep = ProcessingStep; exports.SAFE_ABI = SAFE_ABI; exports.executeSafeEthTransfer = executeSafeEthTransfer; exports.executeSafeErc20Transfer = executeSafeErc20Transfer; exports.buildSafeTransaction = buildSafeTransaction; exports.getPublicClient = getPublicClient; exports.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.applyTheme = applyTheme;
|