@rhinestone/deposit-modal 0.3.0-alpha.9 → 0.3.1
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/README.md +76 -0
- package/dist/{DepositModalReown-I7I3KLD2.mjs → DepositModalReown-G7UX4IBZ.mjs} +6 -4
- package/dist/{DepositModalReown-XUA47RYZ.cjs → DepositModalReown-MECHBE6P.cjs} +9 -7
- package/dist/{QRCode-KG47KTGX.cjs → QRCode-5DXFNKI2.cjs} +1 -1
- package/dist/{QRCode-YJ3EGWQS.mjs → QRCode-WUC652SH.mjs} +1 -1
- package/dist/{WithdrawModalReown-KN2DGOXR.mjs → WithdrawModalReown-CUJAFUQM.mjs} +5 -4
- package/dist/{WithdrawModalReown-JATYMQYP.cjs → WithdrawModalReown-WJ6VBZKK.cjs} +8 -7
- package/dist/{constants-DqVn968d.d.ts → caip-CsslyHGL.d.cts} +11 -1
- package/dist/{constants-DqVn968d.d.cts → caip-CsslyHGL.d.ts} +11 -1
- package/dist/{chunk-TJG2AFPS.mjs → chunk-3C35DVPE.mjs} +1048 -829
- package/dist/{chunk-SZIYS42B.mjs → chunk-6YRDD462.mjs} +63 -3
- package/dist/chunk-AJHFNHG3.cjs +295 -0
- package/dist/chunk-BAEB5AFZ.mjs +212 -0
- package/dist/{chunk-KE4MRCFN.mjs → chunk-DZQD3DAV.mjs} +26 -17
- package/dist/{chunk-G5Q4QBWX.cjs → chunk-LEL6GMEQ.cjs} +111 -102
- package/dist/{chunk-7JIDIX27.cjs → chunk-MILJQWPT.cjs} +73 -13
- package/dist/{chunk-MMXUBBGK.cjs → chunk-MQIJZNTP.cjs} +1026 -807
- package/dist/{chunk-4BUMVXPS.mjs → chunk-QYSCCX4K.mjs} +2237 -871
- package/dist/chunk-R5CPOBCF.cjs +212 -0
- package/dist/{chunk-OISMGA2L.mjs → chunk-R5WDHHVM.mjs} +2 -12
- package/dist/{chunk-ZVG4JDKZ.cjs → chunk-SPUZLWQS.cjs} +2285 -919
- package/dist/chunk-TQ2AYMWS.mjs +295 -0
- package/dist/{chunk-KIPKYPNF.cjs → chunk-ULEAK63T.cjs} +6 -16
- package/dist/constants.cjs +6 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +5 -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 +21 -6
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.mjs +22 -7
- 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 +719 -75
- package/dist/{types-D8Q4TMk7.d.cts → types-RzfAD14B.d.cts} +65 -2
- package/dist/{types-D8Q4TMk7.d.ts → types-RzfAD14B.d.ts} +65 -2
- 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 +55 -18
|
@@ -14,24 +14,25 @@ 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
|
-
executeSafeErc20Transfer,
|
|
25
|
-
executeSafeEthTransfer,
|
|
26
23
|
formatUserError,
|
|
27
24
|
getAssetId,
|
|
28
25
|
getPublicClient,
|
|
29
26
|
isNativeAsset,
|
|
30
27
|
loadSessionOwnerFromStorage,
|
|
31
28
|
saveSessionOwnerToStorage,
|
|
32
|
-
toEvmCaip2,
|
|
33
29
|
useLatestRef
|
|
34
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-3C35DVPE.mjs";
|
|
31
|
+
import {
|
|
32
|
+
buildSafeTransaction,
|
|
33
|
+
executeSafeErc20Transfer,
|
|
34
|
+
executeSafeEthTransfer
|
|
35
|
+
} from "./chunk-TQ2AYMWS.mjs";
|
|
35
36
|
import {
|
|
36
37
|
DEFAULT_BACKEND_URL,
|
|
37
38
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -43,8 +44,9 @@ import {
|
|
|
43
44
|
getSupportedTargetTokens,
|
|
44
45
|
getTokenDecimalsByAddress,
|
|
45
46
|
getTokenIcon,
|
|
46
|
-
getTokenSymbol
|
|
47
|
-
|
|
47
|
+
getTokenSymbol,
|
|
48
|
+
toEvmCaip2
|
|
49
|
+
} from "./chunk-6YRDD462.mjs";
|
|
48
50
|
|
|
49
51
|
// src/WithdrawModal.tsx
|
|
50
52
|
import {
|
|
@@ -60,7 +62,7 @@ import {
|
|
|
60
62
|
// src/WithdrawFlow.tsx
|
|
61
63
|
import { useCallback as useCallback2, useEffect as useEffect2, useMemo as useMemo2, useRef as useRef2, useState as useState3 } from "react";
|
|
62
64
|
|
|
63
|
-
// src/store/withdraw.
|
|
65
|
+
// src/store/withdraw.ts
|
|
64
66
|
import { createContext, createElement, useContext } from "react";
|
|
65
67
|
import { useStore } from "zustand";
|
|
66
68
|
import { createStore } from "zustand/vanilla";
|
|
@@ -398,11 +400,19 @@ function WithdrawFormStep({
|
|
|
398
400
|
/* @__PURE__ */ jsxs("div", { className: "rs-screen-body", children: [
|
|
399
401
|
/* @__PURE__ */ jsx(BodyHeader, { icon: /* @__PURE__ */ jsx(CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
|
|
400
402
|
/* @__PURE__ */ jsxs("div", { className: "rs-withdraw-section", children: [
|
|
401
|
-
/* @__PURE__ */ jsx(
|
|
403
|
+
/* @__PURE__ */ jsx(
|
|
404
|
+
"label",
|
|
405
|
+
{
|
|
406
|
+
className: "rs-withdraw-label",
|
|
407
|
+
htmlFor: "rs-withdraw-recipient",
|
|
408
|
+
children: "Recipient address"
|
|
409
|
+
}
|
|
410
|
+
),
|
|
402
411
|
/* @__PURE__ */ jsxs("div", { className: "rs-withdraw-input-row", children: [
|
|
403
412
|
/* @__PURE__ */ jsx(
|
|
404
413
|
"input",
|
|
405
414
|
{
|
|
415
|
+
id: "rs-withdraw-recipient",
|
|
406
416
|
type: "text",
|
|
407
417
|
className: "rs-withdraw-input rs-withdraw-input--address",
|
|
408
418
|
placeholder: "0x...",
|
|
@@ -442,11 +452,12 @@ function WithdrawFormStep({
|
|
|
442
452
|
] })
|
|
443
453
|
] }),
|
|
444
454
|
/* @__PURE__ */ jsxs("div", { className: "rs-withdraw-section", children: [
|
|
445
|
-
/* @__PURE__ */ jsx("label", { className: "rs-withdraw-label", children: "Amount" }),
|
|
455
|
+
/* @__PURE__ */ jsx("label", { className: "rs-withdraw-label", htmlFor: "rs-withdraw-amount", children: "Amount" }),
|
|
446
456
|
/* @__PURE__ */ jsxs("div", { className: "rs-withdraw-input-row", children: [
|
|
447
457
|
/* @__PURE__ */ jsx(
|
|
448
458
|
"input",
|
|
449
459
|
{
|
|
460
|
+
id: "rs-withdraw-amount",
|
|
450
461
|
type: "text",
|
|
451
462
|
inputMode: "decimal",
|
|
452
463
|
className: "rs-withdraw-input rs-withdraw-input--amount",
|
|
@@ -484,7 +495,7 @@ function WithdrawFormStep({
|
|
|
484
495
|
] }),
|
|
485
496
|
/* @__PURE__ */ jsxs("div", { className: "rs-withdraw-receive-row", children: [
|
|
486
497
|
/* @__PURE__ */ jsxs("div", { className: "rs-withdraw-receive-col", children: [
|
|
487
|
-
/* @__PURE__ */ jsx("
|
|
498
|
+
/* @__PURE__ */ jsx("span", { className: "rs-withdraw-label rs-withdraw-label--sm", children: "Receive chain" }),
|
|
488
499
|
/* @__PURE__ */ jsxs(
|
|
489
500
|
"div",
|
|
490
501
|
{
|
|
@@ -495,6 +506,7 @@ function WithdrawFormStep({
|
|
|
495
506
|
"button",
|
|
496
507
|
{
|
|
497
508
|
type: "button",
|
|
509
|
+
"aria-label": "Receive chain",
|
|
498
510
|
className: "rs-withdraw-dropdown",
|
|
499
511
|
onClick: () => {
|
|
500
512
|
setShowChainDropdown(!showChainDropdown);
|
|
@@ -552,7 +564,7 @@ function WithdrawFormStep({
|
|
|
552
564
|
)
|
|
553
565
|
] }),
|
|
554
566
|
/* @__PURE__ */ jsxs("div", { className: "rs-withdraw-receive-col", children: [
|
|
555
|
-
/* @__PURE__ */ jsx("
|
|
567
|
+
/* @__PURE__ */ jsx("span", { className: "rs-withdraw-label rs-withdraw-label--sm", children: "Receive token" }),
|
|
556
568
|
/* @__PURE__ */ jsxs(
|
|
557
569
|
"div",
|
|
558
570
|
{
|
|
@@ -563,6 +575,7 @@ function WithdrawFormStep({
|
|
|
563
575
|
"button",
|
|
564
576
|
{
|
|
565
577
|
type: "button",
|
|
578
|
+
"aria-label": "Receive token",
|
|
566
579
|
className: "rs-withdraw-dropdown",
|
|
567
580
|
onClick: () => {
|
|
568
581
|
setShowTokenDropdown(!showTokenDropdown);
|
|
@@ -793,7 +806,6 @@ function WithdrawFlow({
|
|
|
793
806
|
signerAddress = DEFAULT_SIGNER_ADDRESS,
|
|
794
807
|
sessionChainIds,
|
|
795
808
|
forceRegister = false,
|
|
796
|
-
waitForFinalTx = true,
|
|
797
809
|
reownWallet,
|
|
798
810
|
onConnect,
|
|
799
811
|
onDisconnect,
|
|
@@ -1461,7 +1473,6 @@ function WithdrawFlow({
|
|
|
1461
1473
|
targetToken,
|
|
1462
1474
|
amount: storeApi.getState().amount ?? "0",
|
|
1463
1475
|
directTransfer: isSameRoute,
|
|
1464
|
-
waitForFinalTx,
|
|
1465
1476
|
service,
|
|
1466
1477
|
flowLabel: "withdraw",
|
|
1467
1478
|
onClose,
|
|
@@ -1485,7 +1496,7 @@ function deriveStepView(step, _registration) {
|
|
|
1485
1496
|
// src/WithdrawModal.tsx
|
|
1486
1497
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1487
1498
|
var ReownWithdrawInner = lazy(
|
|
1488
|
-
() => import("./WithdrawModalReown-
|
|
1499
|
+
() => import("./WithdrawModalReown-CUJAFUQM.mjs").then((m) => ({
|
|
1489
1500
|
default: m.WithdrawModalReown
|
|
1490
1501
|
}))
|
|
1491
1502
|
);
|
|
@@ -1517,7 +1528,6 @@ function WithdrawModalInner({
|
|
|
1517
1528
|
signerAddress = DEFAULT_SIGNER_ADDRESS,
|
|
1518
1529
|
sessionChainIds,
|
|
1519
1530
|
forceRegister = false,
|
|
1520
|
-
waitForFinalTx = true,
|
|
1521
1531
|
reownWallet,
|
|
1522
1532
|
onConnect,
|
|
1523
1533
|
onDisconnect,
|
|
@@ -1622,7 +1632,6 @@ function WithdrawModalInner({
|
|
|
1622
1632
|
signerAddress,
|
|
1623
1633
|
sessionChainIds,
|
|
1624
1634
|
forceRegister,
|
|
1625
|
-
waitForFinalTx,
|
|
1626
1635
|
reownWallet,
|
|
1627
1636
|
onConnect,
|
|
1628
1637
|
onDisconnect,
|