@rhinestone/deposit-modal 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DepositModalReown-DNW4GH6L.cjs → DepositModalReown-KFTMS2WX.cjs} +9 -7
- package/dist/{DepositModalReown-6SUEC5IU.mjs → DepositModalReown-PC7EX5VK.mjs} +6 -4
- package/dist/{WithdrawModalReown-7UAGSOSU.mjs → WithdrawModalReown-BE23LUMT.mjs} +5 -4
- package/dist/{WithdrawModalReown-OUWBSKSM.cjs → WithdrawModalReown-Z2YF2FSJ.cjs} +8 -7
- package/dist/{caip-CrQ2KKU-.d.cts → caip-CsslyHGL.d.cts} +1 -1
- package/dist/{caip-CrQ2KKU-.d.ts → caip-CsslyHGL.d.ts} +1 -1
- package/dist/{chunk-33H6O5UU.cjs → chunk-3MXWIYAT.cjs} +16 -6
- package/dist/{chunk-KJ2RR2D4.mjs → chunk-3PVDRSJ7.mjs} +930 -682
- package/dist/{chunk-VVJAIMKB.cjs → chunk-7MP2UWIQ.cjs} +1091 -843
- package/dist/{chunk-MILJQWPT.cjs → chunk-ABVRVW3P.cjs} +133 -8
- package/dist/{chunk-2SMS542Q.cjs → chunk-AE5LHTPM.cjs} +122 -100
- package/dist/chunk-F7P4MV72.mjs +295 -0
- package/dist/chunk-FJWLC4AM.mjs +212 -0
- package/dist/{chunk-KAWJABTW.mjs → chunk-GKC22JC4.mjs} +901 -717
- package/dist/chunk-NRNJAQUA.cjs +212 -0
- package/dist/{chunk-RABZINV3.cjs → chunk-OQVLEVNR.cjs} +758 -574
- package/dist/chunk-UEKPBRBY.cjs +295 -0
- package/dist/{chunk-GPSBM66J.mjs → chunk-UFKFSGT3.mjs} +14 -4
- package/dist/{chunk-TKQYTBU6.mjs → chunk-WCIGOV34.mjs} +36 -14
- package/dist/{chunk-6YRDD462.mjs → chunk-WJX3TJFK.mjs} +135 -10
- package/dist/constants.cjs +2 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +6 -4
- package/dist/deposit.d.cts +4 -4
- package/dist/deposit.d.ts +4 -4
- package/dist/deposit.mjs +5 -3
- package/dist/index.cjs +7 -5
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.mjs +6 -4
- package/dist/polymarket.cjs +64 -0
- package/dist/polymarket.d.cts +57 -0
- package/dist/polymarket.d.ts +57 -0
- package/dist/polymarket.mjs +64 -0
- package/dist/styles.css +252 -9
- package/dist/{types-BMcGO5k_.d.cts → types-CFRuisqK.d.cts} +10 -1
- package/dist/{types-BMcGO5k_.d.ts → types-CFRuisqK.d.ts} +10 -1
- package/dist/withdraw.cjs +5 -4
- package/dist/withdraw.d.cts +4 -4
- package/dist/withdraw.d.ts +4 -4
- package/dist/withdraw.mjs +4 -3
- package/package.json +15 -2
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkABVRVW3Pcjs = require('./chunk-ABVRVW3P.cjs');
|
|
4
|
+
|
|
5
|
+
// src/core/safe.ts
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _viem = require('viem');
|
|
16
|
+
var SAFE_ABI = [
|
|
17
|
+
{
|
|
18
|
+
type: "function",
|
|
19
|
+
name: "isOwner",
|
|
20
|
+
stateMutability: "view",
|
|
21
|
+
inputs: [{ name: "owner", type: "address" }],
|
|
22
|
+
outputs: [{ name: "", type: "bool" }]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
type: "function",
|
|
26
|
+
name: "nonce",
|
|
27
|
+
stateMutability: "view",
|
|
28
|
+
inputs: [],
|
|
29
|
+
outputs: [{ type: "uint256" }]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: "function",
|
|
33
|
+
name: "execTransaction",
|
|
34
|
+
stateMutability: "payable",
|
|
35
|
+
inputs: [
|
|
36
|
+
{ name: "to", type: "address" },
|
|
37
|
+
{ name: "value", type: "uint256" },
|
|
38
|
+
{ name: "data", type: "bytes" },
|
|
39
|
+
{ name: "operation", type: "uint8" },
|
|
40
|
+
{ name: "safeTxGas", type: "uint256" },
|
|
41
|
+
{ name: "baseGas", type: "uint256" },
|
|
42
|
+
{ name: "gasPrice", type: "uint256" },
|
|
43
|
+
{ name: "gasToken", type: "address" },
|
|
44
|
+
{ name: "refundReceiver", type: "address" },
|
|
45
|
+
{ name: "signatures", type: "bytes" }
|
|
46
|
+
],
|
|
47
|
+
outputs: [{ name: "success", type: "bool" }]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: "event",
|
|
51
|
+
name: "ExecutionSuccess",
|
|
52
|
+
inputs: [
|
|
53
|
+
{ name: "txHash", type: "bytes32", indexed: true },
|
|
54
|
+
{ name: "payment", type: "uint256", indexed: false }
|
|
55
|
+
],
|
|
56
|
+
anonymous: false
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: "event",
|
|
60
|
+
name: "ExecutionFailure",
|
|
61
|
+
inputs: [
|
|
62
|
+
{ name: "txHash", type: "bytes32", indexed: true },
|
|
63
|
+
{ name: "payment", type: "uint256", indexed: false }
|
|
64
|
+
],
|
|
65
|
+
anonymous: false
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
async function executeSafeEthTransfer(params) {
|
|
69
|
+
const {
|
|
70
|
+
walletClient,
|
|
71
|
+
publicClient,
|
|
72
|
+
safeAddress,
|
|
73
|
+
recipient,
|
|
74
|
+
amount,
|
|
75
|
+
chainId
|
|
76
|
+
} = params;
|
|
77
|
+
const account = walletClient.account;
|
|
78
|
+
const chain = walletClient.chain;
|
|
79
|
+
if (!account || !chain) {
|
|
80
|
+
throw new Error("Wallet not connected");
|
|
81
|
+
}
|
|
82
|
+
if (chain.id !== chainId) {
|
|
83
|
+
throw new Error(`Switch to ${_chunkABVRVW3Pcjs.getChainName.call(void 0, chainId)} to sign`);
|
|
84
|
+
}
|
|
85
|
+
const isOwner = await publicClient.readContract({
|
|
86
|
+
address: safeAddress,
|
|
87
|
+
abi: SAFE_ABI,
|
|
88
|
+
functionName: "isOwner",
|
|
89
|
+
args: [account.address]
|
|
90
|
+
});
|
|
91
|
+
if (!isOwner) {
|
|
92
|
+
throw new Error("Connected wallet is not a Safe owner");
|
|
93
|
+
}
|
|
94
|
+
const safeTx = {
|
|
95
|
+
to: recipient,
|
|
96
|
+
value: amount,
|
|
97
|
+
data: "0x",
|
|
98
|
+
operation: 0,
|
|
99
|
+
safeTxGas: 0n,
|
|
100
|
+
baseGas: 0n,
|
|
101
|
+
gasPrice: 0n,
|
|
102
|
+
gasToken: _viem.zeroAddress,
|
|
103
|
+
refundReceiver: _viem.zeroAddress
|
|
104
|
+
};
|
|
105
|
+
const signature = _viem.concat.call(void 0, [
|
|
106
|
+
_viem.pad.call(void 0, account.address, { size: 32 }),
|
|
107
|
+
_viem.pad.call(void 0, _viem.toHex.call(void 0, 0), { size: 32 }),
|
|
108
|
+
_viem.toHex.call(void 0, 1, { size: 1 })
|
|
109
|
+
]);
|
|
110
|
+
const txHash = await walletClient.writeContract({
|
|
111
|
+
account,
|
|
112
|
+
chain,
|
|
113
|
+
address: safeAddress,
|
|
114
|
+
abi: SAFE_ABI,
|
|
115
|
+
functionName: "execTransaction",
|
|
116
|
+
args: [
|
|
117
|
+
safeTx.to,
|
|
118
|
+
safeTx.value,
|
|
119
|
+
safeTx.data,
|
|
120
|
+
safeTx.operation,
|
|
121
|
+
safeTx.safeTxGas,
|
|
122
|
+
safeTx.baseGas,
|
|
123
|
+
safeTx.gasPrice,
|
|
124
|
+
safeTx.gasToken,
|
|
125
|
+
safeTx.refundReceiver,
|
|
126
|
+
signature
|
|
127
|
+
]
|
|
128
|
+
});
|
|
129
|
+
const receipt = await publicClient.waitForTransactionReceipt({
|
|
130
|
+
hash: txHash
|
|
131
|
+
});
|
|
132
|
+
const safeLogs = receipt.logs.filter(
|
|
133
|
+
(log) => log.address.toLowerCase() === safeAddress.toLowerCase()
|
|
134
|
+
);
|
|
135
|
+
const parsed = _viem.parseEventLogs.call(void 0, {
|
|
136
|
+
abi: SAFE_ABI,
|
|
137
|
+
logs: safeLogs,
|
|
138
|
+
strict: false
|
|
139
|
+
});
|
|
140
|
+
const failed = parsed.find((log) => log.eventName === "ExecutionFailure");
|
|
141
|
+
if (failed) {
|
|
142
|
+
throw new Error("Safe transaction failed");
|
|
143
|
+
}
|
|
144
|
+
const succeeded = parsed.find((log) => log.eventName === "ExecutionSuccess");
|
|
145
|
+
if (!succeeded) {
|
|
146
|
+
throw new Error("Safe transaction status unavailable");
|
|
147
|
+
}
|
|
148
|
+
return { txHash };
|
|
149
|
+
}
|
|
150
|
+
async function executeSafeErc20Transfer(params) {
|
|
151
|
+
const {
|
|
152
|
+
walletClient,
|
|
153
|
+
publicClient,
|
|
154
|
+
safeAddress,
|
|
155
|
+
tokenAddress,
|
|
156
|
+
recipient,
|
|
157
|
+
amount,
|
|
158
|
+
chainId
|
|
159
|
+
} = params;
|
|
160
|
+
const account = walletClient.account;
|
|
161
|
+
const chain = walletClient.chain;
|
|
162
|
+
if (!account || !chain) {
|
|
163
|
+
throw new Error("Wallet not connected");
|
|
164
|
+
}
|
|
165
|
+
if (chain.id !== chainId) {
|
|
166
|
+
throw new Error(`Switch to ${_chunkABVRVW3Pcjs.getChainName.call(void 0, chainId)} to sign`);
|
|
167
|
+
}
|
|
168
|
+
const isOwner = await publicClient.readContract({
|
|
169
|
+
address: safeAddress,
|
|
170
|
+
abi: SAFE_ABI,
|
|
171
|
+
functionName: "isOwner",
|
|
172
|
+
args: [account.address]
|
|
173
|
+
});
|
|
174
|
+
if (!isOwner) {
|
|
175
|
+
throw new Error("Connected wallet is not a Safe owner");
|
|
176
|
+
}
|
|
177
|
+
const data = _viem.encodeFunctionData.call(void 0, {
|
|
178
|
+
abi: _viem.erc20Abi,
|
|
179
|
+
functionName: "transfer",
|
|
180
|
+
args: [recipient, amount]
|
|
181
|
+
});
|
|
182
|
+
const safeTx = {
|
|
183
|
+
to: tokenAddress,
|
|
184
|
+
value: 0n,
|
|
185
|
+
data,
|
|
186
|
+
operation: 0,
|
|
187
|
+
safeTxGas: 0n,
|
|
188
|
+
baseGas: 0n,
|
|
189
|
+
gasPrice: 0n,
|
|
190
|
+
gasToken: _viem.zeroAddress,
|
|
191
|
+
refundReceiver: _viem.zeroAddress
|
|
192
|
+
};
|
|
193
|
+
const signature = _viem.concat.call(void 0, [
|
|
194
|
+
_viem.pad.call(void 0, account.address, { size: 32 }),
|
|
195
|
+
_viem.pad.call(void 0, _viem.toHex.call(void 0, 0), { size: 32 }),
|
|
196
|
+
_viem.toHex.call(void 0, 1, { size: 1 })
|
|
197
|
+
]);
|
|
198
|
+
const txHash = await walletClient.writeContract({
|
|
199
|
+
account,
|
|
200
|
+
chain,
|
|
201
|
+
address: safeAddress,
|
|
202
|
+
abi: SAFE_ABI,
|
|
203
|
+
functionName: "execTransaction",
|
|
204
|
+
args: [
|
|
205
|
+
safeTx.to,
|
|
206
|
+
safeTx.value,
|
|
207
|
+
safeTx.data,
|
|
208
|
+
safeTx.operation,
|
|
209
|
+
safeTx.safeTxGas,
|
|
210
|
+
safeTx.baseGas,
|
|
211
|
+
safeTx.gasPrice,
|
|
212
|
+
safeTx.gasToken,
|
|
213
|
+
safeTx.refundReceiver,
|
|
214
|
+
signature
|
|
215
|
+
]
|
|
216
|
+
});
|
|
217
|
+
const receipt = await publicClient.waitForTransactionReceipt({
|
|
218
|
+
hash: txHash
|
|
219
|
+
});
|
|
220
|
+
const safeLogs = receipt.logs.filter(
|
|
221
|
+
(log) => log.address.toLowerCase() === safeAddress.toLowerCase()
|
|
222
|
+
);
|
|
223
|
+
const parsed = _viem.parseEventLogs.call(void 0, {
|
|
224
|
+
abi: SAFE_ABI,
|
|
225
|
+
logs: safeLogs,
|
|
226
|
+
strict: false
|
|
227
|
+
});
|
|
228
|
+
const failed = parsed.find((log) => log.eventName === "ExecutionFailure");
|
|
229
|
+
if (failed) {
|
|
230
|
+
throw new Error("Safe transaction failed");
|
|
231
|
+
}
|
|
232
|
+
const succeeded = parsed.find((log) => log.eventName === "ExecutionSuccess");
|
|
233
|
+
if (!succeeded) {
|
|
234
|
+
throw new Error("Safe transaction status unavailable");
|
|
235
|
+
}
|
|
236
|
+
return { txHash };
|
|
237
|
+
}
|
|
238
|
+
var SAFE_TX_TYPES = {
|
|
239
|
+
SafeTx: [
|
|
240
|
+
{ name: "to", type: "address" },
|
|
241
|
+
{ name: "value", type: "uint256" },
|
|
242
|
+
{ name: "data", type: "bytes" },
|
|
243
|
+
{ name: "operation", type: "uint8" },
|
|
244
|
+
{ name: "safeTxGas", type: "uint256" },
|
|
245
|
+
{ name: "baseGas", type: "uint256" },
|
|
246
|
+
{ name: "gasPrice", type: "uint256" },
|
|
247
|
+
{ name: "gasToken", type: "address" },
|
|
248
|
+
{ name: "refundReceiver", type: "address" },
|
|
249
|
+
{ name: "nonce", type: "uint256" }
|
|
250
|
+
]
|
|
251
|
+
};
|
|
252
|
+
async function buildSafeTransaction(params) {
|
|
253
|
+
const { publicClient, safeAddress, to, value, data, chainId } = params;
|
|
254
|
+
const nonce = await publicClient.readContract({
|
|
255
|
+
address: safeAddress,
|
|
256
|
+
abi: SAFE_ABI,
|
|
257
|
+
functionName: "nonce"
|
|
258
|
+
});
|
|
259
|
+
const message = {
|
|
260
|
+
to,
|
|
261
|
+
value,
|
|
262
|
+
data,
|
|
263
|
+
operation: 0,
|
|
264
|
+
safeTxGas: 0n,
|
|
265
|
+
baseGas: 0n,
|
|
266
|
+
gasPrice: 0n,
|
|
267
|
+
gasToken: _viem.zeroAddress,
|
|
268
|
+
refundReceiver: _viem.zeroAddress,
|
|
269
|
+
nonce
|
|
270
|
+
};
|
|
271
|
+
const safeTxHash = _viem.hashTypedData.call(void 0, {
|
|
272
|
+
domain: { chainId, verifyingContract: safeAddress },
|
|
273
|
+
types: SAFE_TX_TYPES,
|
|
274
|
+
primaryType: "SafeTx",
|
|
275
|
+
message
|
|
276
|
+
});
|
|
277
|
+
return {
|
|
278
|
+
chainId,
|
|
279
|
+
safeAddress,
|
|
280
|
+
safeTxHash,
|
|
281
|
+
typedData: {
|
|
282
|
+
domain: { chainId, verifyingContract: safeAddress },
|
|
283
|
+
types: SAFE_TX_TYPES,
|
|
284
|
+
primaryType: "SafeTx",
|
|
285
|
+
message
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
exports.SAFE_ABI = SAFE_ABI; exports.executeSafeEthTransfer = executeSafeEthTransfer; exports.executeSafeErc20Transfer = executeSafeErc20Transfer; exports.buildSafeTransaction = buildSafeTransaction;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isUnsupportedChainSwitchError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GKC22JC4.mjs";
|
|
4
4
|
import {
|
|
5
5
|
SUPPORTED_CHAINS,
|
|
6
6
|
getChainName
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WJX3TJFK.mjs";
|
|
8
8
|
|
|
9
9
|
// src/core/reown.tsx
|
|
10
10
|
import { useState } from "react";
|
|
@@ -33,7 +33,12 @@ import {
|
|
|
33
33
|
base,
|
|
34
34
|
bsc,
|
|
35
35
|
soneium,
|
|
36
|
-
plasma
|
|
36
|
+
plasma,
|
|
37
|
+
gnosis,
|
|
38
|
+
sonic,
|
|
39
|
+
monad,
|
|
40
|
+
unichain,
|
|
41
|
+
katana
|
|
37
42
|
} from "@reown/appkit/networks";
|
|
38
43
|
var APPKIT_NETWORK_BY_ID = {
|
|
39
44
|
[mainnet.id]: mainnet,
|
|
@@ -43,7 +48,12 @@ var APPKIT_NETWORK_BY_ID = {
|
|
|
43
48
|
[base.id]: base,
|
|
44
49
|
[bsc.id]: bsc,
|
|
45
50
|
[soneium.id]: soneium,
|
|
46
|
-
[plasma.id]: plasma
|
|
51
|
+
[plasma.id]: plasma,
|
|
52
|
+
[gnosis.id]: gnosis,
|
|
53
|
+
[sonic.id]: sonic,
|
|
54
|
+
[monad.id]: monad,
|
|
55
|
+
[unichain.id]: unichain,
|
|
56
|
+
[katana.id]: katana
|
|
47
57
|
};
|
|
48
58
|
var EVM_NETWORKS = SUPPORTED_CHAINS.map((chain) => {
|
|
49
59
|
const network = APPKIT_NETWORK_BY_ID[chain.id];
|
|
@@ -14,23 +14,28 @@ import {
|
|
|
14
14
|
WalletIcon,
|
|
15
15
|
accountFromPrivateKey,
|
|
16
16
|
applyTheme,
|
|
17
|
-
buildSafeTransaction,
|
|
18
17
|
buildSessionDetails,
|
|
19
18
|
createDepositService,
|
|
20
19
|
createSessionOwnerKey,
|
|
21
20
|
currencyFormatter,
|
|
22
21
|
debugError,
|
|
23
22
|
debugLog,
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
formatReceiveEstimate,
|
|
24
|
+
formatTokenAmount,
|
|
26
25
|
formatUserError,
|
|
27
26
|
getAssetId,
|
|
28
27
|
getPublicClient,
|
|
29
28
|
isNativeAsset,
|
|
30
29
|
loadSessionOwnerFromStorage,
|
|
31
30
|
saveSessionOwnerToStorage,
|
|
32
|
-
useLatestRef
|
|
33
|
-
|
|
31
|
+
useLatestRef,
|
|
32
|
+
useTokenPrices
|
|
33
|
+
} from "./chunk-GKC22JC4.mjs";
|
|
34
|
+
import {
|
|
35
|
+
buildSafeTransaction,
|
|
36
|
+
executeSafeErc20Transfer,
|
|
37
|
+
executeSafeEthTransfer
|
|
38
|
+
} from "./chunk-F7P4MV72.mjs";
|
|
34
39
|
import {
|
|
35
40
|
DEFAULT_BACKEND_URL,
|
|
36
41
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -44,7 +49,7 @@ import {
|
|
|
44
49
|
getTokenIcon,
|
|
45
50
|
getTokenSymbol,
|
|
46
51
|
toEvmCaip2
|
|
47
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-WJX3TJFK.mjs";
|
|
48
53
|
|
|
49
54
|
// src/WithdrawModal.tsx
|
|
50
55
|
import {
|
|
@@ -666,6 +671,7 @@ function WithdrawReviewStep({
|
|
|
666
671
|
estimatedTime = "< 1 min",
|
|
667
672
|
registrationPending = false,
|
|
668
673
|
registrationError = null,
|
|
674
|
+
service,
|
|
669
675
|
onConfirm,
|
|
670
676
|
onError
|
|
671
677
|
}) {
|
|
@@ -678,6 +684,16 @@ function WithdrawReviewStep({
|
|
|
678
684
|
const targetChainIcon = getChainIcon(targetChain);
|
|
679
685
|
const sourceTokenIcon = getTokenIcon(sourceSymbol);
|
|
680
686
|
const targetTokenIcon = getTokenIcon(targetSymbol);
|
|
687
|
+
const amountNumber = Number(amount);
|
|
688
|
+
const formattedSendAmount = formatTokenAmount(amountNumber, sourceSymbol) ?? amount;
|
|
689
|
+
const prices = useTokenPrices(service, [sourceSymbol, targetSymbol]);
|
|
690
|
+
const receiveDisplay = formatReceiveEstimate({
|
|
691
|
+
sourceAmount: Number.isFinite(amountNumber) ? amountNumber : void 0,
|
|
692
|
+
sourceSymbol,
|
|
693
|
+
targetSymbol,
|
|
694
|
+
prices
|
|
695
|
+
}) ?? // No price for the target token — an honest dash beats a wrong number.
|
|
696
|
+
"\u2014";
|
|
681
697
|
const handleConfirm = async () => {
|
|
682
698
|
setError(null);
|
|
683
699
|
setIsSubmitting(true);
|
|
@@ -707,7 +723,7 @@ function WithdrawReviewStep({
|
|
|
707
723
|
/* @__PURE__ */ jsx2("span", { children: "You send" }),
|
|
708
724
|
/* @__PURE__ */ jsxs2("span", { className: "rs-review-detail-value", children: [
|
|
709
725
|
/* @__PURE__ */ jsxs2("span", { children: [
|
|
710
|
-
|
|
726
|
+
formattedSendAmount,
|
|
711
727
|
" ",
|
|
712
728
|
sourceSymbol
|
|
713
729
|
] }),
|
|
@@ -728,11 +744,7 @@ function WithdrawReviewStep({
|
|
|
728
744
|
/* @__PURE__ */ jsxs2("div", { className: "rs-review-detail-row", children: [
|
|
729
745
|
/* @__PURE__ */ jsx2("span", { children: "Receive" }),
|
|
730
746
|
/* @__PURE__ */ jsxs2("span", { className: "rs-review-detail-value", children: [
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
-
amount,
|
|
733
|
-
" ",
|
|
734
|
-
targetSymbol
|
|
735
|
-
] }),
|
|
747
|
+
/* @__PURE__ */ jsx2("span", { children: receiveDisplay }),
|
|
736
748
|
targetTokenIcon && /* @__PURE__ */ jsx2("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx2("img", { src: targetTokenIcon, alt: "" }) })
|
|
737
749
|
] })
|
|
738
750
|
] }),
|
|
@@ -1454,6 +1466,7 @@ function WithdrawFlow({
|
|
|
1454
1466
|
targetToken,
|
|
1455
1467
|
amount: storeApi.getState().amount ?? "0",
|
|
1456
1468
|
recipient: storeApi.getState().recipient ?? recipientForRegistration ?? "0x0",
|
|
1469
|
+
service,
|
|
1457
1470
|
registrationPending: registration.kind === "pending" || registration.kind === "stale",
|
|
1458
1471
|
registrationError: registration.kind === "failed" ? registration.error : null,
|
|
1459
1472
|
onConfirm: handleReviewConfirm,
|
|
@@ -1469,7 +1482,9 @@ function WithdrawFlow({
|
|
|
1469
1482
|
sourceToken,
|
|
1470
1483
|
targetChain,
|
|
1471
1484
|
targetToken,
|
|
1472
|
-
amount: storeApi.getState().amount ?? "0",
|
|
1485
|
+
amount: toBaseUnits(storeApi.getState().amount ?? "0", asset.decimals),
|
|
1486
|
+
sourceSymbol: asset.symbol,
|
|
1487
|
+
sourceDecimals: asset.decimals,
|
|
1473
1488
|
directTransfer: isSameRoute,
|
|
1474
1489
|
service,
|
|
1475
1490
|
flowLabel: "withdraw",
|
|
@@ -1483,6 +1498,13 @@ function WithdrawFlow({
|
|
|
1483
1498
|
)
|
|
1484
1499
|
] });
|
|
1485
1500
|
}
|
|
1501
|
+
function toBaseUnits(amount, decimals) {
|
|
1502
|
+
try {
|
|
1503
|
+
return parseUnits2(amount, decimals).toString();
|
|
1504
|
+
} catch {
|
|
1505
|
+
return "0";
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1486
1508
|
function deriveStepView(step, _registration) {
|
|
1487
1509
|
if (step === "review") return "review";
|
|
1488
1510
|
if (step === "processing" || step === "complete" || step === "failed") {
|
|
@@ -1494,7 +1516,7 @@ function deriveStepView(step, _registration) {
|
|
|
1494
1516
|
// src/WithdrawModal.tsx
|
|
1495
1517
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1496
1518
|
var ReownWithdrawInner = lazy(
|
|
1497
|
-
() => import("./WithdrawModalReown-
|
|
1519
|
+
() => import("./WithdrawModalReown-BE23LUMT.mjs").then((m) => ({
|
|
1498
1520
|
default: m.WithdrawModalReown
|
|
1499
1521
|
}))
|
|
1500
1522
|
);
|
|
@@ -65,13 +65,15 @@ import {
|
|
|
65
65
|
bsc,
|
|
66
66
|
gnosis,
|
|
67
67
|
hyperliquid,
|
|
68
|
+
katana,
|
|
68
69
|
mainnet,
|
|
69
70
|
monad,
|
|
70
71
|
optimism,
|
|
71
72
|
plasma,
|
|
72
73
|
polygon,
|
|
73
74
|
sonic,
|
|
74
|
-
soneium
|
|
75
|
+
soneium,
|
|
76
|
+
unichain
|
|
75
77
|
} from "viem/chains";
|
|
76
78
|
var CHAIN_ICONS = {
|
|
77
79
|
[mainnet.id]: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%2224%2031%2040%2040%22%20fill%3D%22none%22%3E%3Ccircle%20cx%3D%2244%22%20cy%3D%2251%22%20r%3D%2220%22%20fill%3D%22%23627EEA%22%2F%3E%3Cpath%20d%3D%22M43.9834%2038V47.4455L51.9664%2051.0132L43.9834%2038Z%22%20fill%3D%22white%22%20fill-opacity%3D%220.602%22%2F%3E%3Cpath%20d%3D%22M43.983%2038L36%2051.0132L43.983%2047.4455V38Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M43.9834%2057.1333V63.5514L51.9711%2052.499L43.9834%2057.1333Z%22%20fill%3D%22white%22%20fill-opacity%3D%220.602%22%2F%3E%3Cpath%20d%3D%22M43.983%2063.5514V57.1333L36%2052.499L43.983%2063.5514Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M43.9834%2055.6472L51.9664%2051.013L43.9834%2047.4453V55.6472Z%22%20fill%3D%22white%22%20fill-opacity%3D%220.2%22%2F%3E%3Cpath%20d%3D%22M36%2051.013L43.983%2055.6472V47.4453L36%2051.013Z%22%20fill%3D%22white%22%20fill-opacity%3D%220.602%22%2F%3E%3C%2Fsvg%3E",
|
|
@@ -85,7 +87,9 @@ var CHAIN_ICONS = {
|
|
|
85
87
|
[plasma.id]: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%22584%2031%2040%2040%22%20fill%3D%22none%22%3E%3Ccircle%20cx%3D%22604%22%20cy%3D%2251%22%20r%3D%2220%22%20fill%3D%22%23162F29%22%2F%3E%3Cpath%20d%3D%22M615.289%2051.2043C615.289%2051.3173%20615.288%2051.4303%20615.284%2051.5433H609.864V51.2963H604.647C604.647%2051.2447%20604.648%2051.193%20604.648%2051.143C604.648%2051.0929%20604.648%2051.0397%20604.647%2050.9896H609.864V50.7442H615.28C615.286%2050.8976%20615.289%2051.051%20615.289%2051.2043ZM604.555%2050.0921L609.66%2049.4642L609.691%2049.7095L615.083%2049.0461C615.031%2048.7813%20614.969%2048.5199%20614.9%2048.2632L609.593%2048.917L609.623%2049.1623L604.493%2049.7935C604.516%2049.8936%20604.537%2049.9936%20604.555%2050.0953V50.0921ZM604.288%2049.1042L609.168%2047.8855L609.228%2048.1244L614.406%2046.8314C614.3%2046.5812%20614.185%2046.3342%20614.062%2046.0937L609.036%2047.3495L609.095%2047.5885L604.175%2048.8185C604.216%2048.9137%20604.253%2049.009%20604.288%2049.1058V49.1042ZM603.856%2048.1793L608.417%2046.4569L608.505%2046.6877L613.331%2044.8653C613.175%2044.636%20613.01%2044.4133%20612.836%2044.197L608.222%2045.9387L608.309%2046.1695L603.693%2047.9129C603.749%2048.0001%20603.804%2048.0889%20603.856%2048.1793ZM603.257%2047.3237L607.286%2045.2236L607.399%2045.4431L611.854%2043.1203C611.649%2042.9217%20611.436%2042.7329%20611.216%2042.5505L607.029%2044.7329L607.142%2044.9524L603.045%2047.088C603.116%2047.1655%20603.187%2047.243%20603.255%2047.3237H603.257ZM602.285%2046.4004L605.933%2044.0807L606.066%2044.289L610.091%2041.7288C609.838%2041.5674%20609.58%2041.4173%20609.313%2041.2769L605.638%2043.6142L605.77%2043.8225L602.017%2046.2083C602.109%2046.2696%20602.198%2046.3342%20602.287%2046.4004H602.285ZM601.423%2045.8612L604.48%2043.3543L604.637%2043.5448L608.08%2040.7199C607.788%2040.6086%20607.488%2040.5085%20607.184%2040.4213L604.13%2042.9266L604.287%2043.117L601.118%2045.716C601.221%2045.7611%20601.323%2045.8096%20601.423%2045.8612ZM600.282%2045.4173L602.697%2043.0137L602.869%2043.1881L605.938%2040.1388C605.605%2040.0839%20605.268%2040.0436%20604.926%2040.0178L602.309%2042.6215L602.482%2042.7958L599.932%2045.3334C600.049%2045.3576%20600.165%2045.385%20600.282%2045.4173ZM598.947%2045.2156L600.873%2042.8814L601.063%2043.038L603.57%2040C603.189%2040.0178%20602.813%2040.0549%20602.443%2040.1098L600.446%2042.5295L600.637%2042.6861L598.551%2045.2139C598.609%2045.2123%20598.669%2045.2107%20598.727%2045.2107C598.801%2045.2107%20598.874%2045.2107%20598.947%2045.2139V45.2156ZM597.793%2045.285L599.276%2042.9895L599.483%2043.1235L601.276%2040.3471C600.866%2040.4536%20600.466%2040.5827%20600.075%2040.7329L598.813%2042.6877L599.019%2042.8217L597.376%2045.3657C597.513%2045.3334%20597.652%2045.3059%20597.793%2045.2833V45.285ZM596.511%2045.6417L597.578%2043.6417L597.794%2043.7579L599.207%2041.1122C598.753%2041.3333%20598.317%2041.5836%20597.901%2041.8612L597.089%2043.3818L597.307%2043.498L596.051%2045.8516C596.199%2045.7757%20596.353%2045.7063%20596.509%2045.6433L596.511%2045.6417ZM595.591%2046.1114L596.044%2044.8233L596.277%2044.9056L597.158%2042.4036C596.711%2042.7587%20596.291%2043.1461%20595.902%2043.5642L595.523%2044.6409L595.755%2044.7232L595.161%2046.4085C595.3%2046.3035%20595.442%2046.2051%20595.589%2046.113L595.591%2046.1114ZM594.459%2047.0332L594.659%2046.0969L594.9%2046.1486L595.304%2044.2632C594.879%2044.8023%20594.503%2045.3818%20594.182%2045.9936L594.361%2046.0323L593.993%2047.582C594.136%2047.3899%20594.293%2047.2059%20594.459%2047.0332ZM593.628%2048.1276V46.8879C593.328%2047.6805%20593.115%2048.6668%20593%2049.6337C593.14%2049.0977%20593.354%2048.5925%20593.628%2048.1276ZM593.008%2052.6845C593.126%2053.5094%20593.333%2054.3052%20593.62%2055.0623V54.147C593.355%2053.695%20593.147%2053.2043%20593.008%2052.6845ZM594.031%2054.7588L594.353%2056.2568L594.174%2056.2956C594.495%2056.909%20594.871%2057.487%20595.295%2058.0259L594.892%2056.1407L594.651%2056.1922L594.448%2055.2447C594.301%2055.0898%20594.161%2054.9283%20594.031%2054.7572V54.7588ZM595.15%2055.8726L595.747%2057.5676L595.515%2057.6499L595.894%2058.7267C596.283%2059.1446%20596.703%2059.532%20597.15%2059.8873L596.269%2057.3851L596.036%2057.4676L595.581%2056.1728C595.434%2056.0792%20595.291%2055.9809%20595.152%2055.8759L595.15%2055.8726ZM596.041%2056.4327L597.3%2058.7927L597.082%2058.909L597.894%2060.4296C598.311%2060.7073%20598.747%2060.9574%20599.2%2061.1785L597.788%2058.5328L597.57%2058.6491L596.5%2056.6442C596.343%2056.5814%20596.19%2056.5102%20596.04%2056.4345L596.041%2056.4327ZM597.366%2056.9204L599.011%2059.4676L598.805%2059.6015L600.067%2061.5563C600.458%2061.7065%20600.858%2061.8356%20601.268%2061.9421L599.475%2059.1656L599.268%2059.2995L597.783%2057.0011C597.642%2056.9783%20597.502%2056.9509%20597.365%2056.9186L597.366%2056.9204ZM598.542%2057.0753L600.627%2059.6031L600.437%2059.7598L602.434%2062.1795C602.803%2062.2343%20603.179%2062.2713%20603.56%2062.2892L601.053%2059.2496L600.863%2059.4061L598.937%2057.0719C598.868%2057.0753%20598.797%2057.0753%20598.726%2057.0753C598.664%2057.0753%20598.601%2057.0753%20598.54%2057.0719L598.542%2057.0753ZM599.925%2056.9558L602.474%2059.4916L602.301%2059.6659L604.918%2062.2698C605.26%2062.2439%20605.597%2062.2036%20605.93%2062.1487L602.863%2059.0978L602.689%2059.2739L600.275%2056.8718C600.161%2056.9025%20600.043%2056.9315%20599.925%2056.9558ZM601.113%2056.5764L604.279%2059.1738L604.122%2059.3642L607.176%2061.8695C607.479%2061.7823%20607.78%2061.6822%20608.072%2061.5708L604.627%2058.7459L604.471%2058.9364L601.417%2056.4311C601.316%2056.4828%20601.215%2056.5312%20601.111%2056.5764H601.113ZM602.011%2056.0825L605.759%2058.4668L605.626%2058.675L609.302%2061.0122C609.568%2060.8718%20609.828%2060.7202%20610.08%2060.5604L606.054%2058.0003L605.922%2058.2085L602.278%2055.8919C602.19%2055.9581%20602.101%2056.0228%20602.009%2056.0841L602.011%2056.0825ZM603.044%2055.2043L607.136%2057.3367L607.023%2057.5563L611.21%2059.7386C611.43%2059.5563%20611.643%2059.3675%20611.848%2059.1689L607.392%2056.8459L607.279%2057.0655L603.255%2054.9687C603.187%2055.0494%20603.118%2055.1285%20603.045%2055.2043H603.044ZM603.691%2054.3779L608.301%2056.1195L608.214%2056.3504L612.827%2058.0921C613%2057.8759%20613.165%2057.653%20613.323%2057.4239L608.497%2055.6015L608.409%2055.8322L603.854%2054.1115C603.802%2054.2019%20603.748%2054.2907%20603.691%2054.3779ZM604.174%2053.4739L609.086%2054.7007L609.026%2054.9395L614.053%2056.1955C614.177%2055.955%20614.292%2055.7081%20614.398%2055.4578L609.22%2054.1648L609.16%2054.4037L604.287%2053.1866C604.251%2053.2834%20604.212%2053.3787%20604.174%2053.4739ZM604.493%2052.4989L609.615%2053.1284L609.584%2053.3738L614.892%2054.0276C614.962%2053.7693%20615.023%2053.5078%20615.074%2053.2447L609.683%2052.5812L609.652%2052.8266L604.555%2052.1987C604.537%2052.3004%20604.516%2052.4004%20604.493%2052.5005V52.4989Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E",
|
|
86
88
|
[gnosis.id]: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%22654%2031%2040%2040%22%20fill%3D%22none%22%3E%3Ccircle%20cx%3D%22674%22%20cy%3D%2251%22%20r%3D%2220%22%20fill%3D%22%2300193C%22%2F%3E%3Cpath%20d%3D%22M668.389%2052.8873C669.173%2052.8879%20669.934%2052.6275%20670.553%2052.1472L665.589%2047.1836C665.184%2047.7072%20664.934%2048.3338%20664.868%2048.9923C664.801%2049.6507%20664.92%2050.3147%20665.212%2050.9089C665.503%2051.503%20665.956%2052.0036%20666.517%2052.3537C667.079%2052.7039%20667.727%2052.8896%20668.389%2052.8899V52.8873Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M683.153%2049.3453C683.153%2048.5619%20682.893%2047.8006%20682.413%2047.1816L677.446%2052.1453C677.97%2052.5503%20678.596%2052.8005%20679.255%2052.8673C679.914%2052.9341%20680.578%2052.815%20681.172%2052.5234C681.766%2052.2318%20682.267%2051.7794%20682.617%2051.2177C682.967%2050.6559%20683.153%2050.0072%20683.153%2049.3453Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M685.649%2043.9453L683.452%2046.142C684.253%2047.1007%20684.667%2048.3245%20684.611%2049.5727C684.555%2050.8208%20684.035%2052.003%20683.151%2052.8865C682.268%2053.77%20681.086%2054.2909%20679.838%2054.3466C678.589%2054.4024%20677.366%2053.989%20676.407%2053.1879L674%2055.5939L671.593%2053.1879C670.635%2053.989%20669.411%2054.4024%20668.163%2054.3466C666.914%2054.2909%20665.732%2053.77%20664.849%2052.8865C663.965%2052.003%20663.445%2050.8208%20663.389%2049.5727C663.333%2048.3245%20663.747%2047.1007%20664.548%2046.142L663.419%2045.0131L662.355%2043.9453C661.062%2046.0714%20660.379%2048.5124%20660.382%2051.0007C660.382%2058.5219%20666.479%2064.6189%20674%2064.6189C681.521%2064.6189%20687.618%2058.5219%20687.618%2051.0007C687.622%2048.5127%20686.94%2046.0718%20685.649%2043.9453Z%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M683.853%2041.6017C682.581%2040.2681%20681.053%2039.2065%20679.359%2038.4812C677.665%2037.7558%20675.842%2037.3818%20674%2037.3818C672.157%2037.3818%20670.334%2037.7558%20668.641%2038.4812C666.947%2039.2065%20665.418%2040.2681%20664.147%2041.6017C663.809%2041.9559%20663.491%2042.3278%20663.192%2042.716L674%2053.524L684.808%2042.716C684.509%2042.3278%20684.191%2041.9558%20683.853%2041.6017ZM674%2039.1638C677.185%2039.1638%20680.146%2040.3926%20682.372%2042.6313L674%2051.004L665.627%2042.6313C667.854%2040.3926%20670.818%2039.1638%20674%2039.1638Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E",
|
|
87
89
|
[hyperliquid.id]: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%22724%2031%2040%2040%22%20fill%3D%22none%22%3E%3Ccircle%20cx%3D%22744%22%20cy%3D%2251%22%20r%3D%2220%22%20fill%3D%22white%22%2F%3E%3Cpath%20d%3D%22M757.527%2050.8739C757.527%2059.7716%20752.052%2062.6267%20749.168%2060.0846C746.794%2058.0117%20746.087%2053.6312%20742.516%2053.1815C737.984%2052.6144%20737.591%2058.618%20734.609%2058.618C731.136%2058.618%20730.468%2053.5921%20730.468%2051.0109C730.468%2048.3707%20731.214%2044.7725%20734.177%2044.7725C737.63%2044.7725%20737.827%2049.9157%20742.143%2049.6419C746.441%2049.3486%20746.519%2043.9904%20749.306%2041.7023C751.739%2039.7272%20757.527%2041.8588%20757.527%2050.8739Z%22%20fill%3D%22%23072723%22%2F%3E%3C%2Fsvg%3E",
|
|
88
|
-
[monad.id]: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%22794%2031%2040%2040%22%20fill%3D%22none%22%3E%3Ccircle%20cx%3D%22814%22%20cy%3D%2251%22%20r%3D%2220%22%20fill%3D%22%236E54FF%22%2F%3E%3Cpath%20d%3D%22M814%2037.25C810.029%2037.25%20800.25%2047.029%20800.25%2050.9999C800.25%2054.9709%20810.029%2064.75%20814%2064.75C817.971%2064.75%20827.75%2054.9706%20827.75%2050.9999C827.75%2047.0293%20817.971%2037.25%20814%2037.25ZM811.857%2058.8626C810.183%2058.4064%20805.681%2050.5316%20806.137%2048.8573C806.594%2047.1827%20814.468%2042.6811%20816.143%2043.1374C817.817%2043.5936%20822.319%2051.4682%20821.863%2053.1427C821.406%2054.8172%20813.532%2059.3189%20811.857%2058.8626Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E"
|
|
90
|
+
[monad.id]: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%22794%2031%2040%2040%22%20fill%3D%22none%22%3E%3Ccircle%20cx%3D%22814%22%20cy%3D%2251%22%20r%3D%2220%22%20fill%3D%22%236E54FF%22%2F%3E%3Cpath%20d%3D%22M814%2037.25C810.029%2037.25%20800.25%2047.029%20800.25%2050.9999C800.25%2054.9709%20810.029%2064.75%20814%2064.75C817.971%2064.75%20827.75%2054.9706%20827.75%2050.9999C827.75%2047.0293%20817.971%2037.25%20814%2037.25ZM811.857%2058.8626C810.183%2058.4064%20805.681%2050.5316%20806.137%2048.8573C806.594%2047.1827%20814.468%2042.6811%20816.143%2043.1374C817.817%2043.5936%20822.319%2051.4682%20821.863%2053.1427C821.406%2054.8172%20813.532%2059.3189%20811.857%2058.8626Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E",
|
|
91
|
+
[unichain.id]: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2212%22%20fill%3D%22%23F50DB4%22%2F%3E%3Cpath%20d%3D%22M20%2011.8478C15.6637%2011.8478%2012.1523%208.33274%2012.1523%204H11.8478V11.8478H4V12.1522C8.33628%2012.1522%2011.8478%2015.6673%2011.8478%2020H12.1523V12.1522H20V11.8478Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E",
|
|
92
|
+
[katana.id]: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22katana-grad%22%20x1%3D%2212%22%20y1%3D%220%22%20x2%3D%2212%22%20y2%3D%2224%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20offset%3D%220.09%22%20stop-color%3D%22%23101631%22%2F%3E%3Cstop%20offset%3D%220.557692%22%20stop-color%3D%22%230441B2%22%2F%3E%3Cstop%20offset%3D%220.813935%22%20stop-color%3D%22%23019EED%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23C5EAFC%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2212%22%20fill%3D%22url(%23katana-grad)%22%2F%3E%3Cpath%20d%3D%22M10.7916%209.57541L13.9865%204H17.1816L14.7853%2011.9801H12.4093L18.7994%2015.1721L15.5844%2020L10.7916%2014.3881V18.3641H5.2002L7.11722%2011.9801H5.2002L7.59649%204H10.7916V9.57541Z%22%20fill%3D%22%23F6FF0D%22%2F%3E%3C%2Fsvg%3E"
|
|
89
93
|
};
|
|
90
94
|
var TOKEN_ICONS = {
|
|
91
95
|
USDC: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2000 2000'%3E%3Cpath d='M1000 2000c554.17 0 1000-445.83 1000-1000S1554.17 0 1000 0 0 445.83 0 1000s445.83 1000 1000 1000z' fill='%232775ca'/%3E%3Cpath d='M1275 1158.33c0-145.83-87.5-195.83-262.5-216.66-125-16.67-150-50-150-108.34s41.67-95.83 125-95.83c75 0 116.67 25 137.5 87.5 4.17 12.5 16.67 20.83 29.17 20.83h66.66c16.67 0 29.17-12.5 29.17-29.16v-4.17c-16.67-91.67-91.67-162.5-187.5-170.83v-100c0-16.67-12.5-29.17-33.33-33.34h-62.5c-16.67 0-29.17 12.5-33.34 33.34v95.83c-125 16.67-204.16 100-204.16 204.17 0 137.5 83.33 191.66 258.33 212.5 116.67 20.83 154.17 45.83 154.17 112.5s-58.34 112.5-137.5 112.5c-108.34 0-145.84-45.84-158.34-108.34-4.16-16.66-16.66-25-29.16-25h-70.84c-16.66 0-29.16 12.5-29.16 29.17v4.17c16.66 104.16 83.33 179.16 220.83 200v100c0 16.66 12.5 29.16 33.33 33.33h62.5c16.67 0 29.17-12.5 33.34-33.33v-100c125-20.84 208.33-108.34 208.33-220.84z' fill='%23fff'/%3E%3Cpath d='M787.5 1595.83c-325-116.66-491.67-479.16-370.83-800 62.5-175 200-308.33 370.83-370.83 16.67-8.33 25-20.83 25-41.67V325c0-16.67-8.33-29.17-25-33.33-4.17 0-12.5 0-16.67 4.16-395.83 125-612.5 545.84-487.5 941.67 75 233.33 254.17 412.5 487.5 487.5 16.67 8.33 33.34 0 37.5-16.67 4.17-4.16 4.17-8.33 4.17-16.66v-58.34c0-12.5-12.5-29.16-25-37.5zm441.67-1300c-16.67-8.33-33.34 0-37.5 16.67-4.17 4.17-4.17 8.33-4.17 16.67v58.33c0 16.67 12.5 33.33 25 41.67 325 116.66 491.67 479.16 370.83 800-62.5 175-200 308.33-370.83 370.83-16.67 8.33-25 20.83-25 41.67V1700c0 16.67 8.33 29.17 25 33.33 4.17 0 12.5 0 16.67-4.16 395.83-125 612.5-545.84 487.5-941.67-75-237.5-258.34-416.67-487.5-491.67z' fill='%23fff'/%3E%3C/svg%3E",
|
|
@@ -117,13 +121,15 @@ import {
|
|
|
117
121
|
bsc as bsc2,
|
|
118
122
|
gnosis as gnosis2,
|
|
119
123
|
hyperliquid as hyperliquid2,
|
|
124
|
+
katana as katana2,
|
|
120
125
|
mainnet as mainnet2,
|
|
121
126
|
monad as monad2,
|
|
122
127
|
optimism as optimism2,
|
|
123
128
|
plasma as plasma2,
|
|
124
129
|
polygon as polygon2,
|
|
125
130
|
sonic as sonic2,
|
|
126
|
-
soneium as soneium2
|
|
131
|
+
soneium as soneium2,
|
|
132
|
+
unichain as unichain2
|
|
127
133
|
} from "viem/chains";
|
|
128
134
|
var DEFAULT_BACKEND_URL = "https://v1.orchestrator.rhinestone.dev/deposit-widget";
|
|
129
135
|
var DEFAULT_SIGNER_ADDRESS = "0x177bfcdd15bc01e99013dcc5d2b09cd87a18ce9c";
|
|
@@ -136,14 +142,49 @@ var ALL_CHAINS_BY_ID = {
|
|
|
136
142
|
[polygon2.id]: polygon2,
|
|
137
143
|
[bsc2.id]: bsc2,
|
|
138
144
|
[plasma2.id]: plasma2,
|
|
139
|
-
[soneium2.id]: soneium2
|
|
145
|
+
[soneium2.id]: soneium2,
|
|
146
|
+
[gnosis2.id]: gnosis2,
|
|
147
|
+
[sonic2.id]: sonic2,
|
|
148
|
+
[monad2.id]: monad2,
|
|
149
|
+
[unichain2.id]: unichain2,
|
|
150
|
+
[katana2.id]: katana2
|
|
140
151
|
};
|
|
141
152
|
var SUPPORTED_TOKEN_MATRIX = {
|
|
142
|
-
ETH: [
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
153
|
+
ETH: [
|
|
154
|
+
mainnet2.id,
|
|
155
|
+
base2.id,
|
|
156
|
+
arbitrum2.id,
|
|
157
|
+
optimism2.id,
|
|
158
|
+
polygon2.id,
|
|
159
|
+
soneium2.id,
|
|
160
|
+
unichain2.id,
|
|
161
|
+
katana2.id
|
|
162
|
+
],
|
|
163
|
+
WETH: [
|
|
164
|
+
mainnet2.id,
|
|
165
|
+
base2.id,
|
|
166
|
+
arbitrum2.id,
|
|
167
|
+
optimism2.id,
|
|
168
|
+
polygon2.id,
|
|
169
|
+
soneium2.id,
|
|
170
|
+
unichain2.id,
|
|
171
|
+
katana2.id
|
|
172
|
+
],
|
|
173
|
+
USDC: [
|
|
174
|
+
mainnet2.id,
|
|
175
|
+
base2.id,
|
|
176
|
+
arbitrum2.id,
|
|
177
|
+
optimism2.id,
|
|
178
|
+
polygon2.id,
|
|
179
|
+
soneium2.id,
|
|
180
|
+
gnosis2.id,
|
|
181
|
+
sonic2.id,
|
|
182
|
+
monad2.id,
|
|
183
|
+
unichain2.id,
|
|
184
|
+
katana2.id
|
|
185
|
+
],
|
|
186
|
+
USDT: [mainnet2.id, bsc2.id, soneium2.id, katana2.id],
|
|
187
|
+
USDT0: [arbitrum2.id, optimism2.id, polygon2.id, plasma2.id, monad2.id, unichain2.id]
|
|
147
188
|
};
|
|
148
189
|
var CHAIN_DISPLAY_ORDER = [
|
|
149
190
|
mainnet2.id,
|
|
@@ -153,7 +194,12 @@ var CHAIN_DISPLAY_ORDER = [
|
|
|
153
194
|
polygon2.id,
|
|
154
195
|
bsc2.id,
|
|
155
196
|
plasma2.id,
|
|
156
|
-
soneium2.id
|
|
197
|
+
soneium2.id,
|
|
198
|
+
gnosis2.id,
|
|
199
|
+
sonic2.id,
|
|
200
|
+
monad2.id,
|
|
201
|
+
unichain2.id,
|
|
202
|
+
katana2.id
|
|
157
203
|
];
|
|
158
204
|
var supportedChainSet = /* @__PURE__ */ new Set();
|
|
159
205
|
for (const chainIds of Object.values(SUPPORTED_TOKEN_MATRIX)) {
|
|
@@ -339,6 +385,83 @@ var chainRegistry = {
|
|
|
339
385
|
}
|
|
340
386
|
]
|
|
341
387
|
},
|
|
388
|
+
[gnosis2.id]: {
|
|
389
|
+
name: gnosis2.name,
|
|
390
|
+
tokens: [
|
|
391
|
+
{
|
|
392
|
+
symbol: "USDC",
|
|
393
|
+
address: "0x2a22f9c3b484c3629090feed35f17ff8f88f76f0",
|
|
394
|
+
decimals: 6
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
},
|
|
398
|
+
[sonic2.id]: {
|
|
399
|
+
name: sonic2.name,
|
|
400
|
+
tokens: [
|
|
401
|
+
{
|
|
402
|
+
symbol: "USDC",
|
|
403
|
+
address: "0x29219dd400f2Bf60E5a23d13Be72B486D4038894",
|
|
404
|
+
decimals: 6
|
|
405
|
+
}
|
|
406
|
+
]
|
|
407
|
+
},
|
|
408
|
+
[monad2.id]: {
|
|
409
|
+
name: monad2.name,
|
|
410
|
+
tokens: [
|
|
411
|
+
{
|
|
412
|
+
symbol: "USDC",
|
|
413
|
+
address: "0x754704Bc059F8C67012fEd69BC8A327a5aafb603",
|
|
414
|
+
decimals: 6
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
symbol: "USDT0",
|
|
418
|
+
address: "0xe7cd86e13AC4309349F30B3435a9d337750fC82D",
|
|
419
|
+
decimals: 6
|
|
420
|
+
}
|
|
421
|
+
]
|
|
422
|
+
},
|
|
423
|
+
[unichain2.id]: {
|
|
424
|
+
name: unichain2.name,
|
|
425
|
+
tokens: [
|
|
426
|
+
{ symbol: "ETH", address: NATIVE_TOKEN_ADDRESS, decimals: 18 },
|
|
427
|
+
{
|
|
428
|
+
symbol: "USDC",
|
|
429
|
+
address: "0x078d782b760474a361dda0af3839290b0ef57ad6",
|
|
430
|
+
decimals: 6
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
symbol: "WETH",
|
|
434
|
+
address: "0x4200000000000000000000000000000000000006",
|
|
435
|
+
decimals: 18
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
symbol: "USDT0",
|
|
439
|
+
address: "0x9151434b16b9763660705744891fA906F660EcC5",
|
|
440
|
+
decimals: 6
|
|
441
|
+
}
|
|
442
|
+
]
|
|
443
|
+
},
|
|
444
|
+
[katana2.id]: {
|
|
445
|
+
name: katana2.name,
|
|
446
|
+
tokens: [
|
|
447
|
+
{ symbol: "ETH", address: NATIVE_TOKEN_ADDRESS, decimals: 18 },
|
|
448
|
+
{
|
|
449
|
+
symbol: "USDC",
|
|
450
|
+
address: "0x203a662b0bd271a6ed5a60edfbd04bfce608fd36",
|
|
451
|
+
decimals: 6
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
symbol: "USDT",
|
|
455
|
+
address: "0x2dca96907fde857dd3d816880a0df407eeb2d2f2",
|
|
456
|
+
decimals: 6
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
symbol: "WETH",
|
|
460
|
+
address: "0xEE7D8BCFb72bC1880D0Cf19822eB0A2e6577aB62",
|
|
461
|
+
decimals: 18
|
|
462
|
+
}
|
|
463
|
+
]
|
|
464
|
+
},
|
|
342
465
|
// HyperCore (virtual chain 1337) is a USDC-only deposit *destination*. It has
|
|
343
466
|
// no viem chain / RPC, so it lives only here for name + token resolution —
|
|
344
467
|
// deliberately absent from the source-chain matrices above.
|
|
@@ -525,6 +648,8 @@ var CHAIN_BADGES = {
|
|
|
525
648
|
[gnosis2.id]: { shortLabel: "Gnosis", color: "#3E6957", bg: "#E5F0EB" },
|
|
526
649
|
[hyperliquid2.id]: { shortLabel: "Hyper", color: "#5BE7C4", bg: "#E5FFF8" },
|
|
527
650
|
[monad2.id]: { shortLabel: "Monad", color: "#6E54FF", bg: "#EEEBFF" },
|
|
651
|
+
[unichain2.id]: { shortLabel: "Uni", color: "#F50DB4", bg: "#FFE5F5" },
|
|
652
|
+
[katana2.id]: { shortLabel: "Katana", color: "#0441B2", bg: "#E5EEFC" },
|
|
528
653
|
[HYPERCORE_CHAIN_ID]: {
|
|
529
654
|
shortLabel: "HyperCore",
|
|
530
655
|
color: "#5BE7C4",
|