@swype-org/react-sdk 0.2.361 → 0.2.372
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 +393 -267
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +393 -267
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -612,6 +612,21 @@ function resolveSelectSourceOption(choices, options, chainName, tokenSymbol, rec
|
|
|
612
612
|
));
|
|
613
613
|
}
|
|
614
614
|
|
|
615
|
+
// src/walletFlow.ts
|
|
616
|
+
var MOBILE_USER_AGENT_PATTERN = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;
|
|
617
|
+
function isMobileUserAgent(userAgent) {
|
|
618
|
+
if (!userAgent) {
|
|
619
|
+
return false;
|
|
620
|
+
}
|
|
621
|
+
return MOBILE_USER_AGENT_PATTERN.test(userAgent);
|
|
622
|
+
}
|
|
623
|
+
function shouldUseWalletConnector(options) {
|
|
624
|
+
return options.useWalletConnector ?? !isMobileUserAgent(options.userAgent);
|
|
625
|
+
}
|
|
626
|
+
function resolveCoinbasePreferenceOptions(userAgent) {
|
|
627
|
+
return isMobileUserAgent(userAgent) ? "all" : "eoaOnly";
|
|
628
|
+
}
|
|
629
|
+
|
|
615
630
|
// src/walletBridge/protocol.ts
|
|
616
631
|
var BRIDGE_PROTOCOL_VERSION = 1;
|
|
617
632
|
function parseBridgeMessage(data) {
|
|
@@ -982,18 +997,28 @@ function FingerprintVisitorPing() {
|
|
|
982
997
|
return null;
|
|
983
998
|
}
|
|
984
999
|
function buildStaticConnectors() {
|
|
1000
|
+
const userAgent = typeof navigator === "undefined" ? null : navigator.userAgent;
|
|
985
1001
|
return [
|
|
986
1002
|
// `unstable_shimAsyncInject` covers wallets whose content scripts wire
|
|
987
1003
|
// up after page load (Phantom, Trust, MetaMask in the iframe).
|
|
988
1004
|
injected({ unstable_shimAsyncInject: 2e3 }),
|
|
989
|
-
//
|
|
990
|
-
//
|
|
991
|
-
//
|
|
992
|
-
//
|
|
993
|
-
//
|
|
994
|
-
//
|
|
995
|
-
//
|
|
996
|
-
|
|
1005
|
+
// Coinbase Wallet SDK connection preference is platform-specific
|
|
1006
|
+
// (see `resolveCoinbasePreferenceOptions`):
|
|
1007
|
+
// • Desktop → `eoaOnly`: in smart-wallet mode the Base extension hands
|
|
1008
|
+
// the dapp a separate, often-empty smart-wallet account instead of the
|
|
1009
|
+
// user's funded EOA → "no assets". `eoaOnly` binds the funded EOA.
|
|
1010
|
+
// • Mobile (Base in-app WebView) → `all`: signing must use the injected
|
|
1011
|
+
// `window.ethereum`; the SDK path reloads the iOS WKWebView after each
|
|
1012
|
+
// signature.
|
|
1013
|
+
//
|
|
1014
|
+
// Exactly ONE Coinbase connector: two `@coinbase/wallet-sdk` instances in
|
|
1015
|
+
// one page collide on shared `window` listeners + the Communicator (Privy
|
|
1016
|
+
// connector-init timeout, listener leaks, duplicated `client-project-name`
|
|
1017
|
+
// that 400s the connect), so we never register a second one.
|
|
1018
|
+
coinbaseWallet({
|
|
1019
|
+
appName: "Blink",
|
|
1020
|
+
preference: { options: resolveCoinbasePreferenceOptions(userAgent) }
|
|
1021
|
+
})
|
|
997
1022
|
];
|
|
998
1023
|
}
|
|
999
1024
|
function buildWagmiConfig(bridgedWallets) {
|
|
@@ -1143,9 +1168,10 @@ function buildTargetMatchers(target) {
|
|
|
1143
1168
|
aliases.add("io.metamask");
|
|
1144
1169
|
}
|
|
1145
1170
|
if (value === "base" || value === "base account" || value === "base app" || value.includes("coinbase")) {
|
|
1146
|
-
aliases.add("base");
|
|
1147
1171
|
aliases.add("coinbase");
|
|
1148
1172
|
aliases.add("coinbasewalletsdk");
|
|
1173
|
+
aliases.add("com.coinbase.wallet");
|
|
1174
|
+
aliases.add("baseaccount");
|
|
1149
1175
|
}
|
|
1150
1176
|
if (value.includes("trust")) {
|
|
1151
1177
|
aliases.add("trust");
|
|
@@ -1219,19 +1245,70 @@ async function withTimeout(promise, ms, label) {
|
|
|
1219
1245
|
if (timer !== void 0) clearTimeout(timer);
|
|
1220
1246
|
}
|
|
1221
1247
|
}
|
|
1222
|
-
function
|
|
1248
|
+
function isCoinbaseSdkConnector(connector) {
|
|
1223
1249
|
if (!connector) return false;
|
|
1224
1250
|
return connectorMatchesWallet(
|
|
1225
1251
|
{ id: connector.id, name: connector.name ?? "" },
|
|
1226
1252
|
{ wagmiConnectorId: "coinbaseWalletSDK" }
|
|
1227
1253
|
);
|
|
1228
1254
|
}
|
|
1255
|
+
var COINBASE_SDK_STORAGE_PREFIXES = ["-CBWSDK", "-walletlink"];
|
|
1256
|
+
var COINBASE_SIGNER_TYPE_STORAGE_KEY = "-CBWSDK:SignerConfigurator:SignerType";
|
|
1257
|
+
function loadCoinbaseSignerType() {
|
|
1258
|
+
if (typeof window === "undefined" || !window.localStorage) return null;
|
|
1259
|
+
try {
|
|
1260
|
+
return window.localStorage.getItem(COINBASE_SIGNER_TYPE_STORAGE_KEY);
|
|
1261
|
+
} catch {
|
|
1262
|
+
return null;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
function clearCoinbaseWalletSdkSession() {
|
|
1266
|
+
if (typeof window === "undefined" || !window.localStorage) return;
|
|
1267
|
+
try {
|
|
1268
|
+
const store = window.localStorage;
|
|
1269
|
+
const keysToRemove = [];
|
|
1270
|
+
for (let i = 0; i < store.length; i += 1) {
|
|
1271
|
+
const key = store.key(i);
|
|
1272
|
+
if (key && COINBASE_SDK_STORAGE_PREFIXES.some((prefix) => key.startsWith(prefix))) {
|
|
1273
|
+
keysToRemove.push(key);
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
keysToRemove.forEach((key) => store.removeItem(key));
|
|
1277
|
+
console.info("[blink-sdk][disconnect] cleared Coinbase Wallet SDK session", {
|
|
1278
|
+
clearedKeys: keysToRemove.length
|
|
1279
|
+
});
|
|
1280
|
+
} catch (err) {
|
|
1281
|
+
console.info("[blink-sdk][disconnect] failed to clear Coinbase Wallet SDK session", err);
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
function resetWagmiConnectionInMemory(wagmiConfig, connector) {
|
|
1285
|
+
if (!connector) return;
|
|
1286
|
+
try {
|
|
1287
|
+
const target = connector;
|
|
1288
|
+
const connections = [...wagmiConfig.state.connections.values()];
|
|
1289
|
+
const match = connections.find((conn) => {
|
|
1290
|
+
const live2 = conn.connector;
|
|
1291
|
+
if (target.uid && live2.uid) return live2.uid === target.uid;
|
|
1292
|
+
return live2.id === target.id;
|
|
1293
|
+
});
|
|
1294
|
+
const live = match?.connector;
|
|
1295
|
+
if (!live?.emitter) return;
|
|
1296
|
+
live.emitter.emit("disconnect");
|
|
1297
|
+
console.info("[blink-sdk][disconnect] reset wagmi in-memory connection via emitter", {
|
|
1298
|
+
connectorId: live.id
|
|
1299
|
+
});
|
|
1300
|
+
} catch (err) {
|
|
1301
|
+
console.info("[blink-sdk][disconnect] failed to reset wagmi in-memory connection", err);
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1229
1304
|
async function safeDisconnect(wagmiConfig, connector) {
|
|
1230
|
-
if (
|
|
1305
|
+
if (isCoinbaseSdkConnector(connector)) {
|
|
1231
1306
|
console.info(
|
|
1232
|
-
"[blink-sdk][disconnect]
|
|
1307
|
+
"[blink-sdk][disconnect] clearing Coinbase Wallet SDK session instead of wagmi disconnect",
|
|
1233
1308
|
{ connectorId: connector?.id }
|
|
1234
1309
|
);
|
|
1310
|
+
clearCoinbaseWalletSdkSession();
|
|
1311
|
+
resetWagmiConnectionInMemory(wagmiConfig, connector);
|
|
1235
1312
|
return;
|
|
1236
1313
|
}
|
|
1237
1314
|
await disconnect(wagmiConfig, { connector }).catch(() => {
|
|
@@ -3885,6 +3962,23 @@ function isUserRejection(msg) {
|
|
|
3885
3962
|
const lower = msg.toLowerCase();
|
|
3886
3963
|
return lower.includes("rejected") || lower.includes("denied");
|
|
3887
3964
|
}
|
|
3965
|
+
var EmptyConnectionAccountError = class extends Error {
|
|
3966
|
+
constructor(message = "Wallet connected but returned no account address.") {
|
|
3967
|
+
super(message);
|
|
3968
|
+
this.name = "EmptyConnectionAccountError";
|
|
3969
|
+
}
|
|
3970
|
+
};
|
|
3971
|
+
var EVM_ADDRESS_RE = /^0x[0-9a-fA-F]{40}$/;
|
|
3972
|
+
function assertNonEmptyConnectedAddress(address, ctx) {
|
|
3973
|
+
if (typeof address === "string" && EVM_ADDRESS_RE.test(address)) {
|
|
3974
|
+
return;
|
|
3975
|
+
}
|
|
3976
|
+
appendDebug("error", "OPEN_PROVIDER: empty-or-invalid-connected-address", {
|
|
3977
|
+
...ctx,
|
|
3978
|
+
address: address ?? null
|
|
3979
|
+
});
|
|
3980
|
+
throw new EmptyConnectionAccountError();
|
|
3981
|
+
}
|
|
3888
3982
|
function requiresExplicitEvmNonce(account) {
|
|
3889
3983
|
return connectorMatchesWallet(account?.connector, { providerName: "trust" }) || connectorMatchesWallet(account?.connector, { providerName: "phantom" });
|
|
3890
3984
|
}
|
|
@@ -4118,7 +4212,8 @@ async function executeOpenProvider(action, wagmiConfig, connectors, connectAsync
|
|
|
4118
4212
|
accountConnectorId: account.connector?.id ?? null,
|
|
4119
4213
|
accountConnectorName: account.connector?.name ?? null,
|
|
4120
4214
|
targetId: targetId ?? null,
|
|
4121
|
-
resolvedConnectorId: connector?.id ?? null
|
|
4215
|
+
resolvedConnectorId: connector?.id ?? null,
|
|
4216
|
+
availableConnectorIds: connectors.map((c) => c.id)
|
|
4122
4217
|
};
|
|
4123
4218
|
let disconnectedMismatchedConnector = false;
|
|
4124
4219
|
if (account.isConnected && account.address) {
|
|
@@ -4126,6 +4221,7 @@ async function executeOpenProvider(action, wagmiConfig, connectors, connectAsync
|
|
|
4126
4221
|
if (connectorMatchesTarget) {
|
|
4127
4222
|
const hexChainId2 = account.chainId ? `0x${account.chainId.toString(16)}` : void 0;
|
|
4128
4223
|
const branch = !targetId ? "early-return-no-target" : "early-return-connector-match";
|
|
4224
|
+
assertNonEmptyConnectedAddress(account.address, { ...logContext, branch });
|
|
4129
4225
|
console.info("[blink-sdk][open-provider] Skipping connectAsync; wagmi already connected.", {
|
|
4130
4226
|
...logContext,
|
|
4131
4227
|
branch
|
|
@@ -4149,6 +4245,20 @@ async function executeOpenProvider(action, wagmiConfig, connectors, connectAsync
|
|
|
4149
4245
|
disconnectedMismatchedConnector = true;
|
|
4150
4246
|
}
|
|
4151
4247
|
if (!disconnectedMismatchedConnector) {
|
|
4248
|
+
const targetIsCoinbase = connectorMatchesWallet(connector, {
|
|
4249
|
+
wagmiConnectorId: "coinbaseWalletSDK"
|
|
4250
|
+
});
|
|
4251
|
+
const isDesktopUa = !isMobileUserAgent(
|
|
4252
|
+
typeof navigator === "undefined" ? null : navigator.userAgent
|
|
4253
|
+
);
|
|
4254
|
+
if (targetIsCoinbase && isDesktopUa && loadCoinbaseSignerType() === "scw") {
|
|
4255
|
+
console.info(
|
|
4256
|
+
"[blink-sdk][open-provider] Clearing stale Coinbase Smart Wallet (scw) session before reconnect so eoaOnly binds the EOA.",
|
|
4257
|
+
logContext
|
|
4258
|
+
);
|
|
4259
|
+
appendDebug("info", "OPEN_PROVIDER: clearing stale scw session before reconnect", logContext);
|
|
4260
|
+
clearCoinbaseWalletSdkSession();
|
|
4261
|
+
}
|
|
4152
4262
|
console.info("[blink-sdk][open-provider] Attempting silent reconnect.", logContext);
|
|
4153
4263
|
appendDebug("info", "OPEN_PROVIDER: attempting silent reconnect", logContext);
|
|
4154
4264
|
const reconnections = await reconnect(wagmiConfig).catch(() => []);
|
|
@@ -4163,6 +4273,7 @@ async function executeOpenProvider(action, wagmiConfig, connectors, connectAsync
|
|
|
4163
4273
|
reconnectedConnectorId: reconnectedAccount.connector?.id ?? null,
|
|
4164
4274
|
reconnectionCount: reconnections.length
|
|
4165
4275
|
};
|
|
4276
|
+
assertNonEmptyConnectedAddress(reconnectedAccount.address, reconnectLogContext);
|
|
4166
4277
|
console.info(
|
|
4167
4278
|
"[blink-sdk][open-provider] Silent reconnect succeeded; skipping connectAsync.",
|
|
4168
4279
|
reconnectLogContext
|
|
@@ -4230,6 +4341,10 @@ async function executeOpenProvider(action, wagmiConfig, connectors, connectAsync
|
|
|
4230
4341
|
});
|
|
4231
4342
|
const result = await connectAsync({ connector });
|
|
4232
4343
|
const hexChainId = `0x${result.chainId.toString(16)}`;
|
|
4344
|
+
assertNonEmptyConnectedAddress(result.accounts[0], {
|
|
4345
|
+
...logContext,
|
|
4346
|
+
branch: "connectAsync-result"
|
|
4347
|
+
});
|
|
4233
4348
|
return actionSuccess(
|
|
4234
4349
|
action,
|
|
4235
4350
|
`Connected to ${connector.name}. Account: ${result.accounts[0]}, Chain: ${hexChainId}`,
|
|
@@ -4237,15 +4352,23 @@ async function executeOpenProvider(action, wagmiConfig, connectors, connectAsync
|
|
|
4237
4352
|
);
|
|
4238
4353
|
} catch (err) {
|
|
4239
4354
|
const msg = err instanceof Error ? err.message : "Failed to connect wallet";
|
|
4240
|
-
|
|
4241
|
-
|
|
4355
|
+
const emptyAccount = err instanceof EmptyConnectionAccountError;
|
|
4356
|
+
if (options?.externalAuthorizationAvailable && (isUserRejection(msg) || emptyAccount) && action.metadata?.chainFamily !== "svm") {
|
|
4357
|
+
appendDebug("info", "OPEN_PROVIDER: soft-halt", {
|
|
4242
4358
|
actionId: action.id,
|
|
4243
|
-
externalAuthorizationAvailable: true
|
|
4359
|
+
externalAuthorizationAvailable: true,
|
|
4360
|
+
reason: emptyAccount ? "empty-account" : "user-rejection"
|
|
4244
4361
|
});
|
|
4245
4362
|
return actionPending(
|
|
4246
4363
|
action,
|
|
4247
4364
|
"awaiting-external-authorization",
|
|
4248
|
-
"Wallet connection prompt dismissed \u2014 awaiting completion via cross-device authorization."
|
|
4365
|
+
emptyAccount ? "Wallet returned no account \u2014 awaiting completion via cross-device authorization." : "Wallet connection prompt dismissed \u2014 awaiting completion via cross-device authorization."
|
|
4366
|
+
);
|
|
4367
|
+
}
|
|
4368
|
+
if (emptyAccount) {
|
|
4369
|
+
return actionError(
|
|
4370
|
+
action,
|
|
4371
|
+
"We couldn't read an address from that wallet. Please reconnect and make sure an account is selected."
|
|
4249
4372
|
);
|
|
4250
4373
|
}
|
|
4251
4374
|
if (action.metadata?.chainFamily === "svm") {
|
|
@@ -6951,18 +7074,6 @@ function updateTrackedSession(sessions, ownerSessionId, reportedSession, actionS
|
|
|
6951
7074
|
}
|
|
6952
7075
|
}
|
|
6953
7076
|
|
|
6954
|
-
// src/walletFlow.ts
|
|
6955
|
-
var MOBILE_USER_AGENT_PATTERN = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;
|
|
6956
|
-
function isMobileUserAgent(userAgent) {
|
|
6957
|
-
if (!userAgent) {
|
|
6958
|
-
return false;
|
|
6959
|
-
}
|
|
6960
|
-
return MOBILE_USER_AGENT_PATTERN.test(userAgent);
|
|
6961
|
-
}
|
|
6962
|
-
function shouldUseWalletConnector(options) {
|
|
6963
|
-
return options.useWalletConnector ?? !isMobileUserAgent(options.userAgent);
|
|
6964
|
-
}
|
|
6965
|
-
|
|
6966
7077
|
// src/enterAmountInput.ts
|
|
6967
7078
|
var MAX_FRACTION_DIGITS = 2;
|
|
6968
7079
|
function isDigit(value) {
|
|
@@ -8562,6 +8673,52 @@ var buttonStyle = (color, hovered) => ({
|
|
|
8562
8673
|
flexShrink: 0,
|
|
8563
8674
|
transition: "background 0.15s ease"
|
|
8564
8675
|
});
|
|
8676
|
+
var INTERCOM_HELP_URL = "https://intercom.help/blinkcash/en/";
|
|
8677
|
+
var TERMS_URL = "https://blink.cash/terms";
|
|
8678
|
+
function SupportFooter() {
|
|
8679
|
+
const { tokens } = useBlinkConfig();
|
|
8680
|
+
return /* @__PURE__ */ jsxs("div", { style: containerStyle2(tokens.textMuted), children: [
|
|
8681
|
+
/* @__PURE__ */ jsx(
|
|
8682
|
+
"a",
|
|
8683
|
+
{
|
|
8684
|
+
href: INTERCOM_HELP_URL,
|
|
8685
|
+
target: "_blank",
|
|
8686
|
+
rel: "noopener noreferrer",
|
|
8687
|
+
style: linkStyle(tokens.textMuted),
|
|
8688
|
+
children: "Help"
|
|
8689
|
+
}
|
|
8690
|
+
),
|
|
8691
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", style: dotStyle(tokens.textTertiary), children: "\u2022" }),
|
|
8692
|
+
/* @__PURE__ */ jsx(
|
|
8693
|
+
"a",
|
|
8694
|
+
{
|
|
8695
|
+
href: TERMS_URL,
|
|
8696
|
+
target: "_blank",
|
|
8697
|
+
rel: "noopener noreferrer",
|
|
8698
|
+
style: linkStyle(tokens.textMuted),
|
|
8699
|
+
children: "Terms"
|
|
8700
|
+
}
|
|
8701
|
+
)
|
|
8702
|
+
] });
|
|
8703
|
+
}
|
|
8704
|
+
var containerStyle2 = (color) => ({
|
|
8705
|
+
display: "flex",
|
|
8706
|
+
alignItems: "center",
|
|
8707
|
+
justifyContent: "center",
|
|
8708
|
+
gap: 10,
|
|
8709
|
+
fontSize: "0.8rem",
|
|
8710
|
+
color,
|
|
8711
|
+
padding: "4px 0"
|
|
8712
|
+
});
|
|
8713
|
+
var linkStyle = (color) => ({
|
|
8714
|
+
color,
|
|
8715
|
+
fontWeight: 500,
|
|
8716
|
+
textDecoration: "none"
|
|
8717
|
+
});
|
|
8718
|
+
var dotStyle = (color) => ({
|
|
8719
|
+
color,
|
|
8720
|
+
fontSize: "0.8rem"
|
|
8721
|
+
});
|
|
8565
8722
|
function SettingsMenu({ onLogout }) {
|
|
8566
8723
|
const { tokens } = useBlinkConfig();
|
|
8567
8724
|
const [open, setOpen] = useState(false);
|
|
@@ -8577,34 +8734,54 @@ function SettingsMenu({ onLogout }) {
|
|
|
8577
8734
|
document.addEventListener("mousedown", handleClickOutside);
|
|
8578
8735
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
8579
8736
|
}, [open]);
|
|
8580
|
-
return /* @__PURE__ */ jsxs("div", { ref: menuRef, style:
|
|
8737
|
+
return /* @__PURE__ */ jsxs("div", { ref: menuRef, style: containerStyle3, children: [
|
|
8581
8738
|
/* @__PURE__ */ jsx(IconButton, { onClick: toggle, "aria-label": "Settings", children: /* @__PURE__ */ jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", children: [
|
|
8582
8739
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "5", r: "2", fill: "currentColor" }),
|
|
8583
8740
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2", fill: "currentColor" }),
|
|
8584
8741
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "19", r: "2", fill: "currentColor" })
|
|
8585
8742
|
] }) }),
|
|
8586
|
-
open && /* @__PURE__ */
|
|
8587
|
-
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8598
|
-
|
|
8599
|
-
|
|
8600
|
-
|
|
8601
|
-
|
|
8602
|
-
|
|
8603
|
-
|
|
8604
|
-
|
|
8743
|
+
open && /* @__PURE__ */ jsxs("div", { style: dropdownStyle(tokens), children: [
|
|
8744
|
+
/* @__PURE__ */ jsxs(
|
|
8745
|
+
"a",
|
|
8746
|
+
{
|
|
8747
|
+
href: INTERCOM_HELP_URL,
|
|
8748
|
+
target: "_blank",
|
|
8749
|
+
rel: "noopener noreferrer",
|
|
8750
|
+
onClick: () => setOpen(false),
|
|
8751
|
+
style: menuItemStyle(tokens.text),
|
|
8752
|
+
children: [
|
|
8753
|
+
/* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", style: { marginRight: 8, flexShrink: 0 }, children: [
|
|
8754
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9", stroke: tokens.text, strokeWidth: "2" }),
|
|
8755
|
+
/* @__PURE__ */ jsx("path", { d: "M9.5 9a2.5 2.5 0 014.5 1.5c0 1.5-2 2-2 3", stroke: tokens.text, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
8756
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "17", r: "1", fill: tokens.text })
|
|
8757
|
+
] }),
|
|
8758
|
+
"Help"
|
|
8759
|
+
]
|
|
8760
|
+
}
|
|
8761
|
+
),
|
|
8762
|
+
/* @__PURE__ */ jsxs(
|
|
8763
|
+
"button",
|
|
8764
|
+
{
|
|
8765
|
+
type: "button",
|
|
8766
|
+
onClick: () => {
|
|
8767
|
+
setOpen(false);
|
|
8768
|
+
onLogout();
|
|
8769
|
+
},
|
|
8770
|
+
style: menuItemStyle(tokens.error),
|
|
8771
|
+
children: [
|
|
8772
|
+
/* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", style: { marginRight: 8, flexShrink: 0 }, children: [
|
|
8773
|
+
/* @__PURE__ */ jsx("path", { d: "M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
8774
|
+
/* @__PURE__ */ jsx("polyline", { points: "16 17 21 12 16 7", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
8775
|
+
/* @__PURE__ */ jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12", stroke: tokens.error, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
8776
|
+
] }),
|
|
8777
|
+
"Log out"
|
|
8778
|
+
]
|
|
8779
|
+
}
|
|
8780
|
+
)
|
|
8781
|
+
] })
|
|
8605
8782
|
] });
|
|
8606
8783
|
}
|
|
8607
|
-
var
|
|
8784
|
+
var containerStyle3 = {
|
|
8608
8785
|
position: "relative"
|
|
8609
8786
|
};
|
|
8610
8787
|
var dropdownStyle = (tokens) => ({
|
|
@@ -8620,7 +8797,7 @@ var dropdownStyle = (tokens) => ({
|
|
|
8620
8797
|
zIndex: 100,
|
|
8621
8798
|
overflow: "hidden"
|
|
8622
8799
|
});
|
|
8623
|
-
var menuItemStyle = (
|
|
8800
|
+
var menuItemStyle = (color) => ({
|
|
8624
8801
|
width: "100%",
|
|
8625
8802
|
display: "flex",
|
|
8626
8803
|
alignItems: "center",
|
|
@@ -8631,7 +8808,9 @@ var menuItemStyle = (tokens) => ({
|
|
|
8631
8808
|
fontFamily: "inherit",
|
|
8632
8809
|
fontSize: "0.85rem",
|
|
8633
8810
|
fontWeight: 500,
|
|
8634
|
-
color
|
|
8811
|
+
color,
|
|
8812
|
+
textDecoration: "none",
|
|
8813
|
+
boxSizing: "border-box"
|
|
8635
8814
|
});
|
|
8636
8815
|
function ScreenHeader({ title, right, onBack, left, badge, onLogout, center }) {
|
|
8637
8816
|
const { tokens } = useBlinkConfig();
|
|
@@ -8692,7 +8871,7 @@ var badgeStyle = (color) => ({
|
|
|
8692
8871
|
});
|
|
8693
8872
|
function PoweredByFooter() {
|
|
8694
8873
|
const { tokens } = useBlinkConfig();
|
|
8695
|
-
return /* @__PURE__ */ jsx("div", { style:
|
|
8874
|
+
return /* @__PURE__ */ jsx("div", { style: containerStyle4(tokens.textMuted), children: /* @__PURE__ */ jsxs("div", { style: rowStyle, children: [
|
|
8696
8875
|
/* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
|
|
8697
8876
|
"path",
|
|
8698
8877
|
{
|
|
@@ -8703,7 +8882,7 @@ function PoweredByFooter() {
|
|
|
8703
8882
|
/* @__PURE__ */ jsx("span", { children: "Powered by Blink" })
|
|
8704
8883
|
] }) });
|
|
8705
8884
|
}
|
|
8706
|
-
var
|
|
8885
|
+
var containerStyle4 = (color) => ({
|
|
8707
8886
|
display: "flex",
|
|
8708
8887
|
flexDirection: "column",
|
|
8709
8888
|
alignItems: "center",
|
|
@@ -9413,12 +9592,12 @@ var defaultIcon = /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBo
|
|
|
9413
9592
|
) });
|
|
9414
9593
|
function InfoBanner({ children, icon }) {
|
|
9415
9594
|
const { tokens } = useBlinkConfig();
|
|
9416
|
-
return /* @__PURE__ */ jsxs("div", { style:
|
|
9595
|
+
return /* @__PURE__ */ jsxs("div", { style: containerStyle5(tokens.accent), children: [
|
|
9417
9596
|
/* @__PURE__ */ jsx("span", { style: iconStyle, children: icon ?? defaultIcon }),
|
|
9418
9597
|
/* @__PURE__ */ jsx("span", { style: textStyle, children })
|
|
9419
9598
|
] });
|
|
9420
9599
|
}
|
|
9421
|
-
var
|
|
9600
|
+
var containerStyle5 = (accent) => ({
|
|
9422
9601
|
display: "flex",
|
|
9423
9602
|
alignItems: "flex-start",
|
|
9424
9603
|
gap: 10,
|
|
@@ -9436,7 +9615,7 @@ var iconStyle = {
|
|
|
9436
9615
|
};
|
|
9437
9616
|
var textStyle = { flex: 1 };
|
|
9438
9617
|
function WarningBanner({ title, children }) {
|
|
9439
|
-
return /* @__PURE__ */ jsxs("div", { style:
|
|
9618
|
+
return /* @__PURE__ */ jsxs("div", { style: containerStyle6, children: [
|
|
9440
9619
|
/* @__PURE__ */ jsxs("div", { style: headerStyle2, children: [
|
|
9441
9620
|
/* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", style: iconStyle2, children: /* @__PURE__ */ jsx("path", { d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z", fill: "#F57C00" }) }),
|
|
9442
9621
|
/* @__PURE__ */ jsx("strong", { children: title })
|
|
@@ -9444,7 +9623,7 @@ function WarningBanner({ title, children }) {
|
|
|
9444
9623
|
/* @__PURE__ */ jsx("div", { style: bodyStyle2, children })
|
|
9445
9624
|
] });
|
|
9446
9625
|
}
|
|
9447
|
-
var
|
|
9626
|
+
var containerStyle6 = {
|
|
9448
9627
|
padding: "14px 16px",
|
|
9449
9628
|
background: "#FFF8E1",
|
|
9450
9629
|
border: "1px solid #FFE082",
|
|
@@ -9494,7 +9673,7 @@ function NotificationBanner({
|
|
|
9494
9673
|
}) {
|
|
9495
9674
|
const { tokens } = useBlinkConfig();
|
|
9496
9675
|
const color = variant === "negative" ? NEGATIVE_FG : tokens.text;
|
|
9497
|
-
return /* @__PURE__ */ jsxs("div", { style:
|
|
9676
|
+
return /* @__PURE__ */ jsxs("div", { style: containerStyle7(tokens.bgRecessed), children: [
|
|
9498
9677
|
/* @__PURE__ */ jsx("span", { style: { ...iconWrapStyle2, color }, children: icon ?? defaultIcon2 }),
|
|
9499
9678
|
/* @__PURE__ */ jsxs("div", { style: { ...textColStyle, color }, children: [
|
|
9500
9679
|
/* @__PURE__ */ jsx("p", { style: titleStyle3, children: title }),
|
|
@@ -9502,7 +9681,7 @@ function NotificationBanner({
|
|
|
9502
9681
|
] })
|
|
9503
9682
|
] });
|
|
9504
9683
|
}
|
|
9505
|
-
var
|
|
9684
|
+
var containerStyle7 = (bg) => ({
|
|
9506
9685
|
display: "flex",
|
|
9507
9686
|
alignItems: "flex-start",
|
|
9508
9687
|
gap: 16,
|
|
@@ -9597,7 +9776,7 @@ function OtpInput({ value, onChange, length = 6, disabled }) {
|
|
|
9597
9776
|
onChange(pasted);
|
|
9598
9777
|
focusInput(Math.min(pasted.length, length - 1));
|
|
9599
9778
|
}, [onChange, length, focusInput]);
|
|
9600
|
-
return /* @__PURE__ */ jsx("div", { style:
|
|
9779
|
+
return /* @__PURE__ */ jsx("div", { style: containerStyle8, children: digits.map((digit, i) => /* @__PURE__ */ jsx(
|
|
9601
9780
|
"input",
|
|
9602
9781
|
{
|
|
9603
9782
|
ref: (el) => {
|
|
@@ -9618,7 +9797,7 @@ function OtpInput({ value, onChange, length = 6, disabled }) {
|
|
|
9618
9797
|
i
|
|
9619
9798
|
)) });
|
|
9620
9799
|
}
|
|
9621
|
-
var
|
|
9800
|
+
var containerStyle8 = {
|
|
9622
9801
|
display: "flex",
|
|
9623
9802
|
gap: 8,
|
|
9624
9803
|
justifyContent: "center",
|
|
@@ -10583,6 +10762,38 @@ function FaceIdIcon({ size = 24 }) {
|
|
|
10583
10762
|
/* @__PURE__ */ jsx("path", { d: "M9.5 16c.7.6 1.6 1 2.5 1s1.8-.4 2.5-1", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round" })
|
|
10584
10763
|
] });
|
|
10585
10764
|
}
|
|
10765
|
+
function WalletIcon() {
|
|
10766
|
+
return /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
10767
|
+
/* @__PURE__ */ jsx(
|
|
10768
|
+
"path",
|
|
10769
|
+
{
|
|
10770
|
+
d: "M4 7.5A2.5 2.5 0 0 1 6.5 5h11A2.5 2.5 0 0 1 20 7.5v9A2.5 2.5 0 0 1 17.5 19h-11A2.5 2.5 0 0 1 4 16.5v-9Zm2.5-1a1 1 0 0 0-1 1V9h13v-1.5a1 1 0 0 0-1-1h-11ZM5.5 10.5v6a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1v-6h-13Z",
|
|
10771
|
+
fill: "currentColor"
|
|
10772
|
+
}
|
|
10773
|
+
),
|
|
10774
|
+
/* @__PURE__ */ jsx(
|
|
10775
|
+
"path",
|
|
10776
|
+
{
|
|
10777
|
+
d: "M14.5 13.75a.75.75 0 0 1 .75-.75h2a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1-.75-.75Z",
|
|
10778
|
+
fill: "currentColor"
|
|
10779
|
+
}
|
|
10780
|
+
)
|
|
10781
|
+
] });
|
|
10782
|
+
}
|
|
10783
|
+
function QrIcon({ color = "currentColor" } = {}) {
|
|
10784
|
+
return /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
10785
|
+
/* @__PURE__ */ jsx("rect", { x: "3.5", y: "3.5", width: "7", height: "7", rx: "1", stroke: color, strokeWidth: "1.4" }),
|
|
10786
|
+
/* @__PURE__ */ jsx("rect", { x: "6", y: "6", width: "2", height: "2", fill: color }),
|
|
10787
|
+
/* @__PURE__ */ jsx("rect", { x: "13.5", y: "3.5", width: "7", height: "7", rx: "1", stroke: color, strokeWidth: "1.4" }),
|
|
10788
|
+
/* @__PURE__ */ jsx("rect", { x: "16", y: "6", width: "2", height: "2", fill: color }),
|
|
10789
|
+
/* @__PURE__ */ jsx("rect", { x: "3.5", y: "13.5", width: "7", height: "7", rx: "1", stroke: color, strokeWidth: "1.4" }),
|
|
10790
|
+
/* @__PURE__ */ jsx("rect", { x: "6", y: "16", width: "2", height: "2", fill: color }),
|
|
10791
|
+
/* @__PURE__ */ jsx("rect", { x: "13.5", y: "13.5", width: "2.5", height: "2.5", fill: color }),
|
|
10792
|
+
/* @__PURE__ */ jsx("rect", { x: "18", y: "13.5", width: "2.5", height: "2.5", fill: color }),
|
|
10793
|
+
/* @__PURE__ */ jsx("rect", { x: "13.5", y: "18", width: "2.5", height: "2.5", fill: color }),
|
|
10794
|
+
/* @__PURE__ */ jsx("rect", { x: "18", y: "18", width: "2.5", height: "2.5", fill: color })
|
|
10795
|
+
] });
|
|
10796
|
+
}
|
|
10586
10797
|
function LogoCircle({ src, fallback, preserveShape, size = 36 }) {
|
|
10587
10798
|
const { tokens } = useBlinkConfig();
|
|
10588
10799
|
return /* @__PURE__ */ jsx("span", { style: logoCircleStyle(size, tokens.bgCard, tokens.textMuted), children: src ? /* @__PURE__ */ jsx("img", { src, alt: "", style: logoImageStyle(preserveShape) }) : fallback });
|
|
@@ -11052,7 +11263,8 @@ function LoginScreen({
|
|
|
11052
11263
|
style: secondaryTextStyle(tokens, loading),
|
|
11053
11264
|
children: secondaryLabel
|
|
11054
11265
|
}
|
|
11055
|
-
)
|
|
11266
|
+
),
|
|
11267
|
+
/* @__PURE__ */ jsx(SupportFooter, {})
|
|
11056
11268
|
] }),
|
|
11057
11269
|
children: [
|
|
11058
11270
|
/* @__PURE__ */ jsx(ScreenHeader, { onBack, right: headerRight }),
|
|
@@ -11224,7 +11436,7 @@ function DepositOptionsScreen({
|
|
|
11224
11436
|
const { tokens, promoTagText } = useBlinkConfig();
|
|
11225
11437
|
const [manualHovered, setManualHovered] = useState(false);
|
|
11226
11438
|
const [manualPressed, setManualPressed] = useState(false);
|
|
11227
|
-
return /* @__PURE__ */ jsxs(ScreenLayout, { hideScrollbar: true, children: [
|
|
11439
|
+
return /* @__PURE__ */ jsxs(ScreenLayout, { hideScrollbar: true, footer: /* @__PURE__ */ jsx(SupportFooter, {}), children: [
|
|
11228
11440
|
/* @__PURE__ */ jsx(
|
|
11229
11441
|
ScreenHeader,
|
|
11230
11442
|
{
|
|
@@ -11268,7 +11480,7 @@ function DepositOptionsScreen({
|
|
|
11268
11480
|
),
|
|
11269
11481
|
children: [
|
|
11270
11482
|
/* @__PURE__ */ jsx("span", { style: manualLabelStyle(tokens.text), children: "Send Crypto Manually" }),
|
|
11271
|
-
/* @__PURE__ */ jsx(
|
|
11483
|
+
/* @__PURE__ */ jsx(QrIcon2, { color: tokens.text })
|
|
11272
11484
|
]
|
|
11273
11485
|
}
|
|
11274
11486
|
)
|
|
@@ -11276,7 +11488,7 @@ function DepositOptionsScreen({
|
|
|
11276
11488
|
] })
|
|
11277
11489
|
] });
|
|
11278
11490
|
}
|
|
11279
|
-
function
|
|
11491
|
+
function QrIcon2({ color }) {
|
|
11280
11492
|
return /* @__PURE__ */ jsxs(
|
|
11281
11493
|
"svg",
|
|
11282
11494
|
{
|
|
@@ -11379,7 +11591,7 @@ function WelcomeBackScreen({
|
|
|
11379
11591
|
const [depositPressed, setDepositPressed] = useState(false);
|
|
11380
11592
|
const [manualHovered, setManualHovered] = useState(false);
|
|
11381
11593
|
const [manualPressed, setManualPressed] = useState(false);
|
|
11382
|
-
return /* @__PURE__ */ jsxs(ScreenLayout, { children: [
|
|
11594
|
+
return /* @__PURE__ */ jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsx(SupportFooter, {}), children: [
|
|
11383
11595
|
/* @__PURE__ */ jsx(
|
|
11384
11596
|
ScreenHeader,
|
|
11385
11597
|
{
|
|
@@ -11466,7 +11678,7 @@ function WelcomeBackScreen({
|
|
|
11466
11678
|
),
|
|
11467
11679
|
children: [
|
|
11468
11680
|
/* @__PURE__ */ jsx("span", { style: manualLabelStyle2(tokens.text), children: "Send Crypto Manually" }),
|
|
11469
|
-
/* @__PURE__ */ jsx(
|
|
11681
|
+
/* @__PURE__ */ jsx(QrIcon3, { color: tokens.text })
|
|
11470
11682
|
]
|
|
11471
11683
|
}
|
|
11472
11684
|
)
|
|
@@ -11474,7 +11686,7 @@ function WelcomeBackScreen({
|
|
|
11474
11686
|
] })
|
|
11475
11687
|
] });
|
|
11476
11688
|
}
|
|
11477
|
-
function
|
|
11689
|
+
function QrIcon3({ color }) {
|
|
11478
11690
|
return /* @__PURE__ */ jsxs(
|
|
11479
11691
|
"svg",
|
|
11480
11692
|
{
|
|
@@ -13584,7 +13796,7 @@ function SelectDepositSourceScreen({
|
|
|
13584
13796
|
label: "Send manually",
|
|
13585
13797
|
color: tokens.text,
|
|
13586
13798
|
onClick: onSendManually,
|
|
13587
|
-
icon: /* @__PURE__ */ jsx(
|
|
13799
|
+
icon: /* @__PURE__ */ jsx(QrIcon, { color: tokens.text })
|
|
13588
13800
|
}
|
|
13589
13801
|
),
|
|
13590
13802
|
onAddProvider && /* @__PURE__ */ jsx(
|
|
@@ -13700,38 +13912,6 @@ function ActionRow({
|
|
|
13700
13912
|
}
|
|
13701
13913
|
);
|
|
13702
13914
|
}
|
|
13703
|
-
function QrIcon3({ color }) {
|
|
13704
|
-
return /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
13705
|
-
/* @__PURE__ */ jsx("rect", { x: "3.5", y: "3.5", width: "7", height: "7", rx: "1", stroke: color, strokeWidth: "1.4" }),
|
|
13706
|
-
/* @__PURE__ */ jsx("rect", { x: "6", y: "6", width: "2", height: "2", fill: color }),
|
|
13707
|
-
/* @__PURE__ */ jsx("rect", { x: "13.5", y: "3.5", width: "7", height: "7", rx: "1", stroke: color, strokeWidth: "1.4" }),
|
|
13708
|
-
/* @__PURE__ */ jsx("rect", { x: "16", y: "6", width: "2", height: "2", fill: color }),
|
|
13709
|
-
/* @__PURE__ */ jsx("rect", { x: "3.5", y: "13.5", width: "7", height: "7", rx: "1", stroke: color, strokeWidth: "1.4" }),
|
|
13710
|
-
/* @__PURE__ */ jsx("rect", { x: "6", y: "16", width: "2", height: "2", fill: color }),
|
|
13711
|
-
/* @__PURE__ */ jsx("rect", { x: "13.5", y: "13.5", width: "2.5", height: "2.5", fill: color }),
|
|
13712
|
-
/* @__PURE__ */ jsx("rect", { x: "18", y: "13.5", width: "2.5", height: "2.5", fill: color }),
|
|
13713
|
-
/* @__PURE__ */ jsx("rect", { x: "13.5", y: "18", width: "2.5", height: "2.5", fill: color }),
|
|
13714
|
-
/* @__PURE__ */ jsx("rect", { x: "18", y: "18", width: "2.5", height: "2.5", fill: color })
|
|
13715
|
-
] });
|
|
13716
|
-
}
|
|
13717
|
-
function WalletIcon() {
|
|
13718
|
-
return /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
13719
|
-
/* @__PURE__ */ jsx(
|
|
13720
|
-
"path",
|
|
13721
|
-
{
|
|
13722
|
-
d: "M4 7.5A2.5 2.5 0 0 1 6.5 5h11A2.5 2.5 0 0 1 20 7.5v9A2.5 2.5 0 0 1 17.5 19h-11A2.5 2.5 0 0 1 4 16.5v-9Zm2.5-1a1 1 0 0 0-1 1V9h13v-1.5a1 1 0 0 0-1-1h-11ZM5.5 10.5v6a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1v-6h-13Z",
|
|
13723
|
-
fill: "currentColor"
|
|
13724
|
-
}
|
|
13725
|
-
),
|
|
13726
|
-
/* @__PURE__ */ jsx(
|
|
13727
|
-
"path",
|
|
13728
|
-
{
|
|
13729
|
-
d: "M14.5 13.75a.75.75 0 0 1 .75-.75h2a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1-.75-.75Z",
|
|
13730
|
-
fill: "currentColor"
|
|
13731
|
-
}
|
|
13732
|
-
)
|
|
13733
|
-
] });
|
|
13734
|
-
}
|
|
13735
13915
|
var actionRowStyle = (color, hovered) => ({
|
|
13736
13916
|
display: "flex",
|
|
13737
13917
|
alignItems: "center",
|
|
@@ -13971,7 +14151,13 @@ function DepositScreen({
|
|
|
13971
14151
|
100% { background-position: -200% 0; }
|
|
13972
14152
|
}
|
|
13973
14153
|
` }),
|
|
13974
|
-
/* @__PURE__ */ jsx(
|
|
14154
|
+
/* @__PURE__ */ jsx(
|
|
14155
|
+
ScreenHeader,
|
|
14156
|
+
{
|
|
14157
|
+
left: /* @__PURE__ */ jsx("img", { src: BLINK_WORDMARK, alt: "Blink", style: wordmarkImgStyle4 }),
|
|
14158
|
+
onLogout
|
|
14159
|
+
}
|
|
14160
|
+
),
|
|
13975
14161
|
/* @__PURE__ */ jsxs("div", { style: redesignHeroStackStyle(mobileEntryWithKeypad), children: [
|
|
13976
14162
|
showDesktopInputHero ? /* @__PURE__ */ jsxs("div", { style: entryDesktopHeroRowStyle(desktopInputHeroColor, getDesktopHeroFontSize(liveMobileHeroValue)), children: [
|
|
13977
14163
|
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", style: entryDollarStyle(isZero), children: "$" }),
|
|
@@ -14111,6 +14297,11 @@ function FaceIdIcon2() {
|
|
|
14111
14297
|
)
|
|
14112
14298
|
] });
|
|
14113
14299
|
}
|
|
14300
|
+
var wordmarkImgStyle4 = {
|
|
14301
|
+
height: 31,
|
|
14302
|
+
width: "auto",
|
|
14303
|
+
display: "block"
|
|
14304
|
+
};
|
|
14114
14305
|
var bannerSlotStyle2 = {
|
|
14115
14306
|
display: "flex",
|
|
14116
14307
|
justifyContent: "center",
|
|
@@ -15113,7 +15304,7 @@ function DepositAddressScreen({
|
|
|
15113
15304
|
const waitingForQr = !!depositAddress && !qrReady;
|
|
15114
15305
|
const awaitingSession = !!selectedOption && !session && !loading;
|
|
15115
15306
|
const showShimmer = loadingSources || showLoading || waitingForQr || awaitingSession;
|
|
15116
|
-
return /* @__PURE__ */ jsxs(ScreenLayout, { children: [
|
|
15307
|
+
return /* @__PURE__ */ jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsx(SupportFooter, {}), children: [
|
|
15117
15308
|
/* @__PURE__ */ jsx(
|
|
15118
15309
|
ScreenHeader,
|
|
15119
15310
|
{
|
|
@@ -15330,6 +15521,7 @@ function OpenWalletScreen({
|
|
|
15330
15521
|
onLogout
|
|
15331
15522
|
}) {
|
|
15332
15523
|
const { tokens } = useBlinkConfig();
|
|
15524
|
+
const [showQrView, setShowQrView] = useState(false);
|
|
15333
15525
|
const displayName = walletName ?? "your wallet";
|
|
15334
15526
|
const logoSrc = walletLogoUrl ?? (walletName ? KNOWN_LOGOS[walletName.toLowerCase()] : void 0);
|
|
15335
15527
|
const autoOpenedRef = useRef(null);
|
|
@@ -15347,61 +15539,6 @@ function OpenWalletScreen({
|
|
|
15347
15539
|
const handleOpen = useCallback(() => {
|
|
15348
15540
|
openDeeplink(deeplinkUri);
|
|
15349
15541
|
}, [deeplinkUri]);
|
|
15350
|
-
const logoBlock = /* @__PURE__ */ jsxs("div", { style: logoFrameStyle, children: [
|
|
15351
|
-
/* @__PURE__ */ jsx(
|
|
15352
|
-
"svg",
|
|
15353
|
-
{
|
|
15354
|
-
width: "96",
|
|
15355
|
-
height: "96",
|
|
15356
|
-
viewBox: "0 0 96 96",
|
|
15357
|
-
fill: "none",
|
|
15358
|
-
style: logoRingSvgStyle,
|
|
15359
|
-
"aria-hidden": true,
|
|
15360
|
-
children: /* @__PURE__ */ jsx(
|
|
15361
|
-
"circle",
|
|
15362
|
-
{
|
|
15363
|
-
cx: "48",
|
|
15364
|
-
cy: "48",
|
|
15365
|
-
r: "47",
|
|
15366
|
-
stroke: tokens.textMuted,
|
|
15367
|
-
strokeOpacity: "0.18",
|
|
15368
|
-
strokeWidth: "2",
|
|
15369
|
-
fill: "none"
|
|
15370
|
-
}
|
|
15371
|
-
)
|
|
15372
|
-
}
|
|
15373
|
-
),
|
|
15374
|
-
/* @__PURE__ */ jsx(
|
|
15375
|
-
"svg",
|
|
15376
|
-
{
|
|
15377
|
-
width: "96",
|
|
15378
|
-
height: "96",
|
|
15379
|
-
viewBox: "0 0 96 96",
|
|
15380
|
-
fill: "none",
|
|
15381
|
-
style: spinningRingSvgStyle,
|
|
15382
|
-
"aria-hidden": true,
|
|
15383
|
-
children: /* @__PURE__ */ jsx(
|
|
15384
|
-
"path",
|
|
15385
|
-
{
|
|
15386
|
-
d: "M 71.7 89.04 A 47 47 0 1 1 89.04 71.7",
|
|
15387
|
-
stroke: tokens.textMuted,
|
|
15388
|
-
strokeOpacity: "0.65",
|
|
15389
|
-
strokeWidth: "2",
|
|
15390
|
-
fill: "none",
|
|
15391
|
-
strokeLinecap: "round"
|
|
15392
|
-
}
|
|
15393
|
-
)
|
|
15394
|
-
}
|
|
15395
|
-
),
|
|
15396
|
-
/* @__PURE__ */ jsx("div", { style: logoCircleStyle2(tokens.bgRecessed), children: logoSrc && /* @__PURE__ */ jsx(
|
|
15397
|
-
"img",
|
|
15398
|
-
{
|
|
15399
|
-
src: logoSrc,
|
|
15400
|
-
alt: displayName,
|
|
15401
|
-
style: walletLogoUrl ? reownLogoStyle : logoStyle2
|
|
15402
|
-
}
|
|
15403
|
-
) })
|
|
15404
|
-
] });
|
|
15405
15542
|
const heroBlock = /* @__PURE__ */ jsxs("div", { style: heroFrameStyle, "aria-hidden": true, children: [
|
|
15406
15543
|
/* @__PURE__ */ jsx(
|
|
15407
15544
|
"svg",
|
|
@@ -15450,42 +15587,25 @@ function OpenWalletScreen({
|
|
|
15450
15587
|
] });
|
|
15451
15588
|
if (!useDeeplink) {
|
|
15452
15589
|
const hasQr = !!deeplinkUri;
|
|
15453
|
-
const
|
|
15454
|
-
|
|
15455
|
-
|
|
15456
|
-
|
|
15457
|
-
|
|
15458
|
-
|
|
15459
|
-
|
|
15460
|
-
|
|
15461
|
-
|
|
15462
|
-
|
|
15463
|
-
|
|
15464
|
-
|
|
15465
|
-
|
|
15466
|
-
}
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
|
|
15470
|
-
|
|
15471
|
-
|
|
15472
|
-
/* @__PURE__ */ jsxs("div", { style: desktopContentStyle, children: [
|
|
15473
|
-
/* @__PURE__ */ jsxs("div", { style: primaryClusterStyle, children: [
|
|
15474
|
-
logoBlock,
|
|
15475
|
-
/* @__PURE__ */ jsxs("h2", { style: headingStyle12(tokens.text), children: [
|
|
15476
|
-
"Setting up ",
|
|
15477
|
-
displayName,
|
|
15478
|
-
"\u2026"
|
|
15479
|
-
] }),
|
|
15480
|
-
/* @__PURE__ */ jsx("p", { style: bodyStyle4(tokens.text), children: "Approve the connection in your wallet extension." }),
|
|
15481
|
-
/* @__PURE__ */ jsxs("div", { style: inlineWaitStyle(tokens.textMuted), children: [
|
|
15482
|
-
/* @__PURE__ */ jsx(Spinner, { size: 14 }),
|
|
15483
|
-
/* @__PURE__ */ jsx("span", { children: "Waiting for authorization\u2026" })
|
|
15484
|
-
] })
|
|
15485
|
-
] }),
|
|
15486
|
-
/* @__PURE__ */ jsxs("div", { style: qrSectionStyle, children: [
|
|
15487
|
-
/* @__PURE__ */ jsx("span", { style: qrDividerLabelStyle(tokens.textMuted), children: "or scan with your phone" }),
|
|
15488
|
-
hasQr ? /* @__PURE__ */ jsx(QrCode, { value: deeplinkUri, size: 180 }) : /* @__PURE__ */ jsx(
|
|
15590
|
+
const sharedStyles = /* @__PURE__ */ jsx("style", { children: `
|
|
15591
|
+
@keyframes blink-open-wallet-qr-shimmer {
|
|
15592
|
+
0% { background-position: 200% 0; }
|
|
15593
|
+
100% { background-position: -200% 0; }
|
|
15594
|
+
}
|
|
15595
|
+
@keyframes blink-open-wallet-ring-spin {
|
|
15596
|
+
to { transform: rotate(360deg); }
|
|
15597
|
+
}
|
|
15598
|
+
` });
|
|
15599
|
+
if (showQrView) {
|
|
15600
|
+
return /* @__PURE__ */ jsxs(
|
|
15601
|
+
ScreenLayout,
|
|
15602
|
+
{
|
|
15603
|
+
footer: error ? /* @__PURE__ */ jsx(InfoBanner, { children: error }) : void 0,
|
|
15604
|
+
children: [
|
|
15605
|
+
sharedStyles,
|
|
15606
|
+
/* @__PURE__ */ jsx(ScreenHeader, { onBack: () => setShowQrView(false), onLogout }),
|
|
15607
|
+
/* @__PURE__ */ jsxs("div", { style: desktopContentStyle, children: [
|
|
15608
|
+
/* @__PURE__ */ jsx("div", { style: qrCardStyle, children: hasQr ? /* @__PURE__ */ jsx(QrCode, { value: deeplinkUri, size: 180 }) : /* @__PURE__ */ jsx(
|
|
15489
15609
|
"div",
|
|
15490
15610
|
{
|
|
15491
15611
|
role: "status",
|
|
@@ -15493,10 +15613,63 @@ function OpenWalletScreen({
|
|
|
15493
15613
|
"aria-busy": "true",
|
|
15494
15614
|
style: qrShimmerStyle2(tokens.bgHover, tokens.border)
|
|
15495
15615
|
}
|
|
15496
|
-
),
|
|
15497
|
-
/* @__PURE__ */
|
|
15616
|
+
) }),
|
|
15617
|
+
/* @__PURE__ */ jsxs("div", { style: primaryClusterStyle, children: [
|
|
15618
|
+
/* @__PURE__ */ jsx("h2", { style: headingStyle12(tokens.text), children: "Authorize Your Passkey" }),
|
|
15619
|
+
/* @__PURE__ */ jsxs("p", { style: bodyStyle4(tokens.text), children: [
|
|
15620
|
+
"Scan the QR code to open ",
|
|
15621
|
+
displayName,
|
|
15622
|
+
"."
|
|
15623
|
+
] })
|
|
15624
|
+
] })
|
|
15498
15625
|
] })
|
|
15499
|
-
]
|
|
15626
|
+
]
|
|
15627
|
+
}
|
|
15628
|
+
);
|
|
15629
|
+
}
|
|
15630
|
+
return /* @__PURE__ */ jsxs(
|
|
15631
|
+
ScreenLayout,
|
|
15632
|
+
{
|
|
15633
|
+
footer: /* @__PURE__ */ jsxs("div", { style: footerStackStyle5, children: [
|
|
15634
|
+
error && /* @__PURE__ */ jsx(InfoBanner, { children: error }),
|
|
15635
|
+
/* @__PURE__ */ jsxs(
|
|
15636
|
+
SecondaryButton,
|
|
15637
|
+
{
|
|
15638
|
+
onClick: onRetryAuthorization,
|
|
15639
|
+
disabled: !onRetryAuthorization,
|
|
15640
|
+
children: [
|
|
15641
|
+
/* @__PURE__ */ jsx(WalletIcon, {}),
|
|
15642
|
+
"Open ",
|
|
15643
|
+
displayName,
|
|
15644
|
+
" Extension"
|
|
15645
|
+
]
|
|
15646
|
+
}
|
|
15647
|
+
),
|
|
15648
|
+
/* @__PURE__ */ jsxs("div", { style: orDividerStyle, children: [
|
|
15649
|
+
/* @__PURE__ */ jsx("span", { style: orDividerRuleStyle(tokens.textTertiary) }),
|
|
15650
|
+
/* @__PURE__ */ jsx("span", { style: orDividerLabelStyle(tokens.textMuted), children: "OR" }),
|
|
15651
|
+
/* @__PURE__ */ jsx("span", { style: orDividerRuleStyle(tokens.textTertiary) })
|
|
15652
|
+
] }),
|
|
15653
|
+
/* @__PURE__ */ jsxs(
|
|
15654
|
+
SecondaryButton,
|
|
15655
|
+
{
|
|
15656
|
+
onClick: () => setShowQrView(true),
|
|
15657
|
+
disabled: !hasQr,
|
|
15658
|
+
children: [
|
|
15659
|
+
/* @__PURE__ */ jsx(QrIcon, {}),
|
|
15660
|
+
"Continue on your phone"
|
|
15661
|
+
]
|
|
15662
|
+
}
|
|
15663
|
+
)
|
|
15664
|
+
] }),
|
|
15665
|
+
children: [
|
|
15666
|
+
sharedStyles,
|
|
15667
|
+
/* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
|
|
15668
|
+
/* @__PURE__ */ jsx("div", { style: desktopContentStyle, children: /* @__PURE__ */ jsxs("div", { style: primaryClusterStyle, children: [
|
|
15669
|
+
heroBlock,
|
|
15670
|
+
/* @__PURE__ */ jsx("h2", { style: headingStyle12(tokens.text), children: "Authorize Your Passkey" }),
|
|
15671
|
+
/* @__PURE__ */ jsx("p", { style: bodyStyle4(tokens.text), children: "If your wallet didn\u2019t open automatically, tap below." })
|
|
15672
|
+
] }) })
|
|
15500
15673
|
]
|
|
15501
15674
|
}
|
|
15502
15675
|
);
|
|
@@ -15593,50 +15766,33 @@ var footerStackStyle5 = {
|
|
|
15593
15766
|
flexDirection: "column",
|
|
15594
15767
|
gap: 8
|
|
15595
15768
|
};
|
|
15596
|
-
var
|
|
15597
|
-
position: "relative",
|
|
15598
|
-
width: 96,
|
|
15599
|
-
height: 96,
|
|
15769
|
+
var qrCardStyle = {
|
|
15600
15770
|
display: "flex",
|
|
15601
15771
|
alignItems: "center",
|
|
15602
15772
|
justifyContent: "center",
|
|
15773
|
+
background: "#FFFFFF",
|
|
15774
|
+
padding: 16,
|
|
15775
|
+
borderRadius: 16,
|
|
15603
15776
|
flexShrink: 0
|
|
15604
15777
|
};
|
|
15605
|
-
var
|
|
15606
|
-
position: "absolute",
|
|
15607
|
-
top: "50%",
|
|
15608
|
-
left: "50%",
|
|
15609
|
-
transform: "translate(-50%, -50%)"
|
|
15610
|
-
};
|
|
15611
|
-
var spinningRingSvgStyle = {
|
|
15612
|
-
position: "absolute",
|
|
15613
|
-
top: 0,
|
|
15614
|
-
left: 0,
|
|
15615
|
-
transformOrigin: "center",
|
|
15616
|
-
animation: "blink-open-wallet-ring-spin 0.9s linear infinite"
|
|
15617
|
-
};
|
|
15618
|
-
var logoCircleStyle2 = (bg) => ({
|
|
15619
|
-
width: 80,
|
|
15620
|
-
height: 80,
|
|
15621
|
-
borderRadius: "50%",
|
|
15622
|
-
background: bg,
|
|
15778
|
+
var orDividerStyle = {
|
|
15623
15779
|
display: "flex",
|
|
15624
15780
|
alignItems: "center",
|
|
15625
15781
|
justifyContent: "center",
|
|
15626
|
-
|
|
15627
|
-
|
|
15628
|
-
|
|
15629
|
-
width: 48,
|
|
15630
|
-
height: 48,
|
|
15631
|
-
borderRadius: 12,
|
|
15632
|
-
objectFit: "contain"
|
|
15633
|
-
};
|
|
15634
|
-
var reownLogoStyle = {
|
|
15635
|
-
width: 48,
|
|
15636
|
-
height: 48,
|
|
15637
|
-
borderRadius: "50%",
|
|
15638
|
-
objectFit: "cover"
|
|
15782
|
+
gap: 10,
|
|
15783
|
+
paddingLeft: 16,
|
|
15784
|
+
paddingRight: 16
|
|
15639
15785
|
};
|
|
15786
|
+
var orDividerRuleStyle = (color) => ({
|
|
15787
|
+
flex: 1,
|
|
15788
|
+
height: 1,
|
|
15789
|
+
background: color
|
|
15790
|
+
});
|
|
15791
|
+
var orDividerLabelStyle = (color) => ({
|
|
15792
|
+
fontSize: "0.75rem",
|
|
15793
|
+
fontWeight: 500,
|
|
15794
|
+
color
|
|
15795
|
+
});
|
|
15640
15796
|
var headingStyle12 = (color) => ({
|
|
15641
15797
|
fontSize: "1.5rem",
|
|
15642
15798
|
fontWeight: 700,
|
|
@@ -15653,21 +15809,6 @@ var bodyStyle4 = (color) => ({
|
|
|
15653
15809
|
margin: 0,
|
|
15654
15810
|
maxWidth: 320
|
|
15655
15811
|
});
|
|
15656
|
-
var inlineWaitStyle = (color) => ({
|
|
15657
|
-
display: "inline-flex",
|
|
15658
|
-
alignItems: "center",
|
|
15659
|
-
gap: 8,
|
|
15660
|
-
color,
|
|
15661
|
-
fontSize: "0.85rem"
|
|
15662
|
-
});
|
|
15663
|
-
var qrSectionStyle = {
|
|
15664
|
-
display: "flex",
|
|
15665
|
-
flexDirection: "column",
|
|
15666
|
-
alignItems: "center",
|
|
15667
|
-
gap: 12,
|
|
15668
|
-
width: "100%",
|
|
15669
|
-
maxWidth: 320
|
|
15670
|
-
};
|
|
15671
15812
|
var qrShimmerStyle2 = (baseColor, highlightColor) => ({
|
|
15672
15813
|
width: 180,
|
|
15673
15814
|
height: 180,
|
|
@@ -15676,21 +15817,6 @@ var qrShimmerStyle2 = (baseColor, highlightColor) => ({
|
|
|
15676
15817
|
backgroundSize: "200% 100%",
|
|
15677
15818
|
animation: "blink-open-wallet-qr-shimmer 1.4s ease-in-out infinite"
|
|
15678
15819
|
});
|
|
15679
|
-
var qrDividerLabelStyle = (color) => ({
|
|
15680
|
-
fontSize: "0.75rem",
|
|
15681
|
-
fontWeight: 600,
|
|
15682
|
-
letterSpacing: "0.06em",
|
|
15683
|
-
textTransform: "uppercase",
|
|
15684
|
-
color
|
|
15685
|
-
});
|
|
15686
|
-
var qrCaptionStyle = (color) => ({
|
|
15687
|
-
fontSize: "0.85rem",
|
|
15688
|
-
color,
|
|
15689
|
-
margin: 0,
|
|
15690
|
-
textAlign: "center",
|
|
15691
|
-
maxWidth: 320,
|
|
15692
|
-
lineHeight: 1.4
|
|
15693
|
-
});
|
|
15694
15820
|
var mobileContentStyle = {
|
|
15695
15821
|
flex: 1,
|
|
15696
15822
|
display: "flex",
|
|
@@ -15812,7 +15938,7 @@ function ApprovingInWalletScreen({
|
|
|
15812
15938
|
{
|
|
15813
15939
|
onBack,
|
|
15814
15940
|
onLogout,
|
|
15815
|
-
center: /* @__PURE__ */ jsx("img", { src: BLINK_WORDMARK, alt: "Blink", style:
|
|
15941
|
+
center: /* @__PURE__ */ jsx("img", { src: BLINK_WORDMARK, alt: "Blink", style: wordmarkImgStyle5 })
|
|
15816
15942
|
}
|
|
15817
15943
|
),
|
|
15818
15944
|
/* @__PURE__ */ jsxs("div", { style: contentStyle16, children: [
|
|
@@ -15916,7 +16042,7 @@ function LockIcon4() {
|
|
|
15916
16042
|
}
|
|
15917
16043
|
) });
|
|
15918
16044
|
}
|
|
15919
|
-
var
|
|
16045
|
+
var wordmarkImgStyle5 = {
|
|
15920
16046
|
height: 22,
|
|
15921
16047
|
width: "auto",
|
|
15922
16048
|
display: "block",
|
|
@@ -16049,7 +16175,7 @@ function ConfirmSignScreen({
|
|
|
16049
16175
|
children: [
|
|
16050
16176
|
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
16051
16177
|
/* @__PURE__ */ jsxs("div", { style: contentStyle17, children: [
|
|
16052
|
-
logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style:
|
|
16178
|
+
logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsx(Spinner, { size: 48 }),
|
|
16053
16179
|
/* @__PURE__ */ jsx("h2", { style: headingStyle14(tokens.text), children: heading }),
|
|
16054
16180
|
/* @__PURE__ */ jsx("p", { style: subtitleStyle12(tokens.textSecondary), children: subtitle }),
|
|
16055
16181
|
/* @__PURE__ */ jsxs("div", { style: successBadgeStyle(tokens), children: [
|
|
@@ -16070,7 +16196,7 @@ var contentStyle17 = {
|
|
|
16070
16196
|
textAlign: "center",
|
|
16071
16197
|
padding: "0 24px"
|
|
16072
16198
|
};
|
|
16073
|
-
var
|
|
16199
|
+
var logoStyle2 = {
|
|
16074
16200
|
width: 56,
|
|
16075
16201
|
height: 56,
|
|
16076
16202
|
borderRadius: 14,
|