@swype-org/react-sdk 0.2.297 → 0.2.309
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/index.cjs +853 -545
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +52 -6
- package/dist/index.d.ts +52 -6
- package/dist/index.js +853 -546
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -65,6 +65,7 @@ var darkTheme = {
|
|
|
65
65
|
accent: "#B2FF93",
|
|
66
66
|
accentHover: "#8FD974",
|
|
67
67
|
accentText: "#1B4332",
|
|
68
|
+
highlight: "#B2FF93",
|
|
68
69
|
success: "#0f9d73",
|
|
69
70
|
successBg: "#0f2f2a",
|
|
70
71
|
error: "#d46a72",
|
|
@@ -96,6 +97,7 @@ var lightTheme = {
|
|
|
96
97
|
accent: "#B2FF93",
|
|
97
98
|
accentHover: "#8FD974",
|
|
98
99
|
accentText: "#1B4332",
|
|
100
|
+
highlight: "#B2FF93",
|
|
99
101
|
success: "#0f9d73",
|
|
100
102
|
successBg: "#e6f7f1",
|
|
101
103
|
error: "#ce6670",
|
|
@@ -137,6 +139,8 @@ var lightThemeNew = {
|
|
|
137
139
|
accent: "#000000",
|
|
138
140
|
accentHover: "#1a1a1a",
|
|
139
141
|
accentText: "#fafafa",
|
|
142
|
+
// Figma `accent` token (#eaff03) — the lime "0% FEES" chip.
|
|
143
|
+
highlight: "#eaff03",
|
|
140
144
|
success: "#0f9d73",
|
|
141
145
|
successBg: "#e6f7f1",
|
|
142
146
|
error: "#ce6670",
|
|
@@ -541,12 +545,16 @@ function buildSelectSourceChoices(options, minTransferAmountUsd = DEFAULT_MIN_SE
|
|
|
541
545
|
} else if (!existing.walletName && option.walletName) {
|
|
542
546
|
existing.walletName = option.walletName;
|
|
543
547
|
}
|
|
548
|
+
if (!existing.logoURI && option.logoURI) {
|
|
549
|
+
existing.logoURI = option.logoURI;
|
|
550
|
+
}
|
|
544
551
|
} else {
|
|
545
552
|
chainChoice.tokens.push({
|
|
546
553
|
tokenSymbol,
|
|
547
554
|
balance,
|
|
548
555
|
...option.walletName ? { walletName: option.walletName } : {},
|
|
549
|
-
...option.walletLogoUrl ? { walletLogoUrl: option.walletLogoUrl } : {}
|
|
556
|
+
...option.walletLogoUrl ? { walletLogoUrl: option.walletLogoUrl } : {},
|
|
557
|
+
...option.logoURI ? { logoURI: option.logoURI } : {}
|
|
550
558
|
});
|
|
551
559
|
}
|
|
552
560
|
}
|
|
@@ -1407,6 +1415,263 @@ async function revokeAndDisconnectActiveWagmiConnector(wagmiConfig) {
|
|
|
1407
1415
|
});
|
|
1408
1416
|
}
|
|
1409
1417
|
|
|
1418
|
+
// src/solanaWalletRuntime.ts
|
|
1419
|
+
function asSigner(adapter) {
|
|
1420
|
+
return adapter;
|
|
1421
|
+
}
|
|
1422
|
+
var PHANTOM_SOLANA_CONNECT_TIMEOUT_MESSAGE = "PHANTOM_SOLANA_CONNECT_TIMEOUT";
|
|
1423
|
+
var APPROVE_SPL_CONFIRMATION_TIMEOUT_MESSAGE = "APPROVE_SPL_CONFIRMATION_TIMEOUT";
|
|
1424
|
+
var APPROVE_SPL_ONCHAIN_FAILURE_PREFIX = "Solana transaction failed:";
|
|
1425
|
+
var DEFAULT_CONFIRM_TIMEOUT_MS = 45e3;
|
|
1426
|
+
var DEFAULT_POLL_INTERVAL_MS = 1e3;
|
|
1427
|
+
var DEFAULT_COMMITMENT = "confirmed";
|
|
1428
|
+
var cachedAdapter = null;
|
|
1429
|
+
var cachedProviderKey = null;
|
|
1430
|
+
function providerKey(selection) {
|
|
1431
|
+
const providerName = selection.providerName?.trim();
|
|
1432
|
+
if (!providerName) {
|
|
1433
|
+
throw new Error("Solana wallet metadata is missing providerName.");
|
|
1434
|
+
}
|
|
1435
|
+
return `${selection.providerId ?? ""}:${providerName.toLowerCase()}`;
|
|
1436
|
+
}
|
|
1437
|
+
function assertSupportedProvider(selection) {
|
|
1438
|
+
const name = selection.providerName?.trim().toLowerCase();
|
|
1439
|
+
if (name !== "phantom") {
|
|
1440
|
+
throw new Error(`Unsupported Solana wallet provider: ${selection.providerName ?? "unknown"}.`);
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
async function createAdapter(selection) {
|
|
1444
|
+
assertSupportedProvider(selection);
|
|
1445
|
+
const { PhantomWalletAdapter } = await import('@solana/wallet-adapter-phantom');
|
|
1446
|
+
return new PhantomWalletAdapter();
|
|
1447
|
+
}
|
|
1448
|
+
function readPublicKey(adapter) {
|
|
1449
|
+
const publicKey = adapter.publicKey?.toBase58();
|
|
1450
|
+
if (!publicKey) {
|
|
1451
|
+
throw new Error("Solana wallet did not return a public key.");
|
|
1452
|
+
}
|
|
1453
|
+
return publicKey;
|
|
1454
|
+
}
|
|
1455
|
+
async function connectSolanaWallet(selection, options) {
|
|
1456
|
+
const key = providerKey(selection);
|
|
1457
|
+
if (!cachedAdapter || cachedProviderKey !== key) {
|
|
1458
|
+
cachedAdapter = await createAdapter(selection);
|
|
1459
|
+
cachedProviderKey = key;
|
|
1460
|
+
}
|
|
1461
|
+
if (!cachedAdapter.connected) {
|
|
1462
|
+
const adapter = cachedAdapter;
|
|
1463
|
+
const connectPromise = adapter.connect();
|
|
1464
|
+
const timeoutMs = options?.timeoutMs;
|
|
1465
|
+
if (typeof timeoutMs === "number" && timeoutMs > 0) {
|
|
1466
|
+
let timeoutHandle = null;
|
|
1467
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
1468
|
+
timeoutHandle = setTimeout(() => {
|
|
1469
|
+
reject(new Error(PHANTOM_SOLANA_CONNECT_TIMEOUT_MESSAGE));
|
|
1470
|
+
}, timeoutMs);
|
|
1471
|
+
});
|
|
1472
|
+
try {
|
|
1473
|
+
await Promise.race([connectPromise, timeoutPromise]);
|
|
1474
|
+
} finally {
|
|
1475
|
+
if (timeoutHandle) clearTimeout(timeoutHandle);
|
|
1476
|
+
}
|
|
1477
|
+
} else {
|
|
1478
|
+
await connectPromise;
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
return {
|
|
1482
|
+
adapter: cachedAdapter,
|
|
1483
|
+
publicKey: readPublicKey(cachedAdapter)
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
async function signSolanaTransaction(selection, unsignedTxBase64, expectedOwnerPubkey) {
|
|
1487
|
+
const { adapter, publicKey } = await connectSolanaWallet(selection);
|
|
1488
|
+
if (publicKey !== expectedOwnerPubkey) {
|
|
1489
|
+
throw new Error(
|
|
1490
|
+
`Connected Solana wallet ${publicKey} does not match the required source wallet ${expectedOwnerPubkey}. Please switch accounts in Phantom and retry.`
|
|
1491
|
+
);
|
|
1492
|
+
}
|
|
1493
|
+
const signer = asSigner(adapter);
|
|
1494
|
+
if (typeof signer.signTransaction !== "function") {
|
|
1495
|
+
throw new Error("Selected Solana wallet does not support transaction signing.");
|
|
1496
|
+
}
|
|
1497
|
+
const transaction = await deserializeTransaction(unsignedTxBase64);
|
|
1498
|
+
const signedTransaction = await signer.signTransaction(transaction);
|
|
1499
|
+
return {
|
|
1500
|
+
ownerPubkey: publicKey,
|
|
1501
|
+
signedTxBase64: bytesToBase64(serializeTransaction(signedTransaction))
|
|
1502
|
+
};
|
|
1503
|
+
}
|
|
1504
|
+
async function deserializeTransaction(unsignedTxBase64) {
|
|
1505
|
+
const { Transaction, VersionedTransaction } = await import('@solana/web3.js');
|
|
1506
|
+
const bytes = base64ToBytes(unsignedTxBase64);
|
|
1507
|
+
try {
|
|
1508
|
+
return Transaction.from(bytes);
|
|
1509
|
+
} catch {
|
|
1510
|
+
return VersionedTransaction.deserialize(bytes);
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
function serializeTransaction(transaction) {
|
|
1514
|
+
if ("version" in transaction) {
|
|
1515
|
+
return transaction.serialize();
|
|
1516
|
+
}
|
|
1517
|
+
return transaction.serialize({
|
|
1518
|
+
requireAllSignatures: false,
|
|
1519
|
+
verifySignatures: false
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
function base64ToBytes(value) {
|
|
1523
|
+
if (typeof globalThis.atob === "function") {
|
|
1524
|
+
const binary = globalThis.atob(value);
|
|
1525
|
+
const bytes = new Uint8Array(binary.length);
|
|
1526
|
+
for (let i = 0; i < binary.length; i++) {
|
|
1527
|
+
bytes[i] = binary.charCodeAt(i);
|
|
1528
|
+
}
|
|
1529
|
+
return bytes;
|
|
1530
|
+
}
|
|
1531
|
+
const bufferCtor = globalThis.Buffer;
|
|
1532
|
+
if (bufferCtor) {
|
|
1533
|
+
return bufferCtor.from(value, "base64");
|
|
1534
|
+
}
|
|
1535
|
+
throw new Error("Base64 decoding is not available in this environment.");
|
|
1536
|
+
}
|
|
1537
|
+
function bytesToBase64(bytes) {
|
|
1538
|
+
if (typeof globalThis.btoa === "function") {
|
|
1539
|
+
let binary = "";
|
|
1540
|
+
for (const byte of bytes) {
|
|
1541
|
+
binary += String.fromCharCode(byte);
|
|
1542
|
+
}
|
|
1543
|
+
return globalThis.btoa(binary);
|
|
1544
|
+
}
|
|
1545
|
+
const bufferCtor = globalThis.Buffer;
|
|
1546
|
+
if (bufferCtor) {
|
|
1547
|
+
return bufferCtor.from(bytes).toString("base64");
|
|
1548
|
+
}
|
|
1549
|
+
throw new Error("Base64 encoding is not available in this environment.");
|
|
1550
|
+
}
|
|
1551
|
+
async function signAndSendApproveSplViaWallet(params) {
|
|
1552
|
+
const rpcUrl = params.rpcUrl?.trim();
|
|
1553
|
+
if (!rpcUrl) {
|
|
1554
|
+
throw new Error("signAndSendApproveSplViaWallet requires an rpcUrl.");
|
|
1555
|
+
}
|
|
1556
|
+
const unsignedTxBase64 = params.unsignedTxBase64?.trim();
|
|
1557
|
+
if (!unsignedTxBase64) {
|
|
1558
|
+
throw new Error("signAndSendApproveSplViaWallet requires unsignedTxBase64.");
|
|
1559
|
+
}
|
|
1560
|
+
const commitment = params.commitment ?? DEFAULT_COMMITMENT;
|
|
1561
|
+
const { adapter, publicKey } = await connectSolanaWallet(params.selection);
|
|
1562
|
+
if (publicKey !== params.expectedOwnerPubkey) {
|
|
1563
|
+
throw new Error(
|
|
1564
|
+
`Connected Solana wallet ${publicKey} does not match the required source wallet ${params.expectedOwnerPubkey}. Please switch accounts in Phantom and retry.`
|
|
1565
|
+
);
|
|
1566
|
+
}
|
|
1567
|
+
if (!adapter.sendTransaction) {
|
|
1568
|
+
throw new Error("Selected Solana wallet does not support sendTransaction.");
|
|
1569
|
+
}
|
|
1570
|
+
const transaction = await deserializeTransaction(unsignedTxBase64);
|
|
1571
|
+
const connection = await defaultConnectionFactory(rpcUrl, commitment);
|
|
1572
|
+
const signature = await adapter.sendTransaction(
|
|
1573
|
+
transaction,
|
|
1574
|
+
connection,
|
|
1575
|
+
{
|
|
1576
|
+
preflightCommitment: commitment,
|
|
1577
|
+
maxRetries: 3
|
|
1578
|
+
}
|
|
1579
|
+
);
|
|
1580
|
+
return { ownerPubkey: publicKey, signature };
|
|
1581
|
+
}
|
|
1582
|
+
async function confirmApproveSplViaPolling(params) {
|
|
1583
|
+
const rpcUrl = params.rpcUrl?.trim();
|
|
1584
|
+
if (!rpcUrl) {
|
|
1585
|
+
throw new Error("confirmApproveSplViaPolling requires an rpcUrl.");
|
|
1586
|
+
}
|
|
1587
|
+
const signature = params.signature?.trim();
|
|
1588
|
+
if (!signature) {
|
|
1589
|
+
throw new Error("confirmApproveSplViaPolling requires a signature.");
|
|
1590
|
+
}
|
|
1591
|
+
const confirmTimeoutMs = params.confirmTimeoutMs ?? DEFAULT_CONFIRM_TIMEOUT_MS;
|
|
1592
|
+
const pollIntervalMs = params.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
|
|
1593
|
+
const commitment = params.commitment ?? DEFAULT_COMMITMENT;
|
|
1594
|
+
const connection = await defaultConnectionFactory(rpcUrl, commitment);
|
|
1595
|
+
const slot = await pollForConfirmation({
|
|
1596
|
+
connection,
|
|
1597
|
+
signature,
|
|
1598
|
+
confirmTimeoutMs,
|
|
1599
|
+
pollIntervalMs
|
|
1600
|
+
});
|
|
1601
|
+
return { signature, slot };
|
|
1602
|
+
}
|
|
1603
|
+
async function defaultConnectionFactory(rpcUrl, commitment) {
|
|
1604
|
+
const { Connection } = await import('@solana/web3.js');
|
|
1605
|
+
return new Connection(rpcUrl, commitment);
|
|
1606
|
+
}
|
|
1607
|
+
async function pollForConfirmation(args) {
|
|
1608
|
+
const { connection, signature, confirmTimeoutMs, pollIntervalMs } = args;
|
|
1609
|
+
const expiresAt = Date.now() + confirmTimeoutMs;
|
|
1610
|
+
while (Date.now() <= expiresAt) {
|
|
1611
|
+
const result = await connection.getSignatureStatuses(
|
|
1612
|
+
[signature],
|
|
1613
|
+
{ searchTransactionHistory: true }
|
|
1614
|
+
);
|
|
1615
|
+
const status = result.value[0];
|
|
1616
|
+
if (status?.err) {
|
|
1617
|
+
throw new Error(`${APPROVE_SPL_ONCHAIN_FAILURE_PREFIX} ${JSON.stringify(status.err)}`);
|
|
1618
|
+
}
|
|
1619
|
+
const confirmationStatus = status?.confirmationStatus;
|
|
1620
|
+
if (confirmationStatus === "confirmed" || confirmationStatus === "finalized") {
|
|
1621
|
+
return status?.slot;
|
|
1622
|
+
}
|
|
1623
|
+
await sleep(pollIntervalMs);
|
|
1624
|
+
}
|
|
1625
|
+
throw new Error(APPROVE_SPL_CONFIRMATION_TIMEOUT_MESSAGE);
|
|
1626
|
+
}
|
|
1627
|
+
function sleep(ms) {
|
|
1628
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
1629
|
+
}
|
|
1630
|
+
function getInjectedSolanaProvider(windowImpl) {
|
|
1631
|
+
const win = (typeof window === "undefined" ? void 0 : window);
|
|
1632
|
+
if (!win) return null;
|
|
1633
|
+
return win.phantom?.solana ?? win.solana ?? null;
|
|
1634
|
+
}
|
|
1635
|
+
async function disconnectSolanaWallet(windowImpl) {
|
|
1636
|
+
const adapter = cachedAdapter;
|
|
1637
|
+
cachedAdapter = null;
|
|
1638
|
+
cachedProviderKey = null;
|
|
1639
|
+
if (adapter?.connected) {
|
|
1640
|
+
try {
|
|
1641
|
+
console.info("[blink-sdk][solana-disconnect] disconnecting cached adapter");
|
|
1642
|
+
await adapter.disconnect();
|
|
1643
|
+
console.info("[blink-sdk][solana-disconnect] ok (cached adapter)");
|
|
1644
|
+
return;
|
|
1645
|
+
} catch (err) {
|
|
1646
|
+
console.warn("[blink-sdk][solana-disconnect] cached adapter disconnect failed", {
|
|
1647
|
+
message: err instanceof Error ? err.message : String(err)
|
|
1648
|
+
});
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
const provider = getInjectedSolanaProvider();
|
|
1652
|
+
if (!provider) {
|
|
1653
|
+
console.info("[blink-sdk][solana-disconnect] no cached adapter and no injected provider \u2014 nothing to disconnect");
|
|
1654
|
+
return;
|
|
1655
|
+
}
|
|
1656
|
+
if (provider.isConnected === false) {
|
|
1657
|
+
console.info("[blink-sdk][solana-disconnect] injected provider already disconnected");
|
|
1658
|
+
return;
|
|
1659
|
+
}
|
|
1660
|
+
if (typeof provider.disconnect !== "function") {
|
|
1661
|
+
console.warn("[blink-sdk][solana-disconnect] injected provider has no disconnect() method");
|
|
1662
|
+
return;
|
|
1663
|
+
}
|
|
1664
|
+
try {
|
|
1665
|
+
console.info("[blink-sdk][solana-disconnect] disconnecting injected provider");
|
|
1666
|
+
await provider.disconnect();
|
|
1667
|
+
console.info("[blink-sdk][solana-disconnect] ok (injected provider)");
|
|
1668
|
+
} catch (err) {
|
|
1669
|
+
console.warn("[blink-sdk][solana-disconnect] injected provider disconnect failed", {
|
|
1670
|
+
message: err instanceof Error ? err.message : String(err)
|
|
1671
|
+
});
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1410
1675
|
// src/otherWalletConnect.ts
|
|
1411
1676
|
function findWalletConnectConnector(connectors) {
|
|
1412
1677
|
return connectors.find((connector) => {
|
|
@@ -1836,6 +2101,7 @@ __export(api_exports, {
|
|
|
1836
2101
|
setAuthorizationSessionPaymentIntentAmount: () => setAuthorizationSessionPaymentIntentAmount,
|
|
1837
2102
|
setAuthorizationSessionProvider: () => setAuthorizationSessionProvider,
|
|
1838
2103
|
signTransfer: () => signTransfer,
|
|
2104
|
+
updateManualTransferDepositTargetChain: () => updateManualTransferDepositTargetChain,
|
|
1839
2105
|
updateUserConfig: () => updateUserConfig,
|
|
1840
2106
|
updateUserConfigBySession: () => updateUserConfigBySession,
|
|
1841
2107
|
waitForActionTransactionReceipt: () => waitForActionTransactionReceipt
|
|
@@ -2234,6 +2500,15 @@ async function fetchManualTransferSession(apiBaseUrl, sessionId) {
|
|
|
2234
2500
|
if (!res.ok) await throwApiError(res);
|
|
2235
2501
|
return await res.json();
|
|
2236
2502
|
}
|
|
2503
|
+
async function updateManualTransferDepositTargetChain(apiBaseUrl, sessionId, selectedChainId) {
|
|
2504
|
+
const res = await fetch(`${apiBaseUrl}/v1/manual-transfers/${sessionId}`, {
|
|
2505
|
+
method: "PATCH",
|
|
2506
|
+
headers: { "Content-Type": "application/json" },
|
|
2507
|
+
body: JSON.stringify({ selectedChainId })
|
|
2508
|
+
});
|
|
2509
|
+
if (!res.ok) await throwApiError(res);
|
|
2510
|
+
return await res.json();
|
|
2511
|
+
}
|
|
2237
2512
|
async function refreshManualTransferQuote(apiBaseUrl, sessionId) {
|
|
2238
2513
|
const res = await fetch(
|
|
2239
2514
|
`${apiBaseUrl}/v1/manual-transfers/${sessionId}/refresh-quote`,
|
|
@@ -2986,7 +3261,7 @@ async function waitForWalletNonceAgreement(params) {
|
|
|
2986
3261
|
}
|
|
2987
3262
|
|
|
2988
3263
|
// src/walletCallsStatus.ts
|
|
2989
|
-
var
|
|
3264
|
+
var DEFAULT_POLL_INTERVAL_MS2 = 2e3;
|
|
2990
3265
|
var DEFAULT_MAX_ATTEMPTS = 60;
|
|
2991
3266
|
var DEFAULT_REQUEST_TIMEOUT_MS = 8e3;
|
|
2992
3267
|
var DEFAULT_MAX_CONSECUTIVE_ERRORS = 5;
|
|
@@ -3008,7 +3283,7 @@ function classifyCallsStatus(status) {
|
|
|
3008
3283
|
return "pending";
|
|
3009
3284
|
}
|
|
3010
3285
|
async function pollWalletCallsStatus(walletClient, callsId, options = {}) {
|
|
3011
|
-
const pollIntervalMs = options.pollIntervalMs ??
|
|
3286
|
+
const pollIntervalMs = options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS2;
|
|
3012
3287
|
const maxAttempts = options.maxAttempts ?? DEFAULT_MAX_ATTEMPTS;
|
|
3013
3288
|
const requestTimeoutMs = options.requestTimeoutMs ?? DEFAULT_REQUEST_TIMEOUT_MS;
|
|
3014
3289
|
const maxConsecutiveErrors = options.maxConsecutiveErrors ?? DEFAULT_MAX_CONSECUTIVE_ERRORS;
|
|
@@ -3126,219 +3401,6 @@ async function withWatchdog(promise, label, options = {}) {
|
|
|
3126
3401
|
}
|
|
3127
3402
|
}
|
|
3128
3403
|
|
|
3129
|
-
// src/solanaWalletRuntime.ts
|
|
3130
|
-
function asSigner(adapter) {
|
|
3131
|
-
return adapter;
|
|
3132
|
-
}
|
|
3133
|
-
var PHANTOM_SOLANA_CONNECT_TIMEOUT_MESSAGE = "PHANTOM_SOLANA_CONNECT_TIMEOUT";
|
|
3134
|
-
var APPROVE_SPL_CONFIRMATION_TIMEOUT_MESSAGE = "APPROVE_SPL_CONFIRMATION_TIMEOUT";
|
|
3135
|
-
var APPROVE_SPL_ONCHAIN_FAILURE_PREFIX = "Solana transaction failed:";
|
|
3136
|
-
var DEFAULT_CONFIRM_TIMEOUT_MS = 45e3;
|
|
3137
|
-
var DEFAULT_POLL_INTERVAL_MS2 = 1e3;
|
|
3138
|
-
var DEFAULT_COMMITMENT = "confirmed";
|
|
3139
|
-
var cachedAdapter = null;
|
|
3140
|
-
var cachedProviderKey = null;
|
|
3141
|
-
function providerKey(selection) {
|
|
3142
|
-
const providerName = selection.providerName?.trim();
|
|
3143
|
-
if (!providerName) {
|
|
3144
|
-
throw new Error("Solana wallet metadata is missing providerName.");
|
|
3145
|
-
}
|
|
3146
|
-
return `${selection.providerId ?? ""}:${providerName.toLowerCase()}`;
|
|
3147
|
-
}
|
|
3148
|
-
function assertSupportedProvider(selection) {
|
|
3149
|
-
const name = selection.providerName?.trim().toLowerCase();
|
|
3150
|
-
if (name !== "phantom") {
|
|
3151
|
-
throw new Error(`Unsupported Solana wallet provider: ${selection.providerName ?? "unknown"}.`);
|
|
3152
|
-
}
|
|
3153
|
-
}
|
|
3154
|
-
async function createAdapter(selection) {
|
|
3155
|
-
assertSupportedProvider(selection);
|
|
3156
|
-
const { PhantomWalletAdapter } = await import('@solana/wallet-adapter-phantom');
|
|
3157
|
-
return new PhantomWalletAdapter();
|
|
3158
|
-
}
|
|
3159
|
-
function readPublicKey(adapter) {
|
|
3160
|
-
const publicKey = adapter.publicKey?.toBase58();
|
|
3161
|
-
if (!publicKey) {
|
|
3162
|
-
throw new Error("Solana wallet did not return a public key.");
|
|
3163
|
-
}
|
|
3164
|
-
return publicKey;
|
|
3165
|
-
}
|
|
3166
|
-
async function connectSolanaWallet(selection, options) {
|
|
3167
|
-
const key = providerKey(selection);
|
|
3168
|
-
if (!cachedAdapter || cachedProviderKey !== key) {
|
|
3169
|
-
cachedAdapter = await createAdapter(selection);
|
|
3170
|
-
cachedProviderKey = key;
|
|
3171
|
-
}
|
|
3172
|
-
if (!cachedAdapter.connected) {
|
|
3173
|
-
const adapter = cachedAdapter;
|
|
3174
|
-
const connectPromise = adapter.connect();
|
|
3175
|
-
const timeoutMs = options?.timeoutMs;
|
|
3176
|
-
if (typeof timeoutMs === "number" && timeoutMs > 0) {
|
|
3177
|
-
let timeoutHandle = null;
|
|
3178
|
-
const timeoutPromise = new Promise((_, reject) => {
|
|
3179
|
-
timeoutHandle = setTimeout(() => {
|
|
3180
|
-
reject(new Error(PHANTOM_SOLANA_CONNECT_TIMEOUT_MESSAGE));
|
|
3181
|
-
}, timeoutMs);
|
|
3182
|
-
});
|
|
3183
|
-
try {
|
|
3184
|
-
await Promise.race([connectPromise, timeoutPromise]);
|
|
3185
|
-
} finally {
|
|
3186
|
-
if (timeoutHandle) clearTimeout(timeoutHandle);
|
|
3187
|
-
}
|
|
3188
|
-
} else {
|
|
3189
|
-
await connectPromise;
|
|
3190
|
-
}
|
|
3191
|
-
}
|
|
3192
|
-
return {
|
|
3193
|
-
adapter: cachedAdapter,
|
|
3194
|
-
publicKey: readPublicKey(cachedAdapter)
|
|
3195
|
-
};
|
|
3196
|
-
}
|
|
3197
|
-
async function signSolanaTransaction(selection, unsignedTxBase64, expectedOwnerPubkey) {
|
|
3198
|
-
const { adapter, publicKey } = await connectSolanaWallet(selection);
|
|
3199
|
-
if (publicKey !== expectedOwnerPubkey) {
|
|
3200
|
-
throw new Error(
|
|
3201
|
-
`Connected Solana wallet ${publicKey} does not match the required source wallet ${expectedOwnerPubkey}. Please switch accounts in Phantom and retry.`
|
|
3202
|
-
);
|
|
3203
|
-
}
|
|
3204
|
-
const signer = asSigner(adapter);
|
|
3205
|
-
if (typeof signer.signTransaction !== "function") {
|
|
3206
|
-
throw new Error("Selected Solana wallet does not support transaction signing.");
|
|
3207
|
-
}
|
|
3208
|
-
const transaction = await deserializeTransaction(unsignedTxBase64);
|
|
3209
|
-
const signedTransaction = await signer.signTransaction(transaction);
|
|
3210
|
-
return {
|
|
3211
|
-
ownerPubkey: publicKey,
|
|
3212
|
-
signedTxBase64: bytesToBase64(serializeTransaction(signedTransaction))
|
|
3213
|
-
};
|
|
3214
|
-
}
|
|
3215
|
-
async function deserializeTransaction(unsignedTxBase64) {
|
|
3216
|
-
const { Transaction, VersionedTransaction } = await import('@solana/web3.js');
|
|
3217
|
-
const bytes = base64ToBytes(unsignedTxBase64);
|
|
3218
|
-
try {
|
|
3219
|
-
return Transaction.from(bytes);
|
|
3220
|
-
} catch {
|
|
3221
|
-
return VersionedTransaction.deserialize(bytes);
|
|
3222
|
-
}
|
|
3223
|
-
}
|
|
3224
|
-
function serializeTransaction(transaction) {
|
|
3225
|
-
if ("version" in transaction) {
|
|
3226
|
-
return transaction.serialize();
|
|
3227
|
-
}
|
|
3228
|
-
return transaction.serialize({
|
|
3229
|
-
requireAllSignatures: false,
|
|
3230
|
-
verifySignatures: false
|
|
3231
|
-
});
|
|
3232
|
-
}
|
|
3233
|
-
function base64ToBytes(value) {
|
|
3234
|
-
if (typeof globalThis.atob === "function") {
|
|
3235
|
-
const binary = globalThis.atob(value);
|
|
3236
|
-
const bytes = new Uint8Array(binary.length);
|
|
3237
|
-
for (let i = 0; i < binary.length; i++) {
|
|
3238
|
-
bytes[i] = binary.charCodeAt(i);
|
|
3239
|
-
}
|
|
3240
|
-
return bytes;
|
|
3241
|
-
}
|
|
3242
|
-
const bufferCtor = globalThis.Buffer;
|
|
3243
|
-
if (bufferCtor) {
|
|
3244
|
-
return bufferCtor.from(value, "base64");
|
|
3245
|
-
}
|
|
3246
|
-
throw new Error("Base64 decoding is not available in this environment.");
|
|
3247
|
-
}
|
|
3248
|
-
function bytesToBase64(bytes) {
|
|
3249
|
-
if (typeof globalThis.btoa === "function") {
|
|
3250
|
-
let binary = "";
|
|
3251
|
-
for (const byte of bytes) {
|
|
3252
|
-
binary += String.fromCharCode(byte);
|
|
3253
|
-
}
|
|
3254
|
-
return globalThis.btoa(binary);
|
|
3255
|
-
}
|
|
3256
|
-
const bufferCtor = globalThis.Buffer;
|
|
3257
|
-
if (bufferCtor) {
|
|
3258
|
-
return bufferCtor.from(bytes).toString("base64");
|
|
3259
|
-
}
|
|
3260
|
-
throw new Error("Base64 encoding is not available in this environment.");
|
|
3261
|
-
}
|
|
3262
|
-
async function signAndSendApproveSplViaWallet(params) {
|
|
3263
|
-
const rpcUrl = params.rpcUrl?.trim();
|
|
3264
|
-
if (!rpcUrl) {
|
|
3265
|
-
throw new Error("signAndSendApproveSplViaWallet requires an rpcUrl.");
|
|
3266
|
-
}
|
|
3267
|
-
const unsignedTxBase64 = params.unsignedTxBase64?.trim();
|
|
3268
|
-
if (!unsignedTxBase64) {
|
|
3269
|
-
throw new Error("signAndSendApproveSplViaWallet requires unsignedTxBase64.");
|
|
3270
|
-
}
|
|
3271
|
-
const commitment = params.commitment ?? DEFAULT_COMMITMENT;
|
|
3272
|
-
const { adapter, publicKey } = await connectSolanaWallet(params.selection);
|
|
3273
|
-
if (publicKey !== params.expectedOwnerPubkey) {
|
|
3274
|
-
throw new Error(
|
|
3275
|
-
`Connected Solana wallet ${publicKey} does not match the required source wallet ${params.expectedOwnerPubkey}. Please switch accounts in Phantom and retry.`
|
|
3276
|
-
);
|
|
3277
|
-
}
|
|
3278
|
-
if (!adapter.sendTransaction) {
|
|
3279
|
-
throw new Error("Selected Solana wallet does not support sendTransaction.");
|
|
3280
|
-
}
|
|
3281
|
-
const transaction = await deserializeTransaction(unsignedTxBase64);
|
|
3282
|
-
const connection = await defaultConnectionFactory(rpcUrl, commitment);
|
|
3283
|
-
const signature = await adapter.sendTransaction(
|
|
3284
|
-
transaction,
|
|
3285
|
-
connection,
|
|
3286
|
-
{
|
|
3287
|
-
preflightCommitment: commitment,
|
|
3288
|
-
maxRetries: 3
|
|
3289
|
-
}
|
|
3290
|
-
);
|
|
3291
|
-
return { ownerPubkey: publicKey, signature };
|
|
3292
|
-
}
|
|
3293
|
-
async function confirmApproveSplViaPolling(params) {
|
|
3294
|
-
const rpcUrl = params.rpcUrl?.trim();
|
|
3295
|
-
if (!rpcUrl) {
|
|
3296
|
-
throw new Error("confirmApproveSplViaPolling requires an rpcUrl.");
|
|
3297
|
-
}
|
|
3298
|
-
const signature = params.signature?.trim();
|
|
3299
|
-
if (!signature) {
|
|
3300
|
-
throw new Error("confirmApproveSplViaPolling requires a signature.");
|
|
3301
|
-
}
|
|
3302
|
-
const confirmTimeoutMs = params.confirmTimeoutMs ?? DEFAULT_CONFIRM_TIMEOUT_MS;
|
|
3303
|
-
const pollIntervalMs = params.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS2;
|
|
3304
|
-
const commitment = params.commitment ?? DEFAULT_COMMITMENT;
|
|
3305
|
-
const connection = await defaultConnectionFactory(rpcUrl, commitment);
|
|
3306
|
-
const slot = await pollForConfirmation({
|
|
3307
|
-
connection,
|
|
3308
|
-
signature,
|
|
3309
|
-
confirmTimeoutMs,
|
|
3310
|
-
pollIntervalMs
|
|
3311
|
-
});
|
|
3312
|
-
return { signature, slot };
|
|
3313
|
-
}
|
|
3314
|
-
async function defaultConnectionFactory(rpcUrl, commitment) {
|
|
3315
|
-
const { Connection } = await import('@solana/web3.js');
|
|
3316
|
-
return new Connection(rpcUrl, commitment);
|
|
3317
|
-
}
|
|
3318
|
-
async function pollForConfirmation(args) {
|
|
3319
|
-
const { connection, signature, confirmTimeoutMs, pollIntervalMs } = args;
|
|
3320
|
-
const expiresAt = Date.now() + confirmTimeoutMs;
|
|
3321
|
-
while (Date.now() <= expiresAt) {
|
|
3322
|
-
const result = await connection.getSignatureStatuses(
|
|
3323
|
-
[signature],
|
|
3324
|
-
{ searchTransactionHistory: true }
|
|
3325
|
-
);
|
|
3326
|
-
const status = result.value[0];
|
|
3327
|
-
if (status?.err) {
|
|
3328
|
-
throw new Error(`${APPROVE_SPL_ONCHAIN_FAILURE_PREFIX} ${JSON.stringify(status.err)}`);
|
|
3329
|
-
}
|
|
3330
|
-
const confirmationStatus = status?.confirmationStatus;
|
|
3331
|
-
if (confirmationStatus === "confirmed" || confirmationStatus === "finalized") {
|
|
3332
|
-
return status?.slot;
|
|
3333
|
-
}
|
|
3334
|
-
await sleep(pollIntervalMs);
|
|
3335
|
-
}
|
|
3336
|
-
throw new Error(APPROVE_SPL_CONFIRMATION_TIMEOUT_MESSAGE);
|
|
3337
|
-
}
|
|
3338
|
-
function sleep(ms) {
|
|
3339
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
3340
|
-
}
|
|
3341
|
-
|
|
3342
3404
|
// src/walletConnectRuntime.ts
|
|
3343
3405
|
var PRIMARY_CHAIN_ID = 8453;
|
|
3344
3406
|
var OPTIONAL_CHAIN_IDS = [1, 42161, 137, 56, 6342, 10143, 999, 84532];
|
|
@@ -6990,6 +7052,7 @@ function useManualTransferSession({
|
|
|
6990
7052
|
const completedRef = react.useRef(/* @__PURE__ */ new Set());
|
|
6991
7053
|
const premintedFamiliesRef = react.useRef(/* @__PURE__ */ new Set());
|
|
6992
7054
|
const inFlightPerTokenRef = react.useRef(/* @__PURE__ */ new Set());
|
|
7055
|
+
const reportedTargetChainRef = react.useRef(/* @__PURE__ */ new Map());
|
|
6993
7056
|
react.useEffect(() => {
|
|
6994
7057
|
if (!merchantAuthorization) return;
|
|
6995
7058
|
let cancelled = false;
|
|
@@ -7142,6 +7205,51 @@ function useManualTransferSession({
|
|
|
7142
7205
|
}, 2e3);
|
|
7143
7206
|
return () => window.clearInterval(timer);
|
|
7144
7207
|
}, [apiBaseUrl, activeSessionId, activeSessionStatus, pollEnabled]);
|
|
7208
|
+
const selectedSourceChainId = selectedOption?.chainId;
|
|
7209
|
+
const sessionRegistrationChainId = session?.source.chainId;
|
|
7210
|
+
react.useEffect(() => {
|
|
7211
|
+
if (!activeSessionId) return;
|
|
7212
|
+
if (selectedSourceChainId === void 0) return;
|
|
7213
|
+
if (sessionRegistrationChainId === void 0) return;
|
|
7214
|
+
if (!selectedOption) return;
|
|
7215
|
+
if (selectedOption.chainFamily !== "evm") return;
|
|
7216
|
+
if (isSameChainSameTokenSelection(selectedOption, destination)) return;
|
|
7217
|
+
const lastReported = reportedTargetChainRef.current.get(activeSessionId) ?? sessionRegistrationChainId;
|
|
7218
|
+
if (selectedSourceChainId === lastReported) return;
|
|
7219
|
+
reportedTargetChainRef.current.set(activeSessionId, selectedSourceChainId);
|
|
7220
|
+
let cancelled = false;
|
|
7221
|
+
updateManualTransferDepositTargetChain(apiBaseUrl, activeSessionId, selectedSourceChainId).then((updated) => {
|
|
7222
|
+
if (cancelled) return;
|
|
7223
|
+
setSessionsByFamily((prev) => {
|
|
7224
|
+
for (const family of Object.keys(prev)) {
|
|
7225
|
+
if (prev[family]?.sessionId === updated.sessionId) {
|
|
7226
|
+
return { ...prev, [family]: updated };
|
|
7227
|
+
}
|
|
7228
|
+
}
|
|
7229
|
+
return prev;
|
|
7230
|
+
});
|
|
7231
|
+
setPerTokenSessions((prev) => {
|
|
7232
|
+
for (const k of Object.keys(prev)) {
|
|
7233
|
+
if (prev[k]?.sessionId === updated.sessionId) {
|
|
7234
|
+
return { ...prev, [k]: updated };
|
|
7235
|
+
}
|
|
7236
|
+
}
|
|
7237
|
+
return prev;
|
|
7238
|
+
});
|
|
7239
|
+
}).catch(() => {
|
|
7240
|
+
reportedTargetChainRef.current.set(activeSessionId, lastReported);
|
|
7241
|
+
});
|
|
7242
|
+
return () => {
|
|
7243
|
+
cancelled = true;
|
|
7244
|
+
};
|
|
7245
|
+
}, [
|
|
7246
|
+
apiBaseUrl,
|
|
7247
|
+
activeSessionId,
|
|
7248
|
+
selectedSourceChainId,
|
|
7249
|
+
sessionRegistrationChainId,
|
|
7250
|
+
selectedOption,
|
|
7251
|
+
destination
|
|
7252
|
+
]);
|
|
7145
7253
|
const completionSignature = react.useMemo(() => {
|
|
7146
7254
|
const entries2 = [];
|
|
7147
7255
|
for (const family of Object.keys(sessionsByFamily)) {
|
|
@@ -8417,12 +8525,32 @@ function PrimaryButton({
|
|
|
8417
8525
|
icon,
|
|
8418
8526
|
progress,
|
|
8419
8527
|
progressText,
|
|
8420
|
-
progressPaused
|
|
8528
|
+
progressPaused,
|
|
8529
|
+
spinnerOnly
|
|
8421
8530
|
}) {
|
|
8422
8531
|
const { tokens } = useBlinkConfig();
|
|
8423
8532
|
const inProgress = progress != null;
|
|
8424
8533
|
const isDisabled = disabled || loading || inProgress;
|
|
8425
8534
|
const done = inProgress && progress >= 1;
|
|
8535
|
+
if (spinnerOnly) {
|
|
8536
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8537
|
+
"button",
|
|
8538
|
+
{
|
|
8539
|
+
type: "button",
|
|
8540
|
+
disabled: true,
|
|
8541
|
+
"aria-label": "Please wait",
|
|
8542
|
+
style: buttonStyle2(tokens, { disabled: false, loading: true }),
|
|
8543
|
+
children: [
|
|
8544
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, style: inlineSpinnerStyle(tokens.accentText) }),
|
|
8545
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
8546
|
+
@keyframes blink-spin {
|
|
8547
|
+
to { transform: rotate(360deg); }
|
|
8548
|
+
}
|
|
8549
|
+
` })
|
|
8550
|
+
]
|
|
8551
|
+
}
|
|
8552
|
+
);
|
|
8553
|
+
}
|
|
8426
8554
|
if (inProgress) {
|
|
8427
8555
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8428
8556
|
"button",
|
|
@@ -8549,6 +8677,15 @@ var buttonStyle2 = (tokens, state) => {
|
|
|
8549
8677
|
gap: 8
|
|
8550
8678
|
};
|
|
8551
8679
|
};
|
|
8680
|
+
var inlineSpinnerStyle = (color) => ({
|
|
8681
|
+
width: 20,
|
|
8682
|
+
height: 20,
|
|
8683
|
+
border: `2px solid ${color}44`,
|
|
8684
|
+
borderTopColor: color,
|
|
8685
|
+
borderRadius: "50%",
|
|
8686
|
+
animation: "blink-spin 0.9s linear infinite",
|
|
8687
|
+
flexShrink: 0
|
|
8688
|
+
});
|
|
8552
8689
|
var iconWrapStyle = {
|
|
8553
8690
|
display: "flex",
|
|
8554
8691
|
alignItems: "center"
|
|
@@ -10665,269 +10802,288 @@ var avatarStyle = (tokens) => ({
|
|
|
10665
10802
|
color: tokens.textMuted,
|
|
10666
10803
|
background: "transparent"
|
|
10667
10804
|
});
|
|
10668
|
-
|
|
10805
|
+
|
|
10806
|
+
// src/deviceBiometricUnlockText.ts
|
|
10807
|
+
var FALLBACK = "Biometric verification";
|
|
10808
|
+
function getDeviceBiometricUnlockText() {
|
|
10809
|
+
const ua = typeof navigator !== "undefined" && typeof navigator.userAgent === "string" ? navigator.userAgent : "";
|
|
10810
|
+
if (/iPhone|iPad|iPod/i.test(ua)) {
|
|
10811
|
+
return "Face ID";
|
|
10812
|
+
}
|
|
10813
|
+
if (/Android/i.test(ua)) {
|
|
10814
|
+
return "Fingerprint or face unlock";
|
|
10815
|
+
}
|
|
10816
|
+
if (/Windows NT/i.test(ua)) {
|
|
10817
|
+
return "Windows Hello";
|
|
10818
|
+
}
|
|
10819
|
+
if (/Macintosh|Mac OS X/i.test(ua)) {
|
|
10820
|
+
return "Touch ID";
|
|
10821
|
+
}
|
|
10822
|
+
return FALLBACK;
|
|
10823
|
+
}
|
|
10824
|
+
var CLUSTER_LOGOS = [
|
|
10825
|
+
METAMASK_LOGO,
|
|
10826
|
+
PHANTOM_LOGO,
|
|
10827
|
+
RABBY_LOGO,
|
|
10828
|
+
OKX_WALLET_LOGO,
|
|
10829
|
+
TRUST_WALLET_LOGO,
|
|
10830
|
+
BASE_LOGO
|
|
10831
|
+
];
|
|
10669
10832
|
function DepositOptionsScreen({
|
|
10670
|
-
onFromWallet,
|
|
10671
10833
|
onToAddress,
|
|
10672
10834
|
onSignInWithBlink,
|
|
10673
10835
|
onClose
|
|
10674
10836
|
}) {
|
|
10675
10837
|
const { tokens } = useBlinkConfig();
|
|
10676
|
-
const
|
|
10677
|
-
|
|
10678
|
-
{
|
|
10679
|
-
|
|
10680
|
-
|
|
10681
|
-
|
|
10682
|
-
style: closeButtonStyle2(tokens),
|
|
10683
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10684
|
-
"path",
|
|
10838
|
+
const depositLabel = `Deposit with ${getDeviceBiometricUnlockText()}`;
|
|
10839
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ScreenLayout, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: sheetStyle, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle2, children: [
|
|
10840
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: headerRowStyle, children: [
|
|
10841
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: BLINK_WORDMARK, alt: "Blink", style: wordmarkImgStyle }),
|
|
10842
|
+
onClose ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10843
|
+
"button",
|
|
10685
10844
|
{
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10689
|
-
|
|
10690
|
-
|
|
10845
|
+
type: "button",
|
|
10846
|
+
onClick: onClose,
|
|
10847
|
+
"aria-label": "Close",
|
|
10848
|
+
style: closeButtonStyle2(tokens.bgRecessed, tokens.text),
|
|
10849
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10850
|
+
"path",
|
|
10851
|
+
{
|
|
10852
|
+
d: "M6 6l12 12M18 6L6 18",
|
|
10853
|
+
stroke: "currentColor",
|
|
10854
|
+
strokeWidth: "2",
|
|
10855
|
+
strokeLinecap: "round",
|
|
10856
|
+
strokeLinejoin: "round"
|
|
10857
|
+
}
|
|
10858
|
+
) })
|
|
10691
10859
|
}
|
|
10692
|
-
)
|
|
10693
|
-
}
|
|
10694
|
-
|
|
10695
|
-
|
|
10696
|
-
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
children: [
|
|
10700
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10701
|
-
ScreenHeader,
|
|
10860
|
+
) : null
|
|
10861
|
+
] }),
|
|
10862
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: BLINK_PASSKEY_ILLUSTRATION, alt: "", "aria-hidden": "true", style: heroStyle }),
|
|
10863
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: stackStyle, children: [
|
|
10864
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: depositPillWrapperStyle, children: [
|
|
10865
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10866
|
+
"button",
|
|
10702
10867
|
{
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
|
|
10706
|
-
|
|
10707
|
-
{
|
|
10708
|
-
|
|
10709
|
-
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
|
|
10868
|
+
type: "button",
|
|
10869
|
+
onClick: onSignInWithBlink,
|
|
10870
|
+
style: depositPillStyle(tokens.accent),
|
|
10871
|
+
children: [
|
|
10872
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: depositPillLabelStyle(tokens.accentText), children: depositLabel }),
|
|
10873
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: clusterStyle, children: CLUSTER_LOGOS.map((logo, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10874
|
+
"span",
|
|
10875
|
+
{
|
|
10876
|
+
style: clusterChipStyle(tokens.bgInput, i === CLUSTER_LOGOS.length - 1),
|
|
10877
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: "", "aria-hidden": "true", style: clusterIconStyle })
|
|
10878
|
+
},
|
|
10879
|
+
logo
|
|
10880
|
+
)) })
|
|
10881
|
+
]
|
|
10713
10882
|
}
|
|
10714
10883
|
),
|
|
10715
|
-
/* @__PURE__ */ jsxRuntime.
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
|
|
10719
|
-
|
|
10720
|
-
|
|
10721
|
-
|
|
10722
|
-
|
|
10723
|
-
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
SourceRow,
|
|
10737
|
-
{
|
|
10738
|
-
name: "Exchange",
|
|
10739
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(LinkIcon, { color: tokens.textTertiary }),
|
|
10740
|
-
disabled: true,
|
|
10741
|
-
disabledColor: tokens.textTertiary,
|
|
10742
|
-
right: /* @__PURE__ */ jsxRuntime.jsx(ComingSoonBadge, { tokens })
|
|
10743
|
-
}
|
|
10744
|
-
)
|
|
10745
|
-
] })
|
|
10746
|
-
] })
|
|
10747
|
-
]
|
|
10748
|
-
}
|
|
10749
|
-
);
|
|
10750
|
-
}
|
|
10751
|
-
function DepositTypeToggle({ tokens }) {
|
|
10752
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
10753
|
-
}
|
|
10754
|
-
function ComingSoonBadge({ tokens }) {
|
|
10755
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: comingSoonBadgeStyle(tokens.bgRecessed, tokens.textMuted), children: "Coming soon" });
|
|
10756
|
-
}
|
|
10757
|
-
function WalletIcon({ color }) {
|
|
10758
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
10759
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10760
|
-
"path",
|
|
10761
|
-
{
|
|
10762
|
-
d: "M3 9.5a3 3 0 013-3h12a3 3 0 013 3v8a3 3 0 01-3 3H6a3 3 0 01-3-3v-8z",
|
|
10763
|
-
stroke: color,
|
|
10764
|
-
strokeWidth: "1.6"
|
|
10765
|
-
}
|
|
10766
|
-
),
|
|
10767
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10768
|
-
"path",
|
|
10769
|
-
{
|
|
10770
|
-
d: "M16 4.5l-9 2",
|
|
10771
|
-
stroke: color,
|
|
10772
|
-
strokeWidth: "1.6",
|
|
10773
|
-
strokeLinecap: "round"
|
|
10774
|
-
}
|
|
10775
|
-
),
|
|
10776
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "17.25", cy: "13.5", r: "1.1", fill: color })
|
|
10777
|
-
] });
|
|
10778
|
-
}
|
|
10779
|
-
function AddressIcon({ color }) {
|
|
10780
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
10781
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3.5", y: "3.5", width: "7", height: "7", rx: "1", stroke: color, strokeWidth: "1.4" }),
|
|
10782
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "6", y: "6", width: "2", height: "2", fill: color }),
|
|
10783
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "13.5", y: "3.5", width: "7", height: "7", rx: "1", stroke: color, strokeWidth: "1.4" }),
|
|
10784
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "16", y: "6", width: "2", height: "2", fill: color }),
|
|
10785
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3.5", y: "13.5", width: "7", height: "7", rx: "1", stroke: color, strokeWidth: "1.4" }),
|
|
10786
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "6", y: "16", width: "2", height: "2", fill: color }),
|
|
10787
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "13.5", y: "13.5", width: "2.5", height: "2.5", fill: color }),
|
|
10788
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "18", y: "13.5", width: "2.5", height: "2.5", fill: color }),
|
|
10789
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "13.5", y: "18", width: "2.5", height: "2.5", fill: color }),
|
|
10790
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "18", y: "18", width: "2.5", height: "2.5", fill: color })
|
|
10791
|
-
] });
|
|
10884
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: feesBadgeStyle(tokens.highlight, tokens.text), children: "0% FEES" })
|
|
10885
|
+
] }),
|
|
10886
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: dividerRowStyle, children: [
|
|
10887
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: dividerRuleStyle(tokens.textTertiary) }),
|
|
10888
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: dividerLabelStyle(tokens.textTertiary), children: "OR" }),
|
|
10889
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: dividerRuleStyle(tokens.textTertiary) })
|
|
10890
|
+
] }),
|
|
10891
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10892
|
+
"button",
|
|
10893
|
+
{
|
|
10894
|
+
type: "button",
|
|
10895
|
+
onClick: onToAddress,
|
|
10896
|
+
style: manualRowStyle(tokens.bgCardTranslucent),
|
|
10897
|
+
children: [
|
|
10898
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: manualLabelStyle(tokens.text), children: "Send Crypto Manually" }),
|
|
10899
|
+
/* @__PURE__ */ jsxRuntime.jsx(QrIcon, { color: tokens.text })
|
|
10900
|
+
]
|
|
10901
|
+
}
|
|
10902
|
+
)
|
|
10903
|
+
] })
|
|
10904
|
+
] }) }) });
|
|
10792
10905
|
}
|
|
10793
|
-
function
|
|
10794
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
10795
|
-
"
|
|
10906
|
+
function QrIcon({ color }) {
|
|
10907
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10908
|
+
"svg",
|
|
10796
10909
|
{
|
|
10797
|
-
|
|
10798
|
-
|
|
10910
|
+
width: "24",
|
|
10911
|
+
height: "24",
|
|
10912
|
+
viewBox: "0 0 24 24",
|
|
10913
|
+
fill: "none",
|
|
10799
10914
|
"aria-hidden": "true",
|
|
10800
|
-
style:
|
|
10915
|
+
style: { flexShrink: 0 },
|
|
10916
|
+
children: [
|
|
10917
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3.5", y: "3.5", width: "7", height: "7", rx: "1", stroke: color, strokeWidth: "1.4" }),
|
|
10918
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "6", y: "6", width: "2", height: "2", fill: color }),
|
|
10919
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "13.5", y: "3.5", width: "7", height: "7", rx: "1", stroke: color, strokeWidth: "1.4" }),
|
|
10920
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "16", y: "6", width: "2", height: "2", fill: color }),
|
|
10921
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3.5", y: "13.5", width: "7", height: "7", rx: "1", stroke: color, strokeWidth: "1.4" }),
|
|
10922
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "6", y: "16", width: "2", height: "2", fill: color }),
|
|
10923
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "13.5", y: "13.5", width: "2.5", height: "2.5", fill: color }),
|
|
10924
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "18", y: "13.5", width: "2.5", height: "2.5", fill: color }),
|
|
10925
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "13.5", y: "18", width: "2.5", height: "2.5", fill: color }),
|
|
10926
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "18", y: "18", width: "2.5", height: "2.5", fill: color })
|
|
10927
|
+
]
|
|
10801
10928
|
}
|
|
10802
10929
|
);
|
|
10803
10930
|
}
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
d: "M21 16v2a3 3 0 01-3 3h-2",
|
|
10828
|
-
stroke: "currentColor",
|
|
10829
|
-
strokeWidth: "1.6",
|
|
10830
|
-
strokeLinecap: "round"
|
|
10831
|
-
}
|
|
10832
|
-
),
|
|
10833
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10834
|
-
"path",
|
|
10835
|
-
{
|
|
10836
|
-
d: "M8 21H6a3 3 0 01-3-3v-2",
|
|
10837
|
-
stroke: "currentColor",
|
|
10838
|
-
strokeWidth: "1.6",
|
|
10839
|
-
strokeLinecap: "round"
|
|
10840
|
-
}
|
|
10841
|
-
),
|
|
10842
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10843
|
-
"path",
|
|
10844
|
-
{
|
|
10845
|
-
d: "M9 10v1.5",
|
|
10846
|
-
stroke: "currentColor",
|
|
10847
|
-
strokeWidth: "1.6",
|
|
10848
|
-
strokeLinecap: "round"
|
|
10849
|
-
}
|
|
10850
|
-
),
|
|
10851
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10852
|
-
"path",
|
|
10853
|
-
{
|
|
10854
|
-
d: "M15 10v1.5",
|
|
10855
|
-
stroke: "currentColor",
|
|
10856
|
-
strokeWidth: "1.6",
|
|
10857
|
-
strokeLinecap: "round"
|
|
10858
|
-
}
|
|
10859
|
-
),
|
|
10860
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10861
|
-
"path",
|
|
10862
|
-
{
|
|
10863
|
-
d: "M12 10v3.5",
|
|
10864
|
-
stroke: "currentColor",
|
|
10865
|
-
strokeWidth: "1.6",
|
|
10866
|
-
strokeLinecap: "round"
|
|
10867
|
-
}
|
|
10868
|
-
),
|
|
10869
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10870
|
-
"path",
|
|
10871
|
-
{
|
|
10872
|
-
d: "M9.5 16.25c.7.6 1.55.95 2.5.95s1.8-.35 2.5-.95",
|
|
10873
|
-
stroke: "currentColor",
|
|
10874
|
-
strokeWidth: "1.6",
|
|
10875
|
-
strokeLinecap: "round"
|
|
10876
|
-
}
|
|
10877
|
-
)
|
|
10878
|
-
] });
|
|
10879
|
-
}
|
|
10880
|
-
var wordmarkStyle = {
|
|
10881
|
-
height: 20,
|
|
10931
|
+
var sheetStyle = {
|
|
10932
|
+
position: "relative",
|
|
10933
|
+
minHeight: "100%",
|
|
10934
|
+
display: "flex",
|
|
10935
|
+
flexDirection: "column",
|
|
10936
|
+
boxSizing: "border-box"
|
|
10937
|
+
};
|
|
10938
|
+
var contentStyle2 = {
|
|
10939
|
+
display: "flex",
|
|
10940
|
+
flexDirection: "column",
|
|
10941
|
+
alignItems: "center",
|
|
10942
|
+
gap: 32,
|
|
10943
|
+
padding: "32px 8px"
|
|
10944
|
+
};
|
|
10945
|
+
var headerRowStyle = {
|
|
10946
|
+
display: "flex",
|
|
10947
|
+
alignItems: "center",
|
|
10948
|
+
justifyContent: "space-between",
|
|
10949
|
+
width: "100%",
|
|
10950
|
+
minHeight: 44
|
|
10951
|
+
};
|
|
10952
|
+
var wordmarkImgStyle = {
|
|
10953
|
+
height: 31,
|
|
10882
10954
|
width: "auto",
|
|
10955
|
+
display: "block"
|
|
10956
|
+
};
|
|
10957
|
+
var heroStyle = {
|
|
10958
|
+
width: 253,
|
|
10959
|
+
height: 253,
|
|
10960
|
+
maxWidth: "100%",
|
|
10883
10961
|
objectFit: "contain",
|
|
10884
10962
|
display: "block"
|
|
10885
10963
|
};
|
|
10886
|
-
var
|
|
10964
|
+
var stackStyle = {
|
|
10887
10965
|
display: "flex",
|
|
10888
10966
|
flexDirection: "column",
|
|
10889
|
-
gap:
|
|
10890
|
-
|
|
10967
|
+
gap: 16,
|
|
10968
|
+
width: "100%"
|
|
10891
10969
|
};
|
|
10892
|
-
var
|
|
10970
|
+
var depositPillWrapperStyle = {
|
|
10971
|
+
position: "relative",
|
|
10972
|
+
width: "100%",
|
|
10973
|
+
height: 71
|
|
10974
|
+
};
|
|
10975
|
+
var depositPillStyle = (bg) => ({
|
|
10893
10976
|
display: "flex",
|
|
10894
|
-
|
|
10977
|
+
alignItems: "center",
|
|
10978
|
+
justifyContent: "space-between",
|
|
10979
|
+
width: "100%",
|
|
10980
|
+
height: 56,
|
|
10981
|
+
padding: "12px 12px 12px 24px",
|
|
10895
10982
|
background: bg,
|
|
10983
|
+
border: "none",
|
|
10896
10984
|
borderRadius: 28,
|
|
10897
|
-
|
|
10985
|
+
cursor: "pointer",
|
|
10986
|
+
boxSizing: "border-box",
|
|
10987
|
+
fontFamily: "inherit"
|
|
10988
|
+
});
|
|
10989
|
+
var depositPillLabelStyle = (color) => ({
|
|
10990
|
+
color,
|
|
10991
|
+
fontSize: 16,
|
|
10992
|
+
fontWeight: 500,
|
|
10993
|
+
whiteSpace: "nowrap"
|
|
10994
|
+
});
|
|
10995
|
+
var clusterStyle = {
|
|
10996
|
+
display: "inline-flex",
|
|
10997
|
+
alignItems: "center",
|
|
10998
|
+
isolation: "isolate"
|
|
10999
|
+
};
|
|
11000
|
+
var clusterChipStyle = (bg, last) => ({
|
|
11001
|
+
width: 32,
|
|
11002
|
+
height: 32,
|
|
11003
|
+
borderRadius: "50%",
|
|
11004
|
+
background: bg,
|
|
11005
|
+
display: "inline-flex",
|
|
11006
|
+
alignItems: "center",
|
|
11007
|
+
justifyContent: "center",
|
|
11008
|
+
marginRight: last ? 0 : -12,
|
|
11009
|
+
filter: "drop-shadow(0 0 2px rgba(0, 0, 0, 0.24))",
|
|
11010
|
+
flexShrink: 0
|
|
11011
|
+
});
|
|
11012
|
+
var clusterIconStyle = {
|
|
11013
|
+
width: 24,
|
|
11014
|
+
height: 24,
|
|
11015
|
+
borderRadius: "50%",
|
|
11016
|
+
objectFit: "cover",
|
|
11017
|
+
display: "block"
|
|
11018
|
+
};
|
|
11019
|
+
var feesBadgeStyle = (bg, color) => ({
|
|
11020
|
+
position: "absolute",
|
|
11021
|
+
left: 131,
|
|
11022
|
+
top: 45,
|
|
11023
|
+
display: "inline-flex",
|
|
11024
|
+
alignItems: "center",
|
|
11025
|
+
justifyContent: "center",
|
|
11026
|
+
background: bg,
|
|
11027
|
+
color,
|
|
11028
|
+
fontSize: 12,
|
|
11029
|
+
fontWeight: 500,
|
|
11030
|
+
lineHeight: 1,
|
|
11031
|
+
padding: "4px 8px",
|
|
11032
|
+
borderRadius: 6,
|
|
11033
|
+
whiteSpace: "nowrap",
|
|
11034
|
+
transform: "rotate(-6.75deg)",
|
|
11035
|
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.16)",
|
|
11036
|
+
pointerEvents: "none"
|
|
10898
11037
|
});
|
|
10899
|
-
var
|
|
10900
|
-
display: "
|
|
11038
|
+
var dividerRowStyle = {
|
|
11039
|
+
display: "flex",
|
|
10901
11040
|
alignItems: "center",
|
|
10902
11041
|
justifyContent: "center",
|
|
10903
|
-
|
|
11042
|
+
gap: 10,
|
|
11043
|
+
padding: "0 16px",
|
|
11044
|
+
width: "100%",
|
|
11045
|
+
boxSizing: "border-box"
|
|
11046
|
+
};
|
|
11047
|
+
var dividerRuleStyle = (color) => ({
|
|
11048
|
+
flex: 1,
|
|
11049
|
+
height: 1,
|
|
11050
|
+
background: color
|
|
11051
|
+
});
|
|
11052
|
+
var dividerLabelStyle = (color) => ({
|
|
10904
11053
|
color,
|
|
10905
|
-
fontSize:
|
|
11054
|
+
fontSize: 12,
|
|
10906
11055
|
fontWeight: 500,
|
|
10907
|
-
lineHeight: 1,
|
|
10908
|
-
padding: "4px 8px",
|
|
10909
|
-
borderRadius: 8,
|
|
10910
|
-
marginRight: 8,
|
|
10911
11056
|
whiteSpace: "nowrap"
|
|
10912
11057
|
});
|
|
10913
|
-
var
|
|
11058
|
+
var manualRowStyle = (bg) => ({
|
|
10914
11059
|
display: "flex",
|
|
10915
|
-
alignItems: "center"
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
11060
|
+
alignItems: "center",
|
|
11061
|
+
gap: 8,
|
|
11062
|
+
width: "100%",
|
|
11063
|
+
height: 56,
|
|
11064
|
+
padding: "12px 24px",
|
|
11065
|
+
background: bg,
|
|
11066
|
+
border: "none",
|
|
11067
|
+
borderRadius: 28,
|
|
11068
|
+
cursor: "pointer",
|
|
11069
|
+
boxSizing: "border-box",
|
|
11070
|
+
fontFamily: "inherit"
|
|
10923
11071
|
});
|
|
10924
|
-
var
|
|
10925
|
-
|
|
10926
|
-
|
|
11072
|
+
var manualLabelStyle = (color) => ({
|
|
11073
|
+
flex: 1,
|
|
11074
|
+
minWidth: 0,
|
|
11075
|
+
color,
|
|
11076
|
+
fontSize: 16,
|
|
11077
|
+
fontWeight: 400
|
|
11078
|
+
});
|
|
11079
|
+
var closeButtonStyle2 = (bg, color) => ({
|
|
11080
|
+
flexShrink: 0,
|
|
11081
|
+
width: 44,
|
|
11082
|
+
height: 44,
|
|
10927
11083
|
borderRadius: "50%",
|
|
10928
11084
|
border: "none",
|
|
10929
|
-
background:
|
|
10930
|
-
color
|
|
11085
|
+
background: bg,
|
|
11086
|
+
color,
|
|
10931
11087
|
display: "flex",
|
|
10932
11088
|
alignItems: "center",
|
|
10933
11089
|
justifyContent: "center",
|
|
@@ -11283,7 +11439,7 @@ function PasskeyPopupWelcomeScreen({
|
|
|
11283
11439
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle6, children: [
|
|
11284
11440
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: lockupStyle, children: [
|
|
11285
11441
|
/* @__PURE__ */ jsxRuntime.jsx("img", { src: BLINK_LOGO, alt: "", "aria-hidden": true, style: lockupMarkStyle }),
|
|
11286
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style:
|
|
11442
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: wordmarkStyle(tokens.text), children: "Blink" })
|
|
11287
11443
|
] }),
|
|
11288
11444
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: illustrationFrameStyle, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11289
11445
|
"img",
|
|
@@ -11340,7 +11496,7 @@ var lockupMarkStyle = {
|
|
|
11340
11496
|
height: 24,
|
|
11341
11497
|
display: "block"
|
|
11342
11498
|
};
|
|
11343
|
-
var
|
|
11499
|
+
var wordmarkStyle = (color) => ({
|
|
11344
11500
|
fontSize: "1.45rem",
|
|
11345
11501
|
fontWeight: 500,
|
|
11346
11502
|
letterSpacing: "-0.03em",
|
|
@@ -11789,7 +11945,7 @@ function WalletPickerScreen({
|
|
|
11789
11945
|
),
|
|
11790
11946
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { style: titleStyle3(tokens.text), children: "Link wallet" }),
|
|
11791
11947
|
error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: errorBannerStyle5(tokens), children: error }),
|
|
11792
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: sheetStackStyle, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style:
|
|
11948
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: sheetStackStyle, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: cardStyle(tokens.bgCardTranslucent), children: showOtherWallets ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
11793
11949
|
OtherWalletsPanel,
|
|
11794
11950
|
{
|
|
11795
11951
|
wallets: filteredReownWallets,
|
|
@@ -12012,7 +12168,7 @@ var sheetStackStyle = {
|
|
|
12012
12168
|
flexDirection: "column",
|
|
12013
12169
|
gap: 16
|
|
12014
12170
|
};
|
|
12015
|
-
var
|
|
12171
|
+
var cardStyle = (bg) => ({
|
|
12016
12172
|
display: "flex",
|
|
12017
12173
|
flexDirection: "column",
|
|
12018
12174
|
background: bg,
|
|
@@ -12165,7 +12321,7 @@ function LinkTokensScreen({
|
|
|
12165
12321
|
{
|
|
12166
12322
|
onBack,
|
|
12167
12323
|
onLogout,
|
|
12168
|
-
center: /* @__PURE__ */ jsxRuntime.jsx("img", { src: BLINK_WORDMARK, alt: "Blink", style:
|
|
12324
|
+
center: /* @__PURE__ */ jsxRuntime.jsx("img", { src: BLINK_WORDMARK, alt: "Blink", style: wordmarkImgStyle2 })
|
|
12169
12325
|
}
|
|
12170
12326
|
),
|
|
12171
12327
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle9, children: [
|
|
@@ -12231,7 +12387,7 @@ var contentStyle9 = {
|
|
|
12231
12387
|
minHeight: 0,
|
|
12232
12388
|
width: "100%"
|
|
12233
12389
|
};
|
|
12234
|
-
var
|
|
12390
|
+
var wordmarkImgStyle2 = {
|
|
12235
12391
|
height: 22,
|
|
12236
12392
|
width: "auto",
|
|
12237
12393
|
display: "block",
|
|
@@ -12527,6 +12683,7 @@ function SelectDepositSourceScreen({
|
|
|
12527
12683
|
{
|
|
12528
12684
|
symbol: opt.symbol,
|
|
12529
12685
|
chainName: opt.chainName,
|
|
12686
|
+
tokenLogoUri: opt.logoURI,
|
|
12530
12687
|
balance: opt.balance,
|
|
12531
12688
|
selected: !hasPendingMobileSelection && isSelected(opt),
|
|
12532
12689
|
onClick: () => handleAuthorizedPick(opt)
|
|
@@ -12538,6 +12695,7 @@ function SelectDepositSourceScreen({
|
|
|
12538
12695
|
{
|
|
12539
12696
|
symbol: opt.symbol,
|
|
12540
12697
|
chainName: opt.chainName,
|
|
12698
|
+
tokenLogoUri: opt.logoURI,
|
|
12541
12699
|
balance: opt.balance,
|
|
12542
12700
|
requiresAuth: true,
|
|
12543
12701
|
selected: hasPendingMobileSelection ? pendingMobileSelection?.key === tokenOptionKey(opt) : isSelected(opt),
|
|
@@ -12555,7 +12713,7 @@ function SelectDepositSourceScreen({
|
|
|
12555
12713
|
label: "Send manually",
|
|
12556
12714
|
color: tokens.text,
|
|
12557
12715
|
onClick: onSendManually,
|
|
12558
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12716
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(QrIcon2, { color: tokens.text })
|
|
12559
12717
|
}
|
|
12560
12718
|
),
|
|
12561
12719
|
onAddProvider && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -12564,7 +12722,7 @@ function SelectDepositSourceScreen({
|
|
|
12564
12722
|
label: "Link Wallet",
|
|
12565
12723
|
color: tokens.text,
|
|
12566
12724
|
onClick: onAddProvider,
|
|
12567
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12725
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(WalletIcon, {})
|
|
12568
12726
|
}
|
|
12569
12727
|
)
|
|
12570
12728
|
] })
|
|
@@ -12649,12 +12807,23 @@ function ActionRow({
|
|
|
12649
12807
|
onClick,
|
|
12650
12808
|
icon
|
|
12651
12809
|
}) {
|
|
12652
|
-
|
|
12653
|
-
|
|
12654
|
-
|
|
12655
|
-
|
|
12810
|
+
const [hovered, setHovered] = react.useState(false);
|
|
12811
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12812
|
+
"button",
|
|
12813
|
+
{
|
|
12814
|
+
type: "button",
|
|
12815
|
+
onClick,
|
|
12816
|
+
onMouseEnter: () => setHovered(true),
|
|
12817
|
+
onMouseLeave: () => setHovered(false),
|
|
12818
|
+
style: actionRowStyle(color, hovered),
|
|
12819
|
+
children: [
|
|
12820
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: actionIconSlotStyle, children: icon }),
|
|
12821
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: actionLabelStyle, children: label })
|
|
12822
|
+
]
|
|
12823
|
+
}
|
|
12824
|
+
);
|
|
12656
12825
|
}
|
|
12657
|
-
function
|
|
12826
|
+
function QrIcon2({ color }) {
|
|
12658
12827
|
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
12659
12828
|
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3.5", y: "3.5", width: "7", height: "7", rx: "1", stroke: color, strokeWidth: "1.4" }),
|
|
12660
12829
|
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "6", y: "6", width: "2", height: "2", fill: color }),
|
|
@@ -12668,7 +12837,7 @@ function QrIcon({ color }) {
|
|
|
12668
12837
|
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "18", y: "18", width: "2.5", height: "2.5", fill: color })
|
|
12669
12838
|
] });
|
|
12670
12839
|
}
|
|
12671
|
-
function
|
|
12840
|
+
function WalletIcon() {
|
|
12672
12841
|
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
12673
12842
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12674
12843
|
"path",
|
|
@@ -12686,13 +12855,13 @@ function WalletIcon2() {
|
|
|
12686
12855
|
)
|
|
12687
12856
|
] });
|
|
12688
12857
|
}
|
|
12689
|
-
var actionRowStyle = (color) => ({
|
|
12858
|
+
var actionRowStyle = (color, hovered) => ({
|
|
12690
12859
|
display: "flex",
|
|
12691
12860
|
alignItems: "center",
|
|
12692
12861
|
gap: 8,
|
|
12693
12862
|
width: "100%",
|
|
12694
12863
|
padding: 4,
|
|
12695
|
-
background: "transparent",
|
|
12864
|
+
background: hovered ? "rgba(255,255,255,0.24)" : "transparent",
|
|
12696
12865
|
border: "none",
|
|
12697
12866
|
borderRadius: 56,
|
|
12698
12867
|
color,
|
|
@@ -12700,6 +12869,7 @@ var actionRowStyle = (color) => ({
|
|
|
12700
12869
|
fontFamily: "inherit",
|
|
12701
12870
|
textAlign: "left",
|
|
12702
12871
|
outline: "none",
|
|
12872
|
+
transition: "background 0.15s ease",
|
|
12703
12873
|
boxSizing: "border-box"
|
|
12704
12874
|
});
|
|
12705
12875
|
var actionIconSlotStyle = {
|
|
@@ -12874,7 +13044,7 @@ function DepositScreen({
|
|
|
12874
13044
|
onClick: () => onDeposit(amount),
|
|
12875
13045
|
disabled: !canDeposit,
|
|
12876
13046
|
loading: processing,
|
|
12877
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13047
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(FaceIdIcon2, {}),
|
|
12878
13048
|
children: "Deposit"
|
|
12879
13049
|
}
|
|
12880
13050
|
);
|
|
@@ -13022,7 +13192,7 @@ function DepositScreen({
|
|
|
13022
13192
|
) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: redesignNoFeesStyle(tokens.text), children: "No fees" }) }),
|
|
13023
13193
|
showHeroPresets && presetsRow
|
|
13024
13194
|
] }),
|
|
13025
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: bannerSlotStyle2, children: showLowFunds ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
13195
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: bannerSlotStyle2, children: mobileEntryWithKeypad ? null : showLowFunds ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
13026
13196
|
NotificationBanner,
|
|
13027
13197
|
{
|
|
13028
13198
|
variant: "negative",
|
|
@@ -13044,7 +13214,7 @@ function DepositScreen({
|
|
|
13044
13214
|
) : error ? /* @__PURE__ */ jsxRuntime.jsx(NotificationBanner, { title: "Something went wrong", description: error }) : null })
|
|
13045
13215
|
] });
|
|
13046
13216
|
}
|
|
13047
|
-
function
|
|
13217
|
+
function FaceIdIcon2() {
|
|
13048
13218
|
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
13049
13219
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 8V6a3 3 0 013-3h2", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
|
|
13050
13220
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 3h2a3 3 0 013 3v2", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
|
|
@@ -13563,7 +13733,7 @@ function SelectSourceScreen({
|
|
|
13563
13733
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle5(tokens.textSecondary), children: "Token" }),
|
|
13564
13734
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: optionListStyle, children: tokenChoices.map((token) => {
|
|
13565
13735
|
const isSelected = token.tokenSymbol === selectedTokenSymbol;
|
|
13566
|
-
const logo = token.walletLogoUrl ?? TOKEN_LOGOS[token.tokenSymbol];
|
|
13736
|
+
const logo = token.walletLogoUrl ?? token.logoURI ?? TOKEN_LOGOS[token.tokenSymbol];
|
|
13567
13737
|
const logoAlt = token.walletLogoUrl ? token.walletName ?? token.tokenSymbol : token.tokenSymbol;
|
|
13568
13738
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13569
13739
|
"button",
|
|
@@ -14784,30 +14954,102 @@ var closeButtonStyle5 = (bg, color) => ({
|
|
|
14784
14954
|
padding: 0
|
|
14785
14955
|
});
|
|
14786
14956
|
var DELAYED_RETRY_VISIBLE_MS = 2e4;
|
|
14957
|
+
var SPIN_KEYFRAMES_CSS2 = `
|
|
14958
|
+
@keyframes blink-approving-spin {
|
|
14959
|
+
to { transform: rotate(360deg); }
|
|
14960
|
+
}`;
|
|
14787
14961
|
function ApprovingInWalletScreen({
|
|
14788
14962
|
tokenSymbol,
|
|
14789
14963
|
chainName,
|
|
14790
14964
|
step,
|
|
14791
14965
|
error,
|
|
14792
|
-
onRetry
|
|
14966
|
+
onRetry,
|
|
14967
|
+
onBack,
|
|
14968
|
+
onLogout
|
|
14793
14969
|
}) {
|
|
14794
|
-
const { tokens } = useBlinkConfig();
|
|
14970
|
+
const { tokens: t } = useBlinkConfig();
|
|
14795
14971
|
const showDelayedRetry = useDelayedRetry(error == null && onRetry != null);
|
|
14796
14972
|
const retryVisible = onRetry != null && (error != null || showDelayedRetry);
|
|
14797
|
-
|
|
14973
|
+
const token = tokenSymbol ?? "token";
|
|
14974
|
+
const steps = buildSteps(step, tokenSymbol, chainName);
|
|
14975
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14798
14976
|
ScreenLayout,
|
|
14799
14977
|
{
|
|
14800
|
-
|
|
14801
|
-
|
|
14802
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14803
|
-
|
|
14804
|
-
|
|
14805
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: lockupStyle2, children: [
|
|
14806
|
-
/* @__PURE__ */ jsxRuntime.jsx("img", { src: BLINK_LOGO, alt: "", "aria-hidden": true, style: lockupMarkStyle2 }),
|
|
14807
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: wordmarkStyle3(tokens.text), children: "Blink" })
|
|
14978
|
+
scrollableBody: false,
|
|
14979
|
+
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: footerStackStyle4, children: [
|
|
14980
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: lockBannerStyle2, children: [
|
|
14981
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: lockIconWrapStyle2(t.text), children: /* @__PURE__ */ jsxRuntime.jsx(LockIcon3, {}) }),
|
|
14982
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: lockBannerTextStyle2(t.text), children: "Your passkey is required each time you deposit. Funds cannot move without your approval." })
|
|
14808
14983
|
] }),
|
|
14809
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14810
|
-
|
|
14984
|
+
retryVisible ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: retryStackStyle, children: [
|
|
14985
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(InfoBanner, { children: error }),
|
|
14986
|
+
/* @__PURE__ */ jsxRuntime.jsx(OutlineButton, { onClick: onRetry, children: "Retry" })
|
|
14987
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { spinnerOnly: true })
|
|
14988
|
+
] }),
|
|
14989
|
+
children: [
|
|
14990
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14991
|
+
ScreenHeader,
|
|
14992
|
+
{
|
|
14993
|
+
onBack,
|
|
14994
|
+
onLogout,
|
|
14995
|
+
center: /* @__PURE__ */ jsxRuntime.jsx("img", { src: BLINK_WORDMARK, alt: "Blink", style: wordmarkImgStyle3 })
|
|
14996
|
+
}
|
|
14997
|
+
),
|
|
14998
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle15, children: [
|
|
14999
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle13(t.text), children: `Authorizing ${token} for passkey deposits` }),
|
|
15000
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: cardStyle2(t.bgRecessed, t.radiusLg), children: [
|
|
15001
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: SPIN_KEYFRAMES_CSS2 }),
|
|
15002
|
+
steps.map((s, i) => /* @__PURE__ */ jsxRuntime.jsx(ChecklistRow, { step: s }, i))
|
|
15003
|
+
] })
|
|
15004
|
+
] })
|
|
15005
|
+
]
|
|
15006
|
+
}
|
|
15007
|
+
);
|
|
15008
|
+
}
|
|
15009
|
+
function ChecklistRow({ step }) {
|
|
15010
|
+
const { tokens: t } = useBlinkConfig();
|
|
15011
|
+
const isComplete = step.status === "complete";
|
|
15012
|
+
const isActive = step.status === "active";
|
|
15013
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: rowStyle6, children: [
|
|
15014
|
+
isComplete ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: completeBadgeStyle(t.accent), children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15015
|
+
"path",
|
|
15016
|
+
{
|
|
15017
|
+
d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",
|
|
15018
|
+
fill: t.accentText
|
|
15019
|
+
}
|
|
15020
|
+
) }) }) : isActive ? /* @__PURE__ */ jsxRuntime.jsx(RowSpinner, { color: t.accent }) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: pendingBadgeStyle(t.bgRecessed) }),
|
|
15021
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: labelStyle7(isComplete || isActive ? t.text : t.textMuted), children: step.label })
|
|
15022
|
+
] });
|
|
15023
|
+
}
|
|
15024
|
+
function RowSpinner({ color }) {
|
|
15025
|
+
const size = 24;
|
|
15026
|
+
const stroke = 2;
|
|
15027
|
+
const r = (size - stroke) / 2;
|
|
15028
|
+
const c = size / 2;
|
|
15029
|
+
const circumference = 2 * Math.PI * r;
|
|
15030
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15031
|
+
"div",
|
|
15032
|
+
{
|
|
15033
|
+
role: "status",
|
|
15034
|
+
"aria-label": "Loading",
|
|
15035
|
+
style: {
|
|
15036
|
+
width: size,
|
|
15037
|
+
height: size,
|
|
15038
|
+
flexShrink: 0,
|
|
15039
|
+
animation: "blink-approving-spin 0.9s linear infinite"
|
|
15040
|
+
},
|
|
15041
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15042
|
+
"circle",
|
|
15043
|
+
{
|
|
15044
|
+
cx: c,
|
|
15045
|
+
cy: c,
|
|
15046
|
+
r,
|
|
15047
|
+
stroke: color,
|
|
15048
|
+
strokeWidth: stroke,
|
|
15049
|
+
strokeLinecap: "round",
|
|
15050
|
+
strokeDasharray: `${circumference * 0.25} ${circumference}`
|
|
15051
|
+
}
|
|
15052
|
+
) })
|
|
14811
15053
|
}
|
|
14812
15054
|
);
|
|
14813
15055
|
}
|
|
@@ -14836,50 +15078,124 @@ function useDelayedRetry(enabled) {
|
|
|
14836
15078
|
}, [enabled]);
|
|
14837
15079
|
return visible;
|
|
14838
15080
|
}
|
|
15081
|
+
function LockIcon3() {
|
|
15082
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15083
|
+
"path",
|
|
15084
|
+
{
|
|
15085
|
+
d: "M7 10V8a5 5 0 0 1 10 0v2m-12 0h14a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1z",
|
|
15086
|
+
stroke: "currentColor",
|
|
15087
|
+
strokeWidth: "2",
|
|
15088
|
+
strokeLinecap: "round",
|
|
15089
|
+
strokeLinejoin: "round"
|
|
15090
|
+
}
|
|
15091
|
+
) });
|
|
15092
|
+
}
|
|
15093
|
+
var wordmarkImgStyle3 = {
|
|
15094
|
+
height: 22,
|
|
15095
|
+
width: "auto",
|
|
15096
|
+
display: "block",
|
|
15097
|
+
pointerEvents: "none",
|
|
15098
|
+
userSelect: "none"
|
|
15099
|
+
};
|
|
14839
15100
|
var contentStyle15 = {
|
|
15101
|
+
display: "flex",
|
|
15102
|
+
flexDirection: "column",
|
|
15103
|
+
alignItems: "center",
|
|
15104
|
+
gap: 16,
|
|
15105
|
+
paddingTop: 8,
|
|
14840
15106
|
flex: 1,
|
|
14841
15107
|
minHeight: 0,
|
|
15108
|
+
width: "100%"
|
|
15109
|
+
};
|
|
15110
|
+
var headingStyle13 = (color) => ({
|
|
15111
|
+
fontSize: 24,
|
|
15112
|
+
fontWeight: 700,
|
|
15113
|
+
lineHeight: "normal",
|
|
15114
|
+
letterSpacing: 0,
|
|
15115
|
+
color,
|
|
15116
|
+
margin: 0,
|
|
15117
|
+
textAlign: "center"
|
|
15118
|
+
});
|
|
15119
|
+
var cardStyle2 = (bg, radius) => ({
|
|
15120
|
+
background: bg,
|
|
15121
|
+
borderRadius: radius,
|
|
15122
|
+
padding: 8,
|
|
15123
|
+
width: "100%",
|
|
15124
|
+
boxSizing: "border-box",
|
|
14842
15125
|
display: "flex",
|
|
14843
15126
|
flexDirection: "column",
|
|
15127
|
+
gap: 4
|
|
15128
|
+
});
|
|
15129
|
+
var rowStyle6 = {
|
|
15130
|
+
display: "flex",
|
|
14844
15131
|
alignItems: "center",
|
|
15132
|
+
gap: 16,
|
|
15133
|
+
padding: "12px 16px 12px 12px",
|
|
15134
|
+
borderRadius: 16,
|
|
14845
15135
|
width: "100%",
|
|
14846
|
-
|
|
14847
|
-
// 32px Figma gutter, with 32px above the logo and a 32px gap to the checklist.
|
|
14848
|
-
padding: "32px 8px 0",
|
|
14849
|
-
gap: 32
|
|
15136
|
+
boxSizing: "border-box"
|
|
14850
15137
|
};
|
|
14851
|
-
var
|
|
14852
|
-
|
|
15138
|
+
var completeBadgeStyle = (color) => ({
|
|
15139
|
+
width: 24,
|
|
15140
|
+
height: 24,
|
|
15141
|
+
borderRadius: "50%",
|
|
15142
|
+
background: color,
|
|
15143
|
+
display: "inline-flex",
|
|
14853
15144
|
alignItems: "center",
|
|
14854
|
-
|
|
15145
|
+
justifyContent: "center",
|
|
14855
15146
|
flexShrink: 0
|
|
14856
|
-
};
|
|
14857
|
-
var
|
|
15147
|
+
});
|
|
15148
|
+
var pendingBadgeStyle = (color) => ({
|
|
14858
15149
|
width: 24,
|
|
14859
15150
|
height: 24,
|
|
14860
|
-
|
|
14861
|
-
|
|
14862
|
-
|
|
14863
|
-
|
|
14864
|
-
|
|
14865
|
-
|
|
14866
|
-
|
|
15151
|
+
borderRadius: "50%",
|
|
15152
|
+
background: color,
|
|
15153
|
+
flexShrink: 0
|
|
15154
|
+
});
|
|
15155
|
+
var labelStyle7 = (color) => ({
|
|
15156
|
+
fontSize: "1rem",
|
|
15157
|
+
fontWeight: 400,
|
|
15158
|
+
lineHeight: 1.25,
|
|
14867
15159
|
color
|
|
14868
15160
|
});
|
|
14869
|
-
var
|
|
14870
|
-
flex: 1,
|
|
14871
|
-
minHeight: 0,
|
|
15161
|
+
var footerStackStyle4 = {
|
|
14872
15162
|
display: "flex",
|
|
14873
15163
|
flexDirection: "column",
|
|
14874
|
-
|
|
14875
|
-
justifyContent: "center",
|
|
15164
|
+
gap: 16,
|
|
14876
15165
|
width: "100%"
|
|
14877
15166
|
};
|
|
14878
|
-
var
|
|
15167
|
+
var retryStackStyle = {
|
|
14879
15168
|
display: "flex",
|
|
14880
15169
|
flexDirection: "column",
|
|
14881
|
-
gap: 8
|
|
15170
|
+
gap: 8,
|
|
15171
|
+
width: "100%"
|
|
15172
|
+
};
|
|
15173
|
+
var lockBannerStyle2 = {
|
|
15174
|
+
display: "flex",
|
|
15175
|
+
alignItems: "flex-start",
|
|
15176
|
+
gap: 16,
|
|
15177
|
+
padding: "12px 16px 12px 12px",
|
|
15178
|
+
borderRadius: 16,
|
|
15179
|
+
width: "100%",
|
|
15180
|
+
boxSizing: "border-box"
|
|
14882
15181
|
};
|
|
15182
|
+
var lockIconWrapStyle2 = (color) => ({
|
|
15183
|
+
flexShrink: 0,
|
|
15184
|
+
width: 24,
|
|
15185
|
+
height: 24,
|
|
15186
|
+
display: "inline-flex",
|
|
15187
|
+
alignItems: "center",
|
|
15188
|
+
justifyContent: "center",
|
|
15189
|
+
color
|
|
15190
|
+
});
|
|
15191
|
+
var lockBannerTextStyle2 = (color) => ({
|
|
15192
|
+
margin: 0,
|
|
15193
|
+
flex: 1,
|
|
15194
|
+
fontSize: 12,
|
|
15195
|
+
fontWeight: 500,
|
|
15196
|
+
lineHeight: "normal",
|
|
15197
|
+
color
|
|
15198
|
+
});
|
|
14883
15199
|
function ConfirmSignScreen({
|
|
14884
15200
|
walletName,
|
|
14885
15201
|
chainFamily,
|
|
@@ -14908,7 +15224,7 @@ function ConfirmSignScreen({
|
|
|
14908
15224
|
/* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onLogout }),
|
|
14909
15225
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle16, children: [
|
|
14910
15226
|
logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSrc, alt: displayName, style: logoStyle3 }) : /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 48 }),
|
|
14911
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { style:
|
|
15227
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle14(tokens.text), children: heading }),
|
|
14912
15228
|
/* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle10(tokens.textSecondary), children: subtitle }),
|
|
14913
15229
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: successBadgeStyle(tokens), children: [
|
|
14914
15230
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: checkmarkStyle, children: "\u2713" }),
|
|
@@ -14934,7 +15250,7 @@ var logoStyle3 = {
|
|
|
14934
15250
|
borderRadius: 14,
|
|
14935
15251
|
objectFit: "contain"
|
|
14936
15252
|
};
|
|
14937
|
-
var
|
|
15253
|
+
var headingStyle14 = (color) => ({
|
|
14938
15254
|
fontSize: "1.45rem",
|
|
14939
15255
|
fontWeight: 700,
|
|
14940
15256
|
letterSpacing: "-0.02em",
|
|
@@ -15014,10 +15330,12 @@ function TokenPickerScreen({
|
|
|
15014
15330
|
tokenSymbol: source.token.symbol,
|
|
15015
15331
|
tokenAddress: source.address,
|
|
15016
15332
|
balance: visibleBalance,
|
|
15017
|
-
status: source.token.status
|
|
15333
|
+
status: source.token.status,
|
|
15334
|
+
logoURI: source.token.logoURI
|
|
15018
15335
|
});
|
|
15019
15336
|
}
|
|
15020
15337
|
}
|
|
15338
|
+
const selectedEntryLogo = selectedTokenSymbol ? entries2.find((e) => e.tokenSymbol === selectedTokenSymbol)?.logoURI ?? TOKEN_LOGOS[selectedTokenSymbol] : void 0;
|
|
15021
15339
|
const handleSelect = (entry) => {
|
|
15022
15340
|
if (entry.status === "AUTHORIZED") {
|
|
15023
15341
|
onSelectAuthorized(entry.walletId, entry.tokenSymbol);
|
|
@@ -15044,7 +15362,7 @@ function TokenPickerScreen({
|
|
|
15044
15362
|
onClick: onBack,
|
|
15045
15363
|
style: tokenIconButtonStyle,
|
|
15046
15364
|
children: [
|
|
15047
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: tokenIconWrapStyle, children:
|
|
15365
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: tokenIconWrapStyle, children: selectedEntryLogo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: selectedEntryLogo, alt: selectedTokenSymbol, width: 36, height: 36, style: { borderRadius: "50%" } }) : /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", children: [
|
|
15048
15366
|
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "18", cy: "18", r: "18", fill: "#2DB84B" }),
|
|
15049
15367
|
/* @__PURE__ */ jsxRuntime.jsx("text", { x: "18", y: "23", textAnchor: "middle", fontSize: "18", fill: "#fff", fontWeight: "700", children: "$" })
|
|
15050
15368
|
] }) }),
|
|
@@ -15058,6 +15376,7 @@ function TokenPickerScreen({
|
|
|
15058
15376
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: tokenListStyle2, children: entries2.map((entry) => {
|
|
15059
15377
|
const authorized = entry.status === "AUTHORIZED";
|
|
15060
15378
|
const isSelected = entry.walletId === selectedWalletId && entry.tokenSymbol === selectedTokenSymbol;
|
|
15379
|
+
const entryLogo = entry.logoURI ?? TOKEN_LOGOS[entry.tokenSymbol];
|
|
15061
15380
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15062
15381
|
"button",
|
|
15063
15382
|
{
|
|
@@ -15065,7 +15384,7 @@ function TokenPickerScreen({
|
|
|
15065
15384
|
onClick: () => handleSelect(entry),
|
|
15066
15385
|
style: tokenRowStyle2(t),
|
|
15067
15386
|
children: [
|
|
15068
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: tokenIconCircleStyle2(t, !!
|
|
15387
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: tokenIconCircleStyle2(t, !!entryLogo), children: entryLogo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: entryLogo, alt: entry.tokenSymbol, style: tokenLogoImgStyle2 }) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: tokenIconTextStyle2(t.textMuted), children: "$" }) }),
|
|
15069
15388
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: tokenInfoStyle2, children: [
|
|
15070
15389
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: tokenNameRowStyle, children: [
|
|
15071
15390
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: tokenSymbolTextStyle(t.text), children: entry.tokenSymbol }),
|
|
@@ -15296,10 +15615,10 @@ function GuestTokenPickerScreen({
|
|
|
15296
15615
|
children: [
|
|
15297
15616
|
/* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack }),
|
|
15298
15617
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle17, children: [
|
|
15299
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { style:
|
|
15618
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle15(tokens.text), children: title }),
|
|
15300
15619
|
error && /* @__PURE__ */ jsxRuntime.jsx("div", { style: errorBannerStyle8(tokens), children: error }),
|
|
15301
15620
|
entries2.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle11(tokens.textMuted), children: emptyMessage ?? "No tokens available." }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15302
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style:
|
|
15621
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle8(tokens.textSecondary), children: "Token" }),
|
|
15303
15622
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15304
15623
|
"button",
|
|
15305
15624
|
{
|
|
@@ -15379,7 +15698,7 @@ var contentStyle17 = {
|
|
|
15379
15698
|
padding: "0 20px 16px",
|
|
15380
15699
|
gap: 12
|
|
15381
15700
|
};
|
|
15382
|
-
var
|
|
15701
|
+
var headingStyle15 = (color) => ({
|
|
15383
15702
|
fontSize: "1.25rem",
|
|
15384
15703
|
fontWeight: 700,
|
|
15385
15704
|
color,
|
|
@@ -15391,7 +15710,7 @@ var subtitleStyle11 = (color) => ({
|
|
|
15391
15710
|
color,
|
|
15392
15711
|
textAlign: "center"
|
|
15393
15712
|
});
|
|
15394
|
-
var
|
|
15713
|
+
var labelStyle8 = (color) => ({
|
|
15395
15714
|
fontSize: "0.75rem",
|
|
15396
15715
|
fontWeight: 600,
|
|
15397
15716
|
color,
|
|
@@ -15524,7 +15843,7 @@ function ManualTransferFlow({
|
|
|
15524
15843
|
screenContent = /* @__PURE__ */ jsxRuntime.jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsxRuntime.jsx(PrimaryButton, { onClick: onBack, children: "Back" }), children: [
|
|
15525
15844
|
/* @__PURE__ */ jsxRuntime.jsx(ScreenHeader, { onBack }),
|
|
15526
15845
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle18, children: [
|
|
15527
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { style:
|
|
15846
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle16(tokens.text), children: "Manual transfer unavailable" }),
|
|
15528
15847
|
/* @__PURE__ */ jsxRuntime.jsx("p", { style: bodyStyle5(tokens.textMuted), children: "merchantAuthorization is required." })
|
|
15529
15848
|
] })
|
|
15530
15849
|
] });
|
|
@@ -15603,7 +15922,7 @@ var contentStyle18 = {
|
|
|
15603
15922
|
paddingBottom: 24,
|
|
15604
15923
|
width: "100%"
|
|
15605
15924
|
};
|
|
15606
|
-
var
|
|
15925
|
+
var headingStyle16 = (color) => ({
|
|
15607
15926
|
color,
|
|
15608
15927
|
fontSize: "2rem",
|
|
15609
15928
|
lineHeight: 1.05,
|
|
@@ -15628,7 +15947,7 @@ function GenericLoadingShimmer() {
|
|
|
15628
15947
|
role: "status",
|
|
15629
15948
|
"aria-label": "Loading payment flow",
|
|
15630
15949
|
"aria-busy": "true",
|
|
15631
|
-
style:
|
|
15950
|
+
style: sheetStyle2(tokens),
|
|
15632
15951
|
children: [
|
|
15633
15952
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
15634
15953
|
@keyframes blink-loading-shimmer {
|
|
@@ -15674,7 +15993,7 @@ function ShimmerBlock2({
|
|
|
15674
15993
|
}
|
|
15675
15994
|
);
|
|
15676
15995
|
}
|
|
15677
|
-
var
|
|
15996
|
+
var sheetStyle2 = (tokens) => ({
|
|
15678
15997
|
display: "flex",
|
|
15679
15998
|
flexDirection: "column",
|
|
15680
15999
|
height: "100%",
|
|
@@ -15721,12 +16040,12 @@ function buildLoginScreenProps({ flow, handlers }) {
|
|
|
15721
16040
|
}
|
|
15722
16041
|
function buildDepositOptionsScreenProps({ flow, handlers }) {
|
|
15723
16042
|
return {
|
|
15724
|
-
// "
|
|
15725
|
-
// existing login path runs unchanged.
|
|
15726
|
-
onFromWallet: handlers.onLogin,
|
|
15727
|
-
// "To Address" navigates to the manual-transfer flow.
|
|
16043
|
+
// "Send Crypto Manually" navigates to the manual-transfer flow.
|
|
15728
16044
|
onToAddress: () => handlers.onSetPhase({ step: "manual-transfer" }),
|
|
15729
|
-
|
|
16045
|
+
// The primary CTA routes to the login screen (credential selection) rather
|
|
16046
|
+
// than prompting for a passkey directly, matching the connect-wallet entry
|
|
16047
|
+
// point. onLogin dispatches REQUEST_LOGIN → step 'login' → LoginScreen.
|
|
16048
|
+
onSignInWithBlink: handlers.onLogin,
|
|
15730
16049
|
// Deposit-options is the root screen for the full-widget flow, so the
|
|
15731
16050
|
// top-right (X) closes the widget through the same `onBack` the host
|
|
15732
16051
|
// provides. Falling back to `undefined` hides the close button when the
|
|
@@ -15818,7 +16137,8 @@ function buildApprovingInWalletScreenProps({
|
|
|
15818
16137
|
chainName: setupToken?.chainName ?? null,
|
|
15819
16138
|
step,
|
|
15820
16139
|
error: flow.state.error || remote.authExecutorError,
|
|
15821
|
-
onRetry: handlers.onRetryAuthorization
|
|
16140
|
+
onRetry: handlers.onRetryAuthorization,
|
|
16141
|
+
onLogout: flow.isDesktop ? handlers.onLogout : void 0
|
|
15822
16142
|
};
|
|
15823
16143
|
}
|
|
15824
16144
|
function buildLinkTokensScreenProps({
|
|
@@ -15951,7 +16271,8 @@ function buildDepositScreenProps({
|
|
|
15951
16271
|
status: source.token.status,
|
|
15952
16272
|
tokenAddress: source.address,
|
|
15953
16273
|
chainId: chain?.commonId ?? void 0,
|
|
15954
|
-
accountId: account.id
|
|
16274
|
+
accountId: account.id,
|
|
16275
|
+
logoURI: source.token.logoURI
|
|
15955
16276
|
});
|
|
15956
16277
|
}
|
|
15957
16278
|
}
|
|
@@ -16004,6 +16325,7 @@ function buildDepositScreenProps({
|
|
|
16004
16325
|
},
|
|
16005
16326
|
selectedTokenSymbol: selectedSource?.token.symbol,
|
|
16006
16327
|
selectedChainName: selectedWallet?.chain.name,
|
|
16328
|
+
selectedTokenLogoUri: selectedSource?.token.logoURI,
|
|
16007
16329
|
selectedWalletId: selectedWallet?.id ?? null,
|
|
16008
16330
|
selectedTokenStatus,
|
|
16009
16331
|
onAuthorizeSelectedToken,
|
|
@@ -19401,12 +19723,20 @@ function BlinkPaymentInner({
|
|
|
19401
19723
|
dispatch,
|
|
19402
19724
|
orchestrator
|
|
19403
19725
|
]);
|
|
19726
|
+
const disconnectWallets = react.useCallback(async () => {
|
|
19727
|
+
await Promise.allSettled([
|
|
19728
|
+
revokeAndDisconnectActiveWagmiConnector(wagmiConfig),
|
|
19729
|
+
authExecutor.resetWalletConnect().catch(() => {
|
|
19730
|
+
}),
|
|
19731
|
+
disconnectSolanaWallet()
|
|
19732
|
+
]);
|
|
19733
|
+
}, [authExecutor, wagmiConfig]);
|
|
19404
19734
|
const handleBackFromSetupDeposit = react.useCallback(async () => {
|
|
19405
19735
|
orchestrator.cancelPendingFlow();
|
|
19406
19736
|
authExecutor.cancelPendingExecution();
|
|
19407
19737
|
clearScreenErrors();
|
|
19408
19738
|
if (isDesktop) {
|
|
19409
|
-
await
|
|
19739
|
+
await disconnectWallets();
|
|
19410
19740
|
}
|
|
19411
19741
|
dispatch({ type: "RESTORE_SELECTION" });
|
|
19412
19742
|
dispatch({ type: "CLEAR_SETUP_DEPOSIT_TOKEN" });
|
|
@@ -19414,7 +19744,7 @@ function BlinkPaymentInner({
|
|
|
19414
19744
|
dispatch({ type: "DESKTOP_WAIT_CLEARED" });
|
|
19415
19745
|
dispatch({ type: "SET_STANDARD_DESKTOP_INLINE_OPEN_WALLET", value: false });
|
|
19416
19746
|
dispatch({ type: "SET_USER_INTENT", intent: { step: "wallet-picker", reason: "switch" } });
|
|
19417
|
-
}, [authExecutor, clearScreenErrors, orchestrator, dispatch, isDesktop,
|
|
19747
|
+
}, [authExecutor, clearScreenErrors, orchestrator, dispatch, isDesktop, disconnectWallets]);
|
|
19418
19748
|
const handleAuthorizationRetry = react.useCallback(() => {
|
|
19419
19749
|
void (async () => {
|
|
19420
19750
|
try {
|
|
@@ -19459,11 +19789,7 @@ function BlinkPaymentInner({
|
|
|
19459
19789
|
dispatch({ type: "DESKTOP_WAIT_CLEARED" });
|
|
19460
19790
|
dispatch({ type: "SET_STANDARD_DESKTOP_INLINE_OPEN_WALLET", value: false });
|
|
19461
19791
|
dispatch({ type: "SET_USER_INTENT", intent: { step: "wallet-picker", reason: "switch" } });
|
|
19462
|
-
void (
|
|
19463
|
-
await revokeAndDisconnectActiveWagmiConnector(wagmiConfig);
|
|
19464
|
-
await authExecutor.resetWalletConnect().catch(() => {
|
|
19465
|
-
});
|
|
19466
|
-
})();
|
|
19792
|
+
void disconnectWallets();
|
|
19467
19793
|
},
|
|
19468
19794
|
onSendManually: () => handleSetPhase({ step: "manual-transfer" }),
|
|
19469
19795
|
onBackFromSetupDeposit: handleBackFromSetupDeposit,
|
|
@@ -19510,7 +19836,7 @@ function BlinkPaymentInner({
|
|
|
19510
19836
|
handleConfirmSetupDeposit,
|
|
19511
19837
|
handleBackFromSetupDeposit,
|
|
19512
19838
|
handleAuthorizationRetry,
|
|
19513
|
-
|
|
19839
|
+
disconnectWallets
|
|
19514
19840
|
]);
|
|
19515
19841
|
return /* @__PURE__ */ jsxRuntime.jsx(EffectiveDepositAmountProvider, { value: effectiveDepositAmount, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
19516
19842
|
ManualTransferSessionProvider,
|
|
@@ -19580,25 +19906,6 @@ function BlinkPaymentInner({
|
|
|
19580
19906
|
) });
|
|
19581
19907
|
}
|
|
19582
19908
|
|
|
19583
|
-
// src/deviceBiometricUnlockText.ts
|
|
19584
|
-
var FALLBACK = "Biometric verification";
|
|
19585
|
-
function getDeviceBiometricUnlockText() {
|
|
19586
|
-
const ua = typeof navigator !== "undefined" && typeof navigator.userAgent === "string" ? navigator.userAgent : "";
|
|
19587
|
-
if (/iPhone|iPad|iPod/i.test(ua)) {
|
|
19588
|
-
return "Face ID";
|
|
19589
|
-
}
|
|
19590
|
-
if (/Android/i.test(ua)) {
|
|
19591
|
-
return "Fingerprint or face unlock";
|
|
19592
|
-
}
|
|
19593
|
-
if (/Windows NT/i.test(ua)) {
|
|
19594
|
-
return "Windows Hello";
|
|
19595
|
-
}
|
|
19596
|
-
if (/Macintosh|Mac OS X/i.test(ua)) {
|
|
19597
|
-
return "Touch ID";
|
|
19598
|
-
}
|
|
19599
|
-
return FALLBACK;
|
|
19600
|
-
}
|
|
19601
|
-
|
|
19602
19909
|
exports.ACCOUNT_SWITCH_CONFLICT_MESSAGE = ACCOUNT_SWITCH_CONFLICT_MESSAGE;
|
|
19603
19910
|
exports.AdvancedSourceScreen = AdvancedSourceScreen;
|
|
19604
19911
|
exports.ApprovingInWalletScreen = ApprovingInWalletScreen;
|
|
@@ -19615,6 +19922,7 @@ exports.BlinkPayment = BlinkPayment;
|
|
|
19615
19922
|
exports.BlinkProvider = BlinkProvider;
|
|
19616
19923
|
exports.ConfirmSignScreen = ConfirmSignScreen;
|
|
19617
19924
|
exports.DepositCompleteScreen = DepositCompleteScreen;
|
|
19925
|
+
exports.DepositOptionsScreen = DepositOptionsScreen;
|
|
19618
19926
|
exports.DepositScreen = DepositScreen;
|
|
19619
19927
|
exports.DepositTransferStatusScreen = DepositTransferStatusScreen;
|
|
19620
19928
|
exports.GuestTokenPickerScreen = GuestTokenPickerScreen;
|