@swype-org/react-sdk 0.1.293 → 0.1.300

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.js CHANGED
@@ -5,9 +5,9 @@ import { mainnet, arbitrum, base, polygon, bsc } from 'wagmi/chains';
5
5
  import { injected } from 'wagmi/connectors';
6
6
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
- import { recoverTypedDataAddress, decodeAbiParameters, walletActions, hexToString, createClient, custom } from 'viem';
9
- import { parseErc6492Signature, parseAccount, getAddress } from 'viem/utils';
10
- import { waitForTransactionReceipt as waitForTransactionReceipt$1, getTransaction, call } from 'viem/actions';
8
+ import { getAccount, getWalletClient, waitForTransactionReceipt } from '@wagmi/core';
9
+ import { recoverTypedDataAddress, decodeAbiParameters } from 'viem';
10
+ import { parseErc6492Signature } from 'viem/utils';
11
11
 
12
12
  var __defProp = Object.defineProperty;
13
13
  var __export = (target, all) => {
@@ -913,304 +913,6 @@ function useTransferPolling(intervalMs = 3e3) {
913
913
  useEffect(() => () => stopPolling(), [stopPolling]);
914
914
  return { transfer, error, isPolling, startPolling, stopPolling };
915
915
  }
916
-
917
- // node_modules/@wagmi/core/dist/esm/utils/getAction.js
918
- function getAction(client, actionFn, name) {
919
- const action_implicit = client[actionFn.name];
920
- if (typeof action_implicit === "function")
921
- return action_implicit;
922
- const action_explicit = client[name];
923
- if (typeof action_explicit === "function")
924
- return action_explicit;
925
- return (params) => actionFn(client, params);
926
- }
927
-
928
- // node_modules/@wagmi/core/dist/esm/version.js
929
- var version = "2.22.1";
930
-
931
- // node_modules/@wagmi/core/dist/esm/utils/getVersion.js
932
- var getVersion = () => `@wagmi/core@${version}`;
933
-
934
- // node_modules/@wagmi/core/dist/esm/errors/base.js
935
- var __classPrivateFieldGet = function(receiver, state, kind, f) {
936
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
937
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
938
- };
939
- var _BaseError_instances;
940
- var _BaseError_walk;
941
- var BaseError = class _BaseError extends Error {
942
- get docsBaseUrl() {
943
- return "https://wagmi.sh/core";
944
- }
945
- get version() {
946
- return getVersion();
947
- }
948
- constructor(shortMessage, options = {}) {
949
- super();
950
- _BaseError_instances.add(this);
951
- Object.defineProperty(this, "details", {
952
- enumerable: true,
953
- configurable: true,
954
- writable: true,
955
- value: void 0
956
- });
957
- Object.defineProperty(this, "docsPath", {
958
- enumerable: true,
959
- configurable: true,
960
- writable: true,
961
- value: void 0
962
- });
963
- Object.defineProperty(this, "metaMessages", {
964
- enumerable: true,
965
- configurable: true,
966
- writable: true,
967
- value: void 0
968
- });
969
- Object.defineProperty(this, "shortMessage", {
970
- enumerable: true,
971
- configurable: true,
972
- writable: true,
973
- value: void 0
974
- });
975
- Object.defineProperty(this, "name", {
976
- enumerable: true,
977
- configurable: true,
978
- writable: true,
979
- value: "WagmiCoreError"
980
- });
981
- const details = options.cause instanceof _BaseError ? options.cause.details : options.cause?.message ? options.cause.message : options.details;
982
- const docsPath = options.cause instanceof _BaseError ? options.cause.docsPath || options.docsPath : options.docsPath;
983
- this.message = [
984
- shortMessage || "An error occurred.",
985
- "",
986
- ...options.metaMessages ? [...options.metaMessages, ""] : [],
987
- ...docsPath ? [
988
- `Docs: ${this.docsBaseUrl}${docsPath}.html${options.docsSlug ? `#${options.docsSlug}` : ""}`
989
- ] : [],
990
- ...details ? [`Details: ${details}`] : [],
991
- `Version: ${this.version}`
992
- ].join("\n");
993
- if (options.cause)
994
- this.cause = options.cause;
995
- this.details = details;
996
- this.docsPath = docsPath;
997
- this.metaMessages = options.metaMessages;
998
- this.shortMessage = shortMessage;
999
- }
1000
- walk(fn) {
1001
- return __classPrivateFieldGet(this, _BaseError_instances, "m", _BaseError_walk).call(this, this, fn);
1002
- }
1003
- };
1004
- _BaseError_instances = /* @__PURE__ */ new WeakSet(), _BaseError_walk = function _BaseError_walk2(err, fn) {
1005
- if (fn?.(err))
1006
- return err;
1007
- if (err.cause)
1008
- return __classPrivateFieldGet(this, _BaseError_instances, "m", _BaseError_walk2).call(this, err.cause, fn);
1009
- return err;
1010
- };
1011
-
1012
- // node_modules/@wagmi/core/dist/esm/errors/config.js
1013
- var ConnectorNotConnectedError = class extends BaseError {
1014
- constructor() {
1015
- super("Connector not connected.");
1016
- Object.defineProperty(this, "name", {
1017
- enumerable: true,
1018
- configurable: true,
1019
- writable: true,
1020
- value: "ConnectorNotConnectedError"
1021
- });
1022
- }
1023
- };
1024
- var ConnectorAccountNotFoundError = class extends BaseError {
1025
- constructor({ address, connector }) {
1026
- super(`Account "${address}" not found for connector "${connector.name}".`);
1027
- Object.defineProperty(this, "name", {
1028
- enumerable: true,
1029
- configurable: true,
1030
- writable: true,
1031
- value: "ConnectorAccountNotFoundError"
1032
- });
1033
- }
1034
- };
1035
- var ConnectorChainMismatchError = class extends BaseError {
1036
- constructor({ connectionChainId, connectorChainId }) {
1037
- super(`The current chain of the connector (id: ${connectorChainId}) does not match the connection's chain (id: ${connectionChainId}).`, {
1038
- metaMessages: [
1039
- `Current Chain ID: ${connectorChainId}`,
1040
- `Expected Chain ID: ${connectionChainId}`
1041
- ]
1042
- });
1043
- Object.defineProperty(this, "name", {
1044
- enumerable: true,
1045
- configurable: true,
1046
- writable: true,
1047
- value: "ConnectorChainMismatchError"
1048
- });
1049
- }
1050
- };
1051
- var ConnectorUnavailableReconnectingError = class extends BaseError {
1052
- constructor({ connector }) {
1053
- super(`Connector "${connector.name}" unavailable while reconnecting.`, {
1054
- details: [
1055
- "During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.",
1056
- "All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.",
1057
- "This error commonly occurs for connectors that asynchronously inject after reconnection has already started."
1058
- ].join(" ")
1059
- });
1060
- Object.defineProperty(this, "name", {
1061
- enumerable: true,
1062
- configurable: true,
1063
- writable: true,
1064
- value: "ConnectorUnavailableReconnectingError"
1065
- });
1066
- }
1067
- };
1068
- async function getConnectorClient(config, parameters = {}) {
1069
- const { assertChainId = true } = parameters;
1070
- let connection;
1071
- if (parameters.connector) {
1072
- const { connector: connector2 } = parameters;
1073
- if (config.state.status === "reconnecting" && !connector2.getAccounts && !connector2.getChainId)
1074
- throw new ConnectorUnavailableReconnectingError({ connector: connector2 });
1075
- const [accounts, chainId2] = await Promise.all([
1076
- connector2.getAccounts().catch((e) => {
1077
- if (parameters.account === null)
1078
- return [];
1079
- throw e;
1080
- }),
1081
- connector2.getChainId()
1082
- ]);
1083
- connection = {
1084
- accounts,
1085
- chainId: chainId2,
1086
- connector: connector2
1087
- };
1088
- } else
1089
- connection = config.state.connections.get(config.state.current);
1090
- if (!connection)
1091
- throw new ConnectorNotConnectedError();
1092
- const chainId = parameters.chainId ?? connection.chainId;
1093
- const connectorChainId = await connection.connector.getChainId();
1094
- if (assertChainId && connectorChainId !== chainId)
1095
- throw new ConnectorChainMismatchError({
1096
- connectionChainId: chainId,
1097
- connectorChainId
1098
- });
1099
- const connector = connection.connector;
1100
- if (connector.getClient)
1101
- return connector.getClient({ chainId });
1102
- const account = parseAccount(parameters.account ?? connection.accounts[0]);
1103
- if (account)
1104
- account.address = getAddress(account.address);
1105
- if (parameters.account && !connection.accounts.some((x) => x.toLowerCase() === account.address.toLowerCase()))
1106
- throw new ConnectorAccountNotFoundError({
1107
- address: account.address,
1108
- connector
1109
- });
1110
- const chain = config.chains.find((chain2) => chain2.id === chainId);
1111
- const provider = await connection.connector.getProvider({ chainId });
1112
- return createClient({
1113
- account,
1114
- chain,
1115
- name: "Connector Client",
1116
- transport: (opts) => custom(provider)({ ...opts, retryCount: 0 })
1117
- });
1118
- }
1119
-
1120
- // node_modules/@wagmi/core/dist/esm/actions/getAccount.js
1121
- function getAccount(config) {
1122
- const uid = config.state.current;
1123
- const connection = config.state.connections.get(uid);
1124
- const addresses = connection?.accounts;
1125
- const address = addresses?.[0];
1126
- const chain = config.chains.find((chain2) => chain2.id === connection?.chainId);
1127
- const status = config.state.status;
1128
- switch (status) {
1129
- case "connected":
1130
- return {
1131
- address,
1132
- addresses,
1133
- chain,
1134
- chainId: connection?.chainId,
1135
- connector: connection?.connector,
1136
- isConnected: true,
1137
- isConnecting: false,
1138
- isDisconnected: false,
1139
- isReconnecting: false,
1140
- status
1141
- };
1142
- case "reconnecting":
1143
- return {
1144
- address,
1145
- addresses,
1146
- chain,
1147
- chainId: connection?.chainId,
1148
- connector: connection?.connector,
1149
- isConnected: !!address,
1150
- isConnecting: false,
1151
- isDisconnected: false,
1152
- isReconnecting: true,
1153
- status
1154
- };
1155
- case "connecting":
1156
- return {
1157
- address,
1158
- addresses,
1159
- chain,
1160
- chainId: connection?.chainId,
1161
- connector: connection?.connector,
1162
- isConnected: false,
1163
- isConnecting: true,
1164
- isDisconnected: false,
1165
- isReconnecting: false,
1166
- status
1167
- };
1168
- case "disconnected":
1169
- return {
1170
- address: void 0,
1171
- addresses: void 0,
1172
- chain: void 0,
1173
- chainId: void 0,
1174
- connector: void 0,
1175
- isConnected: false,
1176
- isConnecting: false,
1177
- isDisconnected: true,
1178
- isReconnecting: false,
1179
- status
1180
- };
1181
- }
1182
- }
1183
- async function getWalletClient(config, parameters = {}) {
1184
- const client = await getConnectorClient(config, parameters);
1185
- return client.extend(walletActions);
1186
- }
1187
- async function waitForTransactionReceipt(config, parameters) {
1188
- const { chainId, timeout = 0, ...rest } = parameters;
1189
- const client = config.getClient({ chainId });
1190
- const action = getAction(client, waitForTransactionReceipt$1, "waitForTransactionReceipt");
1191
- const receipt = await action({ ...rest, timeout });
1192
- if (receipt.status === "reverted") {
1193
- const action_getTransaction = getAction(client, getTransaction, "getTransaction");
1194
- const { from: account, ...txn } = await action_getTransaction({
1195
- hash: receipt.transactionHash
1196
- });
1197
- const action_call = getAction(client, call, "call");
1198
- const code = await action_call({
1199
- ...txn,
1200
- account,
1201
- data: txn.input,
1202
- gasPrice: txn.type !== "eip1559" ? txn.gasPrice : void 0,
1203
- maxFeePerGas: txn.type === "eip1559" ? txn.maxFeePerGas : void 0,
1204
- maxPriorityFeePerGas: txn.type === "eip1559" ? txn.maxPriorityFeePerGas : void 0
1205
- });
1206
- const reason = code?.data ? hexToString(`0x${code.data.substring(138)}`) : "unknown reason";
1207
- throw new Error(reason);
1208
- }
1209
- return {
1210
- ...receipt,
1211
- chainId: client.chain.id
1212
- };
1213
- }
1214
916
  var ERC_6492_MAGIC_SUFFIX = "6492649264926492649264926492649264926492649264926492649264926492";
1215
917
  function normalizeSignature(sig) {
1216
918
  const hex = sig.startsWith("0x") ? sig.slice(2) : sig;
@@ -2083,8 +1785,8 @@ function resolvePhase(state) {
2083
1785
  const needsPasskeyBootstrap = state.privyAuthenticated && !state.activeCredentialId;
2084
1786
  const guestPreauthPinsCurrentPhase = transferCompleted && state.guestPreauthorizing && !state.verificationTarget && isGuestPreauthCompletedTransferPinPhase(currentPhase);
2085
1787
  const guestPostPayLogin = transferCompleted && state.isGuestFlow && state.guestPreauthSessionId != null && !state.guestPreauthorizing && !state.verificationTarget && !state.privyAuthenticated;
2086
- const isFundingSourceSubflow = !state.loginRequested && (currentPhase.step === "token-picker" || currentPhase.step === "one-tap-setup" || currentPhase.step === "select-source" || currentPhase.step === "confirm-sign" || currentPhase.step === "guest-token-picker");
2087
1788
  const guestTokenPickerEligible = state.isGuestFlow && state.selectedProviderId != null && !state.transfer && !state.guestPreauthAccountId;
1789
+ const isFundingSourceSubflow = !state.loginRequested && (currentPhase.step === "token-picker" || currentPhase.step === "one-tap-setup" || currentPhase.step === "select-source" || currentPhase.step === "confirm-sign" || currentPhase.step === "guest-token-picker" && guestTokenPickerEligible);
2088
1790
  const walletPickerSwitchEligible = currentPhase.step === "wallet-picker" && currentPhase.reason === "switch" && !state.creatingTransfer && !(state.mobileFlow && state.deeplinkUri);
2089
1791
  const missingActivePasskeyCredential = state.passkeyConfigLoaded && !state.activeCredentialId;
2090
1792
  const shouldPromptPasskeyVerification = missingActivePasskeyCredential && state.knownCredentialIds.length > 0 && state.passkeyPopupNeeded;
@@ -4379,6 +4081,9 @@ var loginButtonStyle = (accentColor) => ({
4379
4081
  var DEFAULT_MAX = 1e7;
4380
4082
  var ABSOLUTE_MIN = 0.01;
4381
4083
  var PRESETS = [100, 250, 1e3];
4084
+ function tokenOptionKey(opt) {
4085
+ return `${opt.chainName}-${opt.symbol}`;
4086
+ }
4382
4087
  function SetupScreen({
4383
4088
  availableBalance,
4384
4089
  onSetupOneTap,
@@ -4387,16 +4092,43 @@ function SetupScreen({
4387
4092
  onAdvanced,
4388
4093
  loading,
4389
4094
  error,
4390
- selectedTokenSymbol
4095
+ selectedTokenSymbol,
4096
+ tokenOptions,
4097
+ onSelectToken
4391
4098
  }) {
4392
4099
  const { tokens } = useBlinkConfig();
4393
4100
  const effectiveMax = DEFAULT_MAX;
4394
4101
  const effectiveMin = Math.min(ABSOLUTE_MIN, effectiveMax);
4395
4102
  const [limit, setLimit] = useState(() => Math.min(availableBalance, effectiveMax));
4396
4103
  const [activePreset, setActivePreset] = useState(null);
4104
+ const [showAdvanced, setShowAdvanced] = useState(false);
4397
4105
  const [editing, setEditing] = useState(false);
4398
4106
  const [inputValue, setInputValue] = useState("");
4399
4107
  const inputRef = useRef(null);
4108
+ const hasDropdown = tokenOptions != null && tokenOptions.length > 0 && onSelectToken != null;
4109
+ const [tokenDropdownOpen, setTokenDropdownOpen] = useState(false);
4110
+ const pickerRef = useRef(null);
4111
+ useEffect(() => {
4112
+ if (!tokenDropdownOpen) return;
4113
+ const handleMouseDown = (e) => {
4114
+ if (pickerRef.current && !pickerRef.current.contains(e.target)) {
4115
+ setTokenDropdownOpen(false);
4116
+ }
4117
+ };
4118
+ document.addEventListener("mousedown", handleMouseDown);
4119
+ return () => document.removeEventListener("mousedown", handleMouseDown);
4120
+ }, [tokenDropdownOpen]);
4121
+ const handleTokenRowClick = useCallback(() => {
4122
+ if (hasDropdown) {
4123
+ setTokenDropdownOpen((v) => !v);
4124
+ } else {
4125
+ onAdvanced?.();
4126
+ }
4127
+ }, [hasDropdown, onAdvanced]);
4128
+ const handlePickToken = useCallback((opt) => {
4129
+ onSelectToken?.(opt.symbol, opt.chainName, opt.walletId);
4130
+ setTokenDropdownOpen(false);
4131
+ }, [onSelectToken]);
4400
4132
  const startEditing = useCallback(() => {
4401
4133
  setInputValue(limit.toFixed(2));
4402
4134
  setEditing(true);
@@ -4419,6 +4151,7 @@ function SetupScreen({
4419
4151
  setLimit(Math.min(availableBalance, effectiveMax));
4420
4152
  setActivePreset("max");
4421
4153
  };
4154
+ const selectedOption = tokenOptions?.find((o) => o.symbol === selectedTokenSymbol);
4422
4155
  return /* @__PURE__ */ jsxs(
4423
4156
  ScreenLayout,
4424
4157
  {
@@ -4429,17 +4162,90 @@ function SetupScreen({
4429
4162
  onClick: () => onSetupOneTap(limit),
4430
4163
  disabled: loading,
4431
4164
  loading,
4432
- children: "Approve"
4165
+ children: "Continue"
4433
4166
  }
4434
4167
  ),
4435
4168
  /* @__PURE__ */ jsx(PoweredByFooter, {})
4436
4169
  ] }),
4437
4170
  children: [
4438
4171
  /* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
4439
- /* @__PURE__ */ jsx("h2", { style: headingStyle6(tokens.text), children: "Set Spending Limit" }),
4172
+ /* @__PURE__ */ jsx("img", { src: BLINK_LOGO, alt: "Blink", width: 56, height: 56, style: mascotStyle2 }),
4173
+ /* @__PURE__ */ jsx("p", { style: descriptionStyle(tokens.text), children: "Set a limit for one-tap deposits. You'll still confirm each one with your passkey." }),
4440
4174
  error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle4(tokens), children: error }),
4441
- /* @__PURE__ */ jsxs("div", { style: amountRowStyle, children: [
4442
- /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: editing ? /* @__PURE__ */ jsxs("div", { style: limitValueStyle(tokens.text), children: [
4175
+ /* @__PURE__ */ jsxs("div", { ref: pickerRef, children: [
4176
+ /* @__PURE__ */ jsxs(
4177
+ "button",
4178
+ {
4179
+ type: "button",
4180
+ onClick: handleTokenRowClick,
4181
+ style: tokenRowTriggerStyle(tokens, hasDropdown || !!onAdvanced),
4182
+ "aria-expanded": hasDropdown ? tokenDropdownOpen : void 0,
4183
+ "aria-haspopup": hasDropdown ? "listbox" : void 0,
4184
+ children: [
4185
+ /* @__PURE__ */ jsx("span", { style: tokenRowLabelStyle(tokens.text), children: "Token for one tap" }),
4186
+ /* @__PURE__ */ jsxs("div", { style: tokenRowRightStyle, children: [
4187
+ selectedOption && /* @__PURE__ */ jsxs("span", { style: tokenRowSymbolStyle(tokens.textSecondary), children: [
4188
+ selectedOption.symbol,
4189
+ " \xB7 ",
4190
+ selectedOption.chainName
4191
+ ] }),
4192
+ /* @__PURE__ */ jsx("div", { style: tokenIconWrapStyle, children: selectedTokenSymbol && TOKEN_LOGOS[selectedTokenSymbol] ? /* @__PURE__ */ jsx("img", { src: TOKEN_LOGOS[selectedTokenSymbol], alt: selectedTokenSymbol, width: 36, height: 36, style: { borderRadius: "50%" } }) : /* @__PURE__ */ jsxs("svg", { width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", children: [
4193
+ /* @__PURE__ */ jsx("circle", { cx: "18", cy: "18", r: "18", fill: "#2DB84B" }),
4194
+ /* @__PURE__ */ jsx("text", { x: "18", y: "23", textAnchor: "middle", fontSize: "18", fill: "#fff", fontWeight: "700", children: "$" })
4195
+ ] }) }),
4196
+ /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", style: { opacity: 0.5 }, children: tokenDropdownOpen ? /* @__PURE__ */ jsx("path", { d: "M18 15l-6-6-6 6", stroke: tokens.textMuted, strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) : /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6", stroke: tokens.textMuted, strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
4197
+ ] })
4198
+ ]
4199
+ }
4200
+ ),
4201
+ tokenDropdownOpen && tokenOptions && tokenOptions.length > 0 && /* @__PURE__ */ jsxs("div", { style: dropdownOuterStyle(tokens), children: [
4202
+ /* @__PURE__ */ jsx("div", { style: dropdownLabelStyle(tokens.textMuted), children: "Choose token" }),
4203
+ /* @__PURE__ */ jsx("div", { style: dropdownInnerStyle(tokens), children: tokenOptions.map((opt, index) => {
4204
+ const selected = opt.symbol === selectedTokenSymbol;
4205
+ const isLast = index === tokenOptions.length - 1;
4206
+ return /* @__PURE__ */ jsxs(
4207
+ "button",
4208
+ {
4209
+ type: "button",
4210
+ onClick: () => handlePickToken(opt),
4211
+ style: dropdownRowStyle(tokens, selected, isLast),
4212
+ children: [
4213
+ /* @__PURE__ */ jsxs("div", { style: dropdownRowLeftStyle, children: [
4214
+ /* @__PURE__ */ jsx("div", { style: dropdownTokenIconStyle(tokens, !!TOKEN_LOGOS[opt.symbol]), children: TOKEN_LOGOS[opt.symbol] ? /* @__PURE__ */ jsx("img", { src: TOKEN_LOGOS[opt.symbol], alt: opt.symbol, style: dropdownTokenLogoStyle }) : /* @__PURE__ */ jsx("span", { style: dropdownTokenFallbackStyle(tokens.textMuted), children: "$" }) }),
4215
+ /* @__PURE__ */ jsxs("div", { style: dropdownTokenInfoStyle, children: [
4216
+ /* @__PURE__ */ jsxs("div", { style: dropdownTokenNameRowStyle, children: [
4217
+ /* @__PURE__ */ jsx("span", { style: dropdownTokenSymbolStyle(tokens.text), children: opt.symbol }),
4218
+ /* @__PURE__ */ jsx("span", { style: dropdownTokenDotStyle(tokens.textMuted), children: "\xB7" }),
4219
+ /* @__PURE__ */ jsx("span", { style: dropdownTokenChainStyle(tokens.textMuted), children: opt.chainName })
4220
+ ] }),
4221
+ opt.balance != null && /* @__PURE__ */ jsxs("span", { style: dropdownTokenBalanceStyle(tokens.textMuted), children: [
4222
+ "$",
4223
+ opt.balance.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
4224
+ ] })
4225
+ ] })
4226
+ ] }),
4227
+ selected ? /* @__PURE__ */ jsxs("svg", { width: "22", height: "22", viewBox: "0 0 22 22", fill: "none", children: [
4228
+ /* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "11", fill: tokens.success }),
4229
+ /* @__PURE__ */ jsx("path", { d: "M7 11l3 3 5-5", stroke: "#fff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
4230
+ ] }) : /* @__PURE__ */ jsx("div", { style: dropdownRadioEmptyStyle(tokens.border) })
4231
+ ]
4232
+ },
4233
+ tokenOptionKey(opt)
4234
+ );
4235
+ }) })
4236
+ ] })
4237
+ ] }),
4238
+ /* @__PURE__ */ jsx(
4239
+ "button",
4240
+ {
4241
+ type: "button",
4242
+ onClick: () => setShowAdvanced((v) => !v),
4243
+ style: advancedToggleStyle(tokens.accent),
4244
+ children: "Advanced"
4245
+ }
4246
+ ),
4247
+ showAdvanced && /* @__PURE__ */ jsxs(Fragment, { children: [
4248
+ /* @__PURE__ */ jsx("div", { style: amountSectionStyle, children: editing ? /* @__PURE__ */ jsxs("div", { style: limitValueStyle(tokens.text), children: [
4443
4249
  "$",
4444
4250
  /* @__PURE__ */ jsx(
4445
4251
  "input",
@@ -4464,62 +4270,93 @@ function SetupScreen({
4464
4270
  onClick: startEditing,
4465
4271
  children: [
4466
4272
  "$",
4467
- limit.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
4273
+ limit.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 }),
4274
+ /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", style: { marginLeft: 8, opacity: 0.45 }, children: /* @__PURE__ */ jsx("path", { d: "M16.47 3.53a2.74 2.74 0 0 1 3.88 0l.12.12a2.74 2.74 0 0 1 0 3.88L8.84 19.16a2 2 0 0 1-.9.52l-4.56 1.3a.75.75 0 0 1-.93-.93l1.3-4.56a2 2 0 0 1 .52-.9L16.47 3.53Z", stroke: tokens.textMuted, strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) })
4468
4275
  ]
4469
4276
  }
4470
4277
  ) }),
4471
- /* @__PURE__ */ jsxs(
4472
- "button",
4473
- {
4474
- type: "button",
4475
- onClick: onAdvanced,
4476
- style: tokenIconButtonStyle(!!onAdvanced),
4477
- children: [
4478
- /* @__PURE__ */ jsx("div", { style: tokenIconWrapStyle, children: selectedTokenSymbol && TOKEN_LOGOS[selectedTokenSymbol] ? /* @__PURE__ */ jsx("img", { src: TOKEN_LOGOS[selectedTokenSymbol], alt: selectedTokenSymbol, width: 36, height: 36, style: { borderRadius: "50%" } }) : /* @__PURE__ */ jsxs("svg", { width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", children: [
4479
- /* @__PURE__ */ jsx("circle", { cx: "18", cy: "18", r: "18", fill: "#2DB84B" }),
4480
- /* @__PURE__ */ jsx("text", { x: "18", y: "23", textAnchor: "middle", fontSize: "18", fill: "#fff", fontWeight: "700", children: "$" })
4481
- ] }) }),
4482
- /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", style: { opacity: 0.5 }, children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6", stroke: tokens.textMuted, strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
4483
- ]
4484
- }
4485
- )
4486
- ] }),
4487
- /* @__PURE__ */ jsxs("div", { style: presetsRowStyle, children: [
4488
- PRESETS.map((value) => /* @__PURE__ */ jsxs(
4489
- "button",
4490
- {
4491
- type: "button",
4492
- onClick: () => selectPreset(value),
4493
- style: presetButtonStyle(tokens, activePreset === value),
4494
- children: [
4495
- "$",
4496
- value.toLocaleString()
4497
- ]
4498
- },
4499
- value
4500
- )),
4501
- /* @__PURE__ */ jsx(
4502
- "button",
4503
- {
4504
- type: "button",
4505
- onClick: selectMax,
4506
- style: presetButtonStyle(tokens, activePreset === "max"),
4507
- children: "Max"
4508
- }
4509
- )
4278
+ /* @__PURE__ */ jsxs("div", { style: presetsRowStyle, children: [
4279
+ PRESETS.map((value) => /* @__PURE__ */ jsxs(
4280
+ "button",
4281
+ {
4282
+ type: "button",
4283
+ onClick: () => selectPreset(value),
4284
+ style: presetButtonStyle(tokens, activePreset === value),
4285
+ children: [
4286
+ "$",
4287
+ value.toLocaleString()
4288
+ ]
4289
+ },
4290
+ value
4291
+ )),
4292
+ /* @__PURE__ */ jsx(
4293
+ "button",
4294
+ {
4295
+ type: "button",
4296
+ onClick: selectMax,
4297
+ style: presetButtonStyle(tokens, activePreset === "max"),
4298
+ children: "Max"
4299
+ }
4300
+ )
4301
+ ] })
4510
4302
  ] })
4511
4303
  ]
4512
4304
  }
4513
4305
  );
4514
4306
  }
4515
- var headingStyle6 = (color) => ({
4516
- fontSize: "1.1rem",
4517
- fontWeight: 700,
4518
- letterSpacing: "-0.02em",
4307
+ var mascotStyle2 = {
4308
+ display: "block",
4309
+ margin: "0 auto 12px"
4310
+ };
4311
+ var descriptionStyle = (color) => ({
4312
+ fontSize: "1.05rem",
4313
+ fontWeight: 600,
4314
+ lineHeight: 1.45,
4519
4315
  color,
4520
- margin: "8px 0 24px",
4316
+ margin: "0 0 24px",
4521
4317
  textAlign: "center"
4522
4318
  });
4319
+ var tokenRowTriggerStyle = (themeTokens, clickable) => ({
4320
+ display: "flex",
4321
+ alignItems: "center",
4322
+ justifyContent: "space-between",
4323
+ width: "100%",
4324
+ padding: "10px 14px",
4325
+ borderRadius: 999,
4326
+ background: themeTokens.bgCard,
4327
+ border: `1px solid ${themeTokens.border}`,
4328
+ cursor: clickable ? "pointer" : "default",
4329
+ fontFamily: "inherit",
4330
+ marginBottom: 8
4331
+ });
4332
+ var tokenRowLabelStyle = (color) => ({
4333
+ fontSize: "0.95rem",
4334
+ fontWeight: 500,
4335
+ color
4336
+ });
4337
+ var tokenRowRightStyle = {
4338
+ display: "flex",
4339
+ alignItems: "center",
4340
+ gap: 6,
4341
+ flexShrink: 0
4342
+ };
4343
+ var tokenRowSymbolStyle = (color) => ({
4344
+ fontSize: "0.84rem",
4345
+ fontWeight: 500,
4346
+ color
4347
+ });
4348
+ var advancedToggleStyle = (accentColor) => ({
4349
+ display: "block",
4350
+ margin: "4px auto 24px",
4351
+ background: "transparent",
4352
+ border: "none",
4353
+ color: accentColor,
4354
+ fontSize: "0.92rem",
4355
+ fontWeight: 600,
4356
+ fontFamily: "inherit",
4357
+ cursor: "pointer",
4358
+ padding: "4px 8px"
4359
+ });
4523
4360
  var errorBannerStyle4 = (tokens) => ({
4524
4361
  background: tokens.errorBg,
4525
4362
  border: `1px solid ${tokens.error}66`,
@@ -4530,27 +4367,25 @@ var errorBannerStyle4 = (tokens) => ({
4530
4367
  marginBottom: 14,
4531
4368
  lineHeight: 1.5
4532
4369
  });
4533
- var amountRowStyle = {
4534
- display: "flex",
4535
- alignItems: "center",
4536
- justifyContent: "space-between",
4537
- marginBottom: 24,
4538
- gap: 12
4370
+ var amountSectionStyle = {
4371
+ textAlign: "center",
4372
+ marginBottom: 16
4539
4373
  };
4540
4374
  var limitValueStyle = (color) => ({
4541
- fontSize: "2.4rem",
4375
+ fontSize: "2.8rem",
4542
4376
  fontWeight: 700,
4543
4377
  color,
4544
4378
  letterSpacing: "-0.02em",
4545
4379
  display: "flex",
4546
- alignItems: "baseline"
4380
+ alignItems: "center",
4381
+ justifyContent: "center"
4547
4382
  });
4548
4383
  var editableLimitStyle = (color) => ({
4549
4384
  ...limitValueStyle(color),
4550
4385
  cursor: "pointer"
4551
4386
  });
4552
4387
  var limitInputStyle = (color) => ({
4553
- fontSize: "2.4rem",
4388
+ fontSize: "2.8rem",
4554
4389
  fontWeight: 700,
4555
4390
  color,
4556
4391
  background: "transparent",
@@ -4560,25 +4395,117 @@ var limitInputStyle = (color) => ({
4560
4395
  width: "6ch",
4561
4396
  fontFamily: "inherit",
4562
4397
  padding: 0,
4563
- letterSpacing: "-0.02em"
4398
+ letterSpacing: "-0.02em",
4399
+ textAlign: "center"
4564
4400
  });
4565
- var tokenIconButtonStyle = (clickable) => ({
4401
+ var tokenIconWrapStyle = {
4402
+ position: "relative",
4403
+ width: 36,
4404
+ height: 36
4405
+ };
4406
+ var dropdownOuterStyle = (themeTokens) => ({
4407
+ marginTop: 4,
4408
+ marginBottom: 12,
4409
+ background: themeTokens.bgCard,
4410
+ border: `1px solid ${themeTokens.border}`,
4411
+ borderRadius: themeTokens.radiusLg,
4412
+ boxShadow: themeTokens.shadowLg,
4413
+ padding: "12px 14px 14px"
4414
+ });
4415
+ var dropdownLabelStyle = (color) => ({
4416
+ fontSize: "0.78rem",
4417
+ fontWeight: 500,
4418
+ color,
4419
+ marginBottom: 8
4420
+ });
4421
+ var dropdownInnerStyle = (themeTokens) => ({
4422
+ background: themeTokens.bgInput,
4423
+ border: `1px solid ${themeTokens.border}`,
4424
+ borderRadius: themeTokens.radiusLg,
4425
+ overflow: "hidden"
4426
+ });
4427
+ var dropdownRowStyle = (themeTokens, isSelected, isLast) => ({
4566
4428
  display: "flex",
4567
4429
  alignItems: "center",
4568
- gap: 4,
4569
- background: "transparent",
4430
+ justifyContent: "space-between",
4431
+ width: "100%",
4432
+ padding: "14px 16px",
4433
+ background: isSelected ? `${themeTokens.accent}18` : "transparent",
4570
4434
  border: "none",
4571
- cursor: clickable ? "pointer" : "default",
4572
- padding: 0,
4573
- flexShrink: 0
4435
+ borderBottom: isLast ? "none" : `1px solid ${themeTokens.border}`,
4436
+ cursor: "pointer",
4437
+ fontFamily: "inherit",
4438
+ textAlign: "left",
4439
+ outline: "none"
4574
4440
  });
4575
- var tokenIconWrapStyle = {
4576
- position: "relative",
4441
+ var dropdownRowLeftStyle = {
4442
+ display: "flex",
4443
+ alignItems: "center",
4444
+ gap: 12,
4445
+ minWidth: 0,
4446
+ flex: 1
4447
+ };
4448
+ var dropdownTokenIconStyle = (themeTokens, hasLogo) => ({
4577
4449
  width: 36,
4578
- height: 36
4450
+ height: 36,
4451
+ borderRadius: "50%",
4452
+ border: hasLogo ? "none" : `1.5px solid ${themeTokens.border}`,
4453
+ display: "flex",
4454
+ alignItems: "center",
4455
+ justifyContent: "center",
4456
+ flexShrink: 0,
4457
+ overflow: "hidden"
4458
+ });
4459
+ var dropdownTokenLogoStyle = {
4460
+ width: 36,
4461
+ height: 36,
4462
+ borderRadius: "50%",
4463
+ objectFit: "cover"
4464
+ };
4465
+ var dropdownTokenFallbackStyle = (color) => ({
4466
+ fontSize: "1rem",
4467
+ fontWeight: 700,
4468
+ color
4469
+ });
4470
+ var dropdownTokenInfoStyle = {
4471
+ display: "flex",
4472
+ flexDirection: "column",
4473
+ gap: 2,
4474
+ minWidth: 0
4475
+ };
4476
+ var dropdownTokenNameRowStyle = {
4477
+ display: "flex",
4478
+ alignItems: "center",
4479
+ gap: 4
4579
4480
  };
4481
+ var dropdownTokenSymbolStyle = (color) => ({
4482
+ fontSize: "0.92rem",
4483
+ fontWeight: 600,
4484
+ color
4485
+ });
4486
+ var dropdownTokenDotStyle = (color) => ({
4487
+ fontSize: "0.8rem",
4488
+ color
4489
+ });
4490
+ var dropdownTokenChainStyle = (color) => ({
4491
+ fontSize: "0.84rem",
4492
+ fontWeight: 400,
4493
+ color
4494
+ });
4495
+ var dropdownTokenBalanceStyle = (color) => ({
4496
+ fontSize: "0.78rem",
4497
+ color
4498
+ });
4499
+ var dropdownRadioEmptyStyle = (borderColor) => ({
4500
+ width: 22,
4501
+ height: 22,
4502
+ borderRadius: "50%",
4503
+ border: `2px solid ${borderColor}`,
4504
+ flexShrink: 0
4505
+ });
4580
4506
  var presetsRowStyle = {
4581
4507
  display: "flex",
4508
+ justifyContent: "center",
4582
4509
  gap: 10,
4583
4510
  marginBottom: 24
4584
4511
  };
@@ -4612,8 +4539,8 @@ function SetupStatusScreen({
4612
4539
  return /* @__PURE__ */ jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsx(PoweredByFooter, {}), children: [
4613
4540
  /* @__PURE__ */ jsx(ScreenHeader, { onBack: onContinue }),
4614
4541
  /* @__PURE__ */ jsxs("div", { style: contentStyle5, children: [
4615
- /* @__PURE__ */ jsx("img", { src: BLINK_LOGO, alt: "Blink", style: mascotStyle2 }),
4616
- /* @__PURE__ */ jsx("h2", { style: headingStyle7(tokens.text), children: "Done!" }),
4542
+ /* @__PURE__ */ jsx("img", { src: BLINK_LOGO, alt: "Blink", style: mascotStyle3 }),
4543
+ /* @__PURE__ */ jsx("h2", { style: headingStyle6(tokens.text), children: "Done!" }),
4617
4544
  /* @__PURE__ */ jsx("p", { style: subtitleStyle6(tokens.textSecondary), children: "Return to the app to try one-tap deposits." })
4618
4545
  ] })
4619
4546
  ] });
@@ -4626,7 +4553,7 @@ function SetupStatusScreen({
4626
4553
  /* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
4627
4554
  /* @__PURE__ */ jsxs("div", { style: contentStyle5, children: [
4628
4555
  /* @__PURE__ */ jsx(Spinner, { size: 48 }),
4629
- /* @__PURE__ */ jsx("h2", { style: headingStyle7(tokens.text), children: "Setting up One-Tap..." }),
4556
+ /* @__PURE__ */ jsx("h2", { style: headingStyle6(tokens.text), children: "Setting up One-Tap..." }),
4630
4557
  error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle5(tokens), children: error }),
4631
4558
  /* @__PURE__ */ jsx("div", { style: stepsWrapStyle, children: /* @__PURE__ */ jsx(StepList, { steps }) }),
4632
4559
  /* @__PURE__ */ jsx("p", { style: waitHintStyle(tokens.textMuted), children: "Usually takes a few seconds" })
@@ -4642,11 +4569,11 @@ var contentStyle5 = {
4642
4569
  textAlign: "center",
4643
4570
  padding: "0 24px 32px"
4644
4571
  };
4645
- var mascotStyle2 = {
4572
+ var mascotStyle3 = {
4646
4573
  width: 56,
4647
4574
  height: 56
4648
4575
  };
4649
- var headingStyle7 = (color) => ({
4576
+ var headingStyle6 = (color) => ({
4650
4577
  fontSize: "1.45rem",
4651
4578
  fontWeight: 700,
4652
4579
  letterSpacing: "-0.02em",
@@ -4740,7 +4667,7 @@ function DepositScreen({
4740
4667
  /* @__PURE__ */ jsxs("div", { ref: pickerRef, style: depositCardWrapStyle, children: [
4741
4668
  /* @__PURE__ */ jsxs("div", { children: [
4742
4669
  /* @__PURE__ */ jsx("div", { style: depositLabelStyle(tokens.textMuted), children: "Depositing" }),
4743
- /* @__PURE__ */ jsxs("div", { style: amountRowStyle2, children: [
4670
+ /* @__PURE__ */ jsxs("div", { style: amountRowStyle, children: [
4744
4671
  /* @__PURE__ */ jsxs("div", { style: amountValueStyle(tokens.text), children: [
4745
4672
  "$",
4746
4673
  amount.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
@@ -4750,7 +4677,7 @@ function DepositScreen({
4750
4677
  {
4751
4678
  type: "button",
4752
4679
  onClick: onSelectToken,
4753
- style: tokenIconButtonStyle2(!!onSelectToken),
4680
+ style: tokenIconButtonStyle(!!onSelectToken),
4754
4681
  children: [
4755
4682
  /* @__PURE__ */ jsx("div", { style: tokenIconWrapStyle2, children: selectedTokenSymbol && TOKEN_LOGOS[selectedTokenSymbol] ? /* @__PURE__ */ jsx("img", { src: TOKEN_LOGOS[selectedTokenSymbol], alt: selectedTokenSymbol, width: 36, height: 36, style: { borderRadius: "50%" } }) : /* @__PURE__ */ jsxs("svg", { width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", children: [
4756
4683
  /* @__PURE__ */ jsx("circle", { cx: "18", cy: "18", r: "18", fill: "#2DB84B" }),
@@ -4880,7 +4807,7 @@ var depositLabelStyle = (color) => ({
4880
4807
  color,
4881
4808
  marginBottom: 4
4882
4809
  });
4883
- var amountRowStyle2 = {
4810
+ var amountRowStyle = {
4884
4811
  display: "flex",
4885
4812
  alignItems: "center",
4886
4813
  justifyContent: "space-between",
@@ -4892,7 +4819,7 @@ var amountValueStyle = (color) => ({
4892
4819
  letterSpacing: "-0.02em",
4893
4820
  color
4894
4821
  });
4895
- var tokenIconButtonStyle2 = (clickable) => ({
4822
+ var tokenIconButtonStyle = (clickable) => ({
4896
4823
  display: "flex",
4897
4824
  alignItems: "center",
4898
4825
  gap: 4,
@@ -5099,7 +5026,7 @@ function SuccessScreen({
5099
5026
  /* @__PURE__ */ jsxs("div", { style: contentStyle6, children: [
5100
5027
  succeeded ? /* @__PURE__ */ jsxs(Fragment, { children: [
5101
5028
  /* @__PURE__ */ jsx(IconCircle, { variant: "success", size: 64, children: /* @__PURE__ */ jsx("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z", fill: tokens.success }) }) }),
5102
- /* @__PURE__ */ jsxs("h2", { style: headingStyle8(tokens.text), children: [
5029
+ /* @__PURE__ */ jsxs("h2", { style: headingStyle7(tokens.text), children: [
5103
5030
  "$",
5104
5031
  amount.toFixed(2),
5105
5032
  " deposited"
@@ -5110,7 +5037,7 @@ function SuccessScreen({
5110
5037
  ] })
5111
5038
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
5112
5039
  /* @__PURE__ */ jsx(IconCircle, { variant: "error", size: 64, children: /* @__PURE__ */ jsx("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z", fill: tokens.error }) }) }),
5113
- /* @__PURE__ */ jsx("h2", { style: headingStyle8(tokens.text), children: "Transfer failed" }),
5040
+ /* @__PURE__ */ jsx("h2", { style: headingStyle7(tokens.text), children: "Transfer failed" }),
5114
5041
  error && /* @__PURE__ */ jsx("p", { style: subtitleStyle7(tokens.error), children: error })
5115
5042
  ] }),
5116
5043
  /* @__PURE__ */ jsxs("div", { style: summaryCardStyle(tokens), children: [
@@ -5150,7 +5077,7 @@ var contentStyle6 = {
5150
5077
  alignItems: "center",
5151
5078
  paddingTop: 16
5152
5079
  };
5153
- var headingStyle8 = (color) => ({
5080
+ var headingStyle7 = (color) => ({
5154
5081
  fontSize: "1.5rem",
5155
5082
  fontWeight: 700,
5156
5083
  letterSpacing: "-0.02em",
@@ -5474,7 +5401,7 @@ function AdvancedSourceScreen({
5474
5401
  right: /* @__PURE__ */ jsx("span", { style: advancedBadgeStyle(tokens.accent), children: "Advanced" })
5475
5402
  }
5476
5403
  ),
5477
- /* @__PURE__ */ jsx("h2", { style: headingStyle9(tokens.text), children: "Set up One-Tap deposits" }),
5404
+ /* @__PURE__ */ jsx("h2", { style: headingStyle8(tokens.text), children: "Set up One-Tap deposits" }),
5478
5405
  /* @__PURE__ */ jsx("p", { style: subtitleStyle9(tokens.textSecondary), children: "Select a token source for your One-Tap deposits." }),
5479
5406
  /* @__PURE__ */ jsx("label", { style: labelStyle5(tokens.textSecondary), children: "Select tokens to approve" }),
5480
5407
  /* @__PURE__ */ jsx("div", { style: chainListStyle, children: choices.map((chain) => {
@@ -5538,7 +5465,7 @@ var advancedBadgeStyle = (color) => ({
5538
5465
  padding: "3px 10px",
5539
5466
  letterSpacing: "0.02em"
5540
5467
  });
5541
- var headingStyle9 = (color) => ({
5468
+ var headingStyle8 = (color) => ({
5542
5469
  fontSize: "1.3rem",
5543
5470
  fontWeight: 700,
5544
5471
  letterSpacing: "-0.02em",
@@ -5675,7 +5602,7 @@ function TransferStatusScreen({
5675
5602
  /* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
5676
5603
  /* @__PURE__ */ jsxs("div", { style: contentStyle7, children: [
5677
5604
  /* @__PURE__ */ jsx(Spinner, { size: 64 }),
5678
- /* @__PURE__ */ jsx("h2", { style: headingStyle10(tokens.text), children: "Depositing your money..." }),
5605
+ /* @__PURE__ */ jsx("h2", { style: headingStyle9(tokens.text), children: "Depositing your money..." }),
5679
5606
  error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle7(tokens), children: error }),
5680
5607
  /* @__PURE__ */ jsx("div", { style: stepsWrapStyle2, children: /* @__PURE__ */ jsx(StepList, { steps }) })
5681
5608
  ] })
@@ -5690,7 +5617,7 @@ var contentStyle7 = {
5690
5617
  textAlign: "center",
5691
5618
  padding: "0 24px"
5692
5619
  };
5693
- var headingStyle10 = (color) => ({
5620
+ var headingStyle9 = (color) => ({
5694
5621
  fontSize: "1.45rem",
5695
5622
  fontWeight: 700,
5696
5623
  letterSpacing: "-0.02em",
@@ -5753,7 +5680,7 @@ function OpenWalletScreen({
5753
5680
  /* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
5754
5681
  /* @__PURE__ */ jsxs("div", { style: contentStyle8, children: [
5755
5682
  /* @__PURE__ */ jsx("div", { style: logoCircleStyle(tokens.bgInput), children: logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsx(Spinner, { size: 32 }) }),
5756
- /* @__PURE__ */ jsxs("h2", { style: headingStyle11(tokens.text), children: [
5683
+ /* @__PURE__ */ jsxs("h2", { style: headingStyle10(tokens.text), children: [
5757
5684
  "Setting up ",
5758
5685
  displayName,
5759
5686
  "..."
@@ -5786,7 +5713,7 @@ function OpenWalletScreen({
5786
5713
  /* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
5787
5714
  /* @__PURE__ */ jsxs("div", { style: contentStyle8, children: [
5788
5715
  /* @__PURE__ */ jsx("div", { style: logoCircleStyle(tokens.bgInput), children: logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsx(Spinner, { size: 32 }) }),
5789
- /* @__PURE__ */ jsx("h2", { style: headingStyle11(tokens.text), children: loading ? "Connecting..." : `Open ${displayName}` }),
5716
+ /* @__PURE__ */ jsx("h2", { style: headingStyle10(tokens.text), children: loading ? "Connecting..." : `Open ${displayName}` }),
5790
5717
  /* @__PURE__ */ jsx("p", { style: subtitleStyle10(tokens.textSecondary), children: loading ? "Creating transfer and preparing your wallet link..." : `Continue in ${displayName} to authorize this connection.` }),
5791
5718
  !loading && /* @__PURE__ */ jsxs("div", { style: waitingBadgeStyle(tokens), children: [
5792
5719
  /* @__PURE__ */ jsx(Spinner, { size: 14 }),
@@ -5827,7 +5754,7 @@ var logoStyle2 = {
5827
5754
  borderRadius: 12,
5828
5755
  objectFit: "contain"
5829
5756
  };
5830
- var headingStyle11 = (color) => ({
5757
+ var headingStyle10 = (color) => ({
5831
5758
  fontSize: "1.45rem",
5832
5759
  fontWeight: 700,
5833
5760
  letterSpacing: "-0.02em",
@@ -5885,7 +5812,7 @@ function ConfirmSignScreen({
5885
5812
  /* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
5886
5813
  /* @__PURE__ */ jsxs("div", { style: contentStyle9, children: [
5887
5814
  logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle3 }) : /* @__PURE__ */ jsx(Spinner, { size: 48 }),
5888
- /* @__PURE__ */ jsx("h2", { style: headingStyle12(tokens.text), children: "Wallet authorized" }),
5815
+ /* @__PURE__ */ jsx("h2", { style: headingStyle11(tokens.text), children: "Wallet authorized" }),
5889
5816
  /* @__PURE__ */ jsxs("p", { style: subtitleStyle11(tokens.textSecondary), children: [
5890
5817
  displayName,
5891
5818
  " approved the connection. Tap below to confirm your payment."
@@ -5914,7 +5841,7 @@ var logoStyle3 = {
5914
5841
  borderRadius: 14,
5915
5842
  objectFit: "contain"
5916
5843
  };
5917
- var headingStyle12 = (color) => ({
5844
+ var headingStyle11 = (color) => ({
5918
5845
  fontSize: "1.45rem",
5919
5846
  fontWeight: 700,
5920
5847
  letterSpacing: "-0.02em",
@@ -6005,7 +5932,7 @@ function TokenPickerScreen({
6005
5932
  {
6006
5933
  type: "button",
6007
5934
  onClick: onBack,
6008
- style: tokenIconButtonStyle3,
5935
+ style: tokenIconButtonStyle2,
6009
5936
  children: [
6010
5937
  /* @__PURE__ */ jsx("div", { style: tokenIconWrapStyle3, children: selectedTokenSymbol && TOKEN_LOGOS[selectedTokenSymbol] ? /* @__PURE__ */ jsx("img", { src: TOKEN_LOGOS[selectedTokenSymbol], alt: selectedTokenSymbol, width: 36, height: 36, style: { borderRadius: "50%" } }) : /* @__PURE__ */ jsxs("svg", { width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", children: [
6011
5938
  /* @__PURE__ */ jsx("circle", { cx: "18", cy: "18", r: "18", fill: "#2DB84B" }),
@@ -6068,7 +5995,7 @@ var depositAmountStyle = (color) => ({
6068
5995
  letterSpacing: "-0.02em",
6069
5996
  color
6070
5997
  });
6071
- var tokenIconButtonStyle3 = {
5998
+ var tokenIconButtonStyle2 = {
6072
5999
  display: "flex",
6073
6000
  alignItems: "center",
6074
6001
  gap: 4,
@@ -6194,6 +6121,16 @@ var selectCircleSelectedStyle = (color) => ({
6194
6121
  function entryKey(entry) {
6195
6122
  return `${entry.sourceChainId}-${entry.tokenAddress.toLowerCase()}`;
6196
6123
  }
6124
+ function isPreciseMoneyNonPositive(fee) {
6125
+ const raw = fee.value.trim();
6126
+ if (!/^-?\d+(\.\d*)?$/.test(raw)) return false;
6127
+ const n = Number(raw);
6128
+ return Number.isFinite(n) && n <= 0;
6129
+ }
6130
+ function formatNonPositiveFeeDisplay(fee) {
6131
+ if (fee.currency === "USD") return "Under $0.01";
6132
+ return `Less than 0.01 ${fee.currency}`;
6133
+ }
6197
6134
  function formatPreciseMoneyForDisplay(fee) {
6198
6135
  const raw = fee.value.trim();
6199
6136
  if (fee.currency === "USD") {
@@ -6246,12 +6183,13 @@ function GuestTokenPickerScreen({
6246
6183
  const canConfirm = Boolean(quoteFee && pendingEntry && !quoteLoading);
6247
6184
  const feeLine = (() => {
6248
6185
  if (quoteLoading && pendingEntry) {
6249
- return /* @__PURE__ */ jsx("div", { style: feeRowStyle(t.textMuted), "aria-live": "polite", children: "Estimating fee\u2026" });
6186
+ return /* @__PURE__ */ jsx("div", { style: feeRowContainerStyle, "aria-live": "polite", children: /* @__PURE__ */ jsx("span", { style: feeRowLabelStyle(t.textMuted), children: "Getting fee estimate\u2026" }) });
6250
6187
  }
6251
6188
  if (quoteFee) {
6252
- return /* @__PURE__ */ jsxs("div", { style: feeRowStyle(t.textMuted), "aria-live": "polite", children: [
6253
- "Estimated fee ",
6254
- formatPreciseMoneyForDisplay(quoteFee)
6189
+ const feeText = isPreciseMoneyNonPositive(quoteFee) ? formatNonPositiveFeeDisplay(quoteFee) : formatPreciseMoneyForDisplay(quoteFee);
6190
+ return /* @__PURE__ */ jsxs("div", { style: feeRowContainerStyle, "aria-live": "polite", children: [
6191
+ /* @__PURE__ */ jsx("span", { style: feeRowLabelStyle(t.textMuted), children: "Fee estimate: " }),
6192
+ /* @__PURE__ */ jsx("span", { style: feeRowAmountStyle(t.textSecondary), children: feeText })
6255
6193
  ] });
6256
6194
  }
6257
6195
  return null;
@@ -6456,11 +6394,15 @@ var depositAmountStyle2 = (color) => ({
6456
6394
  color,
6457
6395
  lineHeight: 1.05
6458
6396
  });
6459
- var feeRowStyle = (color) => ({
6397
+ var feeRowContainerStyle = {
6460
6398
  fontSize: "0.84rem",
6461
6399
  fontWeight: 500,
6462
- color,
6463
6400
  marginTop: 6
6401
+ };
6402
+ var feeRowLabelStyle = (color) => ({ color });
6403
+ var feeRowAmountStyle = (color) => ({
6404
+ color,
6405
+ fontVariantNumeric: "tabular-nums"
6464
6406
  });
6465
6407
  var tokenTriggerStyle = (tokens, interactive) => ({
6466
6408
  display: "flex",
@@ -6624,7 +6566,7 @@ function GuestPreauthSetupCompleteScreen({
6624
6566
  fill: tokens.success
6625
6567
  }
6626
6568
  ) }) }),
6627
- /* @__PURE__ */ jsx("h2", { style: headingStyle13(tokens.text), children: "Setup complete" }),
6569
+ /* @__PURE__ */ jsx("h2", { style: headingStyle12(tokens.text), children: "Setup complete" }),
6628
6570
  /* @__PURE__ */ jsx("p", { style: subtitleStyle12(tokens.textSecondary), children: "Your account is linked and ready. You can close this window or make another deposit." })
6629
6571
  ] })
6630
6572
  ]
@@ -6639,7 +6581,7 @@ var contentStyle10 = {
6639
6581
  gap: 12,
6640
6582
  paddingTop: 8
6641
6583
  };
6642
- function headingStyle13(color) {
6584
+ function headingStyle12(color) {
6643
6585
  return {
6644
6586
  margin: 0,
6645
6587
  fontSize: 22,
@@ -6662,7 +6604,7 @@ function GuestPreauthLinkingScreen({ onLogout }) {
6662
6604
  /* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
6663
6605
  /* @__PURE__ */ jsxs("div", { style: contentStyle11, children: [
6664
6606
  /* @__PURE__ */ jsx(Spinner, { size: 48 }),
6665
- /* @__PURE__ */ jsx("h2", { style: headingStyle14(tokens.text), children: "Setting up your account..." }),
6607
+ /* @__PURE__ */ jsx("h2", { style: headingStyle13(tokens.text), children: "Setting up your account..." }),
6666
6608
  /* @__PURE__ */ jsx("p", { style: subtitleStyle13(tokens.textSecondary), children: "Linking your wallet to your Blink account. This usually takes a few seconds." })
6667
6609
  ] })
6668
6610
  ] });
@@ -6676,7 +6618,7 @@ var contentStyle11 = {
6676
6618
  textAlign: "center",
6677
6619
  padding: "0 24px 32px"
6678
6620
  };
6679
- function headingStyle14(color) {
6621
+ function headingStyle13(color) {
6680
6622
  return {
6681
6623
  margin: "20px 0 8px",
6682
6624
  fontSize: "1.45rem",
@@ -6903,6 +6845,28 @@ function StepRendererContent({
6903
6845
  );
6904
6846
  const effectiveTokenCount = tokenCount > 0 ? tokenCount : selectSourceTokenCount;
6905
6847
  const effectiveSourceLabel = selectedSourceLabel ?? (selectSourceChainName && selectSourceTokenSymbol ? `${selectSourceTokenSymbol} on ${selectSourceChainName}` : void 0);
6848
+ const setupTokenOptions = selectedAccount ? selectedAccount.wallets.flatMap(
6849
+ (w) => w.sources.filter((s) => s.balance.total.amount > 0).map((s) => ({
6850
+ symbol: s.token.symbol,
6851
+ chainName: w.chain.name,
6852
+ balance: s.balance.available.amount,
6853
+ walletId: w.id
6854
+ }))
6855
+ ) : selectSourceChoices.flatMap(
6856
+ (chain) => chain.tokens.map((t) => ({
6857
+ symbol: t.tokenSymbol,
6858
+ chainName: chain.chainName,
6859
+ balance: t.balance
6860
+ }))
6861
+ );
6862
+ const handleSetupSelectToken = (symbol, chainName, walletId) => {
6863
+ if (walletId) {
6864
+ handlers.onSelectAuthorizedToken(walletId, symbol);
6865
+ } else {
6866
+ handlers.onSelectSourceChainChange(chainName);
6867
+ handlers.onSetSelectSourceTokenSymbol(symbol);
6868
+ }
6869
+ };
6906
6870
  return /* @__PURE__ */ jsx(
6907
6871
  SetupScreen,
6908
6872
  {
@@ -6916,7 +6880,9 @@ function StepRendererContent({
6916
6880
  selectedSourceLabel: effectiveSourceLabel,
6917
6881
  loading: savingOneTapLimit,
6918
6882
  error: state.error,
6919
- selectedTokenSymbol: selectedSource?.token.symbol ?? selectSourceTokenSymbol
6883
+ selectedTokenSymbol: selectedSource?.token.symbol ?? selectSourceTokenSymbol,
6884
+ tokenOptions: setupTokenOptions,
6885
+ onSelectToken: handleSetupSelectToken
6920
6886
  }
6921
6887
  );
6922
6888
  }
@@ -7126,7 +7092,7 @@ var PaymentErrorBoundary = class extends Component {
7126
7092
  /* @__PURE__ */ jsx("path", { d: "M12 8v5", stroke: "#ef4444", strokeWidth: "1.5", strokeLinecap: "round" }),
7127
7093
  /* @__PURE__ */ jsx("circle", { cx: "12", cy: "16", r: "0.75", fill: "#ef4444" })
7128
7094
  ] }) }),
7129
- /* @__PURE__ */ jsx("h2", { style: headingStyle15, children: "Something went wrong" }),
7095
+ /* @__PURE__ */ jsx("h2", { style: headingStyle14, children: "Something went wrong" }),
7130
7096
  /* @__PURE__ */ jsx("p", { style: messageStyle, children: "An unexpected error occurred. Please try again." }),
7131
7097
  /* @__PURE__ */ jsx("button", { type: "button", onClick: this.handleReset, style: buttonStyle3, children: "Try again" })
7132
7098
  ] });
@@ -7146,7 +7112,7 @@ var containerStyle9 = {
7146
7112
  var iconStyle3 = {
7147
7113
  marginBottom: 20
7148
7114
  };
7149
- var headingStyle15 = {
7115
+ var headingStyle14 = {
7150
7116
  fontSize: "1.25rem",
7151
7117
  fontWeight: 700,
7152
7118
  color: "#1a1a1a",
@@ -8387,6 +8353,15 @@ function useGuestTransferHandlers(deps) {
8387
8353
  const executingBridgeRef = useRef(false);
8388
8354
  const fetchedRef = useRef(false);
8389
8355
  const selectedGuestTokenRef = useRef(null);
8356
+ useEffect(() => {
8357
+ if (guestTransferId != null) return;
8358
+ fetchedRef.current = false;
8359
+ setGuestTokenEntries([]);
8360
+ setPendingGuestEntry(null);
8361
+ setGuestFee(null);
8362
+ setGuestQuoteLoading(false);
8363
+ setLoadingBalances(false);
8364
+ }, [guestTransferId]);
8390
8365
  useEffect(() => {
8391
8366
  if (!isGuestFlow || !guestTransferId || !guestSessionToken || fetchedRef.current) return;
8392
8367
  const account = getAccount(wagmiConfig2);