@rhinestone/deposit-modal 0.3.0-alpha.5 → 0.3.0-alpha.7
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-3VZ5AKV2.mjs → DepositModalReown-42D5V5II.mjs} +8 -5
- package/dist/{DepositModalReown-PPX34UAK.cjs → DepositModalReown-ABLVMYFL.cjs} +9 -6
- package/dist/{WithdrawModalReown-BB3MZAIO.mjs → WithdrawModalReown-EVHN5NOF.mjs} +3 -3
- package/dist/{WithdrawModalReown-4B6IMTBB.cjs → WithdrawModalReown-FJP3XTQ5.cjs} +4 -4
- package/dist/{chunk-QI6Q7V6O.mjs → chunk-3FHYC3K7.mjs} +26 -34
- package/dist/{chunk-ZUWAIMMH.mjs → chunk-44IFH7DZ.mjs} +1247 -917
- package/dist/{chunk-CTYKQ4B4.mjs → chunk-7VKAUBZ7.mjs} +201 -81
- package/dist/{chunk-BB6UVRAV.cjs → chunk-CPXERFGC.cjs} +110 -118
- package/dist/{chunk-DX2D2TRZ.cjs → chunk-ENMIKNXS.cjs} +241 -121
- package/dist/{chunk-TTD2FEA2.cjs → chunk-LEVCOJD6.cjs} +1193 -863
- package/dist/chunk-MHKHSCIA.cjs +554 -0
- package/dist/chunk-UCZXBHLH.mjs +554 -0
- package/dist/constants-DqVn968d.d.cts +52 -0
- package/dist/constants-DqVn968d.d.ts +52 -0
- package/dist/constants.cjs +8 -2
- package/dist/constants.d.cts +17 -48
- package/dist/constants.d.ts +17 -48
- package/dist/constants.mjs +7 -1
- package/dist/deposit.cjs +4 -4
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +3 -3
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +4 -4
- package/dist/styles.css +185 -37
- package/dist/{types-xSHZSlrT.d.cts → types-D8Q4TMk7.d.cts} +17 -5
- package/dist/{types-xSHZSlrT.d.ts → types-D8Q4TMk7.d.ts} +17 -5
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +3 -3
- package/package.json +1 -1
- package/dist/chunk-IVTXEYB2.cjs +0 -507
- package/dist/chunk-VA3ANS7D.mjs +0 -507
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-44IFH7DZ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ReownWalletProvider,
|
|
6
6
|
useReownWallet
|
|
7
7
|
} from "./chunk-5YXAQB6A.mjs";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-7VKAUBZ7.mjs";
|
|
9
|
+
import "./chunk-UCZXBHLH.mjs";
|
|
10
10
|
|
|
11
11
|
// src/DepositModalReown.tsx
|
|
12
12
|
import { useCallback, useMemo } from "react";
|
|
13
13
|
import { useAppKitProvider } from "@reown/appkit/react";
|
|
14
|
+
import { useAppKitConnection } from "@reown/appkit-adapter-solana/react";
|
|
14
15
|
import { jsx } from "react/jsx-runtime";
|
|
15
16
|
function DepositModalWithReown(props) {
|
|
16
17
|
const reown = useReownWallet();
|
|
@@ -18,12 +19,14 @@ function DepositModalWithReown(props) {
|
|
|
18
19
|
const { walletProvider: solanaWalletProvider } = useAppKitProvider(
|
|
19
20
|
enableSolana ? "solana" : "eip155"
|
|
20
21
|
);
|
|
22
|
+
const { connection: solanaConnection } = useAppKitConnection();
|
|
21
23
|
const reownWithSolana = useMemo(
|
|
22
24
|
() => ({
|
|
23
25
|
...reown,
|
|
24
|
-
solanaProvider: enableSolana && reown.isSolana ? solanaWalletProvider : void 0
|
|
26
|
+
solanaProvider: enableSolana && reown.isSolana ? solanaWalletProvider : void 0,
|
|
27
|
+
solanaConnection: enableSolana && reown.isSolana ? solanaConnection : void 0
|
|
25
28
|
}),
|
|
26
|
-
[enableSolana, reown, solanaWalletProvider]
|
|
29
|
+
[enableSolana, reown, solanaWalletProvider, solanaConnection]
|
|
27
30
|
);
|
|
28
31
|
const handleConnect = useCallback(() => {
|
|
29
32
|
reown.openConnect();
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLEVCOJD6cjs = require('./chunk-LEVCOJD6.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkYQFH2WSWcjs = require('./chunk-YQFH2WSW.cjs');
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-ENMIKNXS.cjs');
|
|
9
|
+
require('./chunk-MHKHSCIA.cjs');
|
|
10
10
|
|
|
11
11
|
// src/DepositModalReown.tsx
|
|
12
12
|
var _react = require('react');
|
|
13
13
|
var _react3 = require('@reown/appkit/react');
|
|
14
|
+
var _react5 = require('@reown/appkit-adapter-solana/react');
|
|
14
15
|
var _jsxruntime = require('react/jsx-runtime');
|
|
15
16
|
function DepositModalWithReown(props) {
|
|
16
17
|
const reown = _chunkYQFH2WSWcjs.useReownWallet.call(void 0, );
|
|
@@ -18,12 +19,14 @@ function DepositModalWithReown(props) {
|
|
|
18
19
|
const { walletProvider: solanaWalletProvider } = _react3.useAppKitProvider.call(void 0,
|
|
19
20
|
enableSolana ? "solana" : "eip155"
|
|
20
21
|
);
|
|
22
|
+
const { connection: solanaConnection } = _react5.useAppKitConnection.call(void 0, );
|
|
21
23
|
const reownWithSolana = _react.useMemo.call(void 0,
|
|
22
24
|
() => ({
|
|
23
25
|
...reown,
|
|
24
|
-
solanaProvider: enableSolana && reown.isSolana ? solanaWalletProvider : void 0
|
|
26
|
+
solanaProvider: enableSolana && reown.isSolana ? solanaWalletProvider : void 0,
|
|
27
|
+
solanaConnection: enableSolana && reown.isSolana ? solanaConnection : void 0
|
|
25
28
|
}),
|
|
26
|
-
[enableSolana, reown, solanaWalletProvider]
|
|
29
|
+
[enableSolana, reown, solanaWalletProvider, solanaConnection]
|
|
27
30
|
);
|
|
28
31
|
const handleConnect = _react.useCallback.call(void 0, () => {
|
|
29
32
|
reown.openConnect();
|
|
@@ -32,7 +35,7 @@ function DepositModalWithReown(props) {
|
|
|
32
35
|
reown.disconnect();
|
|
33
36
|
}, [reown.disconnect]);
|
|
34
37
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
35
|
-
|
|
38
|
+
_chunkLEVCOJD6cjs.DepositModalInner,
|
|
36
39
|
{
|
|
37
40
|
...props,
|
|
38
41
|
reownWallet: reownWithSolana,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3FHYC3K7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ReownWalletProvider,
|
|
6
6
|
useReownWallet
|
|
7
7
|
} from "./chunk-5YXAQB6A.mjs";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-7VKAUBZ7.mjs";
|
|
9
|
+
import "./chunk-UCZXBHLH.mjs";
|
|
10
10
|
|
|
11
11
|
// src/WithdrawModalReown.tsx
|
|
12
12
|
import { useCallback } from "react";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkCPXERFGCcjs = require('./chunk-CPXERFGC.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkYQFH2WSWcjs = require('./chunk-YQFH2WSW.cjs');
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-ENMIKNXS.cjs');
|
|
9
|
+
require('./chunk-MHKHSCIA.cjs');
|
|
10
10
|
|
|
11
11
|
// src/WithdrawModalReown.tsx
|
|
12
12
|
var _react = require('react');
|
|
@@ -20,7 +20,7 @@ function WithdrawModalWithReown(props) {
|
|
|
20
20
|
reown.disconnect();
|
|
21
21
|
}, [reown.disconnect]);
|
|
22
22
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
23
|
-
|
|
23
|
+
_chunkCPXERFGCcjs.WithdrawModalInner,
|
|
24
24
|
{
|
|
25
25
|
...props,
|
|
26
26
|
reownWallet: reown,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
AlertTriangleIcon,
|
|
3
2
|
BodyHeader,
|
|
4
3
|
Button,
|
|
4
|
+
Callout,
|
|
5
5
|
ChevronDownIcon,
|
|
6
6
|
ChevronLeftIcon,
|
|
7
7
|
CircleArrowOutUpLeftIcon,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
saveSessionOwnerToStorage,
|
|
32
32
|
toEvmCaip2,
|
|
33
33
|
useLatestRef
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-7VKAUBZ7.mjs";
|
|
35
35
|
import {
|
|
36
36
|
DEFAULT_BACKEND_URL,
|
|
37
37
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
getTokenDecimalsByAddress,
|
|
45
45
|
getTokenIcon,
|
|
46
46
|
getTokenSymbol
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-UCZXBHLH.mjs";
|
|
48
48
|
|
|
49
49
|
// src/WithdrawModal.tsx
|
|
50
50
|
import {
|
|
@@ -385,8 +385,8 @@ function WithdrawFormStep({
|
|
|
385
385
|
}
|
|
386
386
|
}, [recipient, amount, balance, asset.decimals, onSubmit]);
|
|
387
387
|
if (isBalanceLoading) {
|
|
388
|
-
return /* @__PURE__ */ jsxs("div", { className: "rs-
|
|
389
|
-
/* @__PURE__ */ jsxs("div", { className: "rs-
|
|
388
|
+
return /* @__PURE__ */ jsxs("div", { className: "rs-screen", children: [
|
|
389
|
+
/* @__PURE__ */ jsxs("div", { className: "rs-screen-body rs-withdraw-loading", children: [
|
|
390
390
|
/* @__PURE__ */ jsx(Spinner, { className: "rs-spinner--lg" }),
|
|
391
391
|
/* @__PURE__ */ jsx("div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
|
|
392
392
|
/* @__PURE__ */ jsx("div", { className: "rs-withdraw-loading-subtitle", children: chainMismatch ? `Switch to ${getChainName(asset.chainId)} to continue.` : "Please wait before withdrawing." })
|
|
@@ -394,8 +394,8 @@ function WithdrawFormStep({
|
|
|
394
394
|
/* @__PURE__ */ jsx(PoweredBy, {})
|
|
395
395
|
] });
|
|
396
396
|
}
|
|
397
|
-
return /* @__PURE__ */ jsxs("div", { className: "rs-
|
|
398
|
-
/* @__PURE__ */ jsxs("div", { className: "rs-
|
|
397
|
+
return /* @__PURE__ */ jsxs("div", { className: "rs-screen", children: [
|
|
398
|
+
/* @__PURE__ */ jsxs("div", { className: "rs-screen-body", children: [
|
|
399
399
|
/* @__PURE__ */ jsx(BodyHeader, { icon: /* @__PURE__ */ jsx(CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
|
|
400
400
|
/* @__PURE__ */ jsxs("div", { className: "rs-withdraw-section", children: [
|
|
401
401
|
/* @__PURE__ */ jsx("label", { className: "rs-withdraw-label", children: "Recipient address" }),
|
|
@@ -621,25 +621,19 @@ function WithdrawFormStep({
|
|
|
621
621
|
] })
|
|
622
622
|
] }),
|
|
623
623
|
chainMismatch && /* @__PURE__ */ jsx("div", { className: "rs-chain-switch", children: /* @__PURE__ */ jsx("div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${getChainName(asset.chainId)}...` : `Switch to ${getChainName(asset.chainId)} to continue.` }) }),
|
|
624
|
-
error && /* @__PURE__ */
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
624
|
+
error && /* @__PURE__ */ jsx(Callout, { variant: "error", children: error }),
|
|
625
|
+
!error && registrationError && /* @__PURE__ */ jsx(Callout, { variant: "error", children: registrationError }),
|
|
626
|
+
/* @__PURE__ */ jsx(
|
|
627
|
+
Button,
|
|
628
|
+
{
|
|
629
|
+
onClick: handleWithdraw,
|
|
630
|
+
fullWidth: true,
|
|
631
|
+
loading: isBusy,
|
|
632
|
+
disabled: !recipient || !amount || chainMismatch || isBusy || Boolean(registrationError),
|
|
633
|
+
children: isBusy ? "Preparing..." : registrationPending ? "Preparing session..." : !recipient ? "Enter Recipient Address" : !amount ? "Enter Withdraw Amount" : "Withdraw"
|
|
634
|
+
}
|
|
635
|
+
)
|
|
632
636
|
] }),
|
|
633
|
-
/* @__PURE__ */ jsx("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx(
|
|
634
|
-
Button,
|
|
635
|
-
{
|
|
636
|
-
onClick: handleWithdraw,
|
|
637
|
-
fullWidth: true,
|
|
638
|
-
loading: isBusy,
|
|
639
|
-
disabled: !recipient || !amount || chainMismatch || isBusy || Boolean(registrationError),
|
|
640
|
-
children: isBusy ? "Preparing..." : registrationPending ? "Preparing session..." : !recipient ? "Enter Recipient Address" : !amount ? "Enter Withdraw Amount" : "Withdraw"
|
|
641
|
-
}
|
|
642
|
-
) }),
|
|
643
637
|
/* @__PURE__ */ jsx(PoweredBy, {})
|
|
644
638
|
] });
|
|
645
639
|
}
|
|
@@ -743,14 +737,8 @@ function WithdrawReviewStep({
|
|
|
743
737
|
/* @__PURE__ */ jsx2("span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
744
738
|
] })
|
|
745
739
|
] }),
|
|
746
|
-
error && /* @__PURE__ */
|
|
747
|
-
|
|
748
|
-
/* @__PURE__ */ jsx2("span", { children: error })
|
|
749
|
-
] }),
|
|
750
|
-
!error && registrationError && /* @__PURE__ */ jsxs2("div", { className: "rs-amount-error", role: "alert", children: [
|
|
751
|
-
/* @__PURE__ */ jsx2(AlertTriangleIcon, { style: { width: 16, height: 16, flexShrink: 0 } }),
|
|
752
|
-
/* @__PURE__ */ jsx2("span", { children: registrationError })
|
|
753
|
-
] }),
|
|
740
|
+
error && /* @__PURE__ */ jsx2(Callout, { variant: "error", children: error }),
|
|
741
|
+
!error && registrationError && /* @__PURE__ */ jsx2(Callout, { variant: "error", children: registrationError }),
|
|
754
742
|
/* @__PURE__ */ jsx2(
|
|
755
743
|
Button,
|
|
756
744
|
{
|
|
@@ -1293,6 +1281,10 @@ function WithdrawFlow({
|
|
|
1293
1281
|
txHash,
|
|
1294
1282
|
destinationTxHash,
|
|
1295
1283
|
amount: context.amount,
|
|
1284
|
+
// Withdraw targets are always EVM — WithdrawModalProps.targetChain is
|
|
1285
|
+
// Chain | number (never "solana"). The context union is wide only
|
|
1286
|
+
// because ProcessingStep is shared with the deposit flow, so narrow
|
|
1287
|
+
// back here.
|
|
1296
1288
|
sourceChain: context.sourceChain,
|
|
1297
1289
|
sourceToken: context.sourceToken,
|
|
1298
1290
|
targetChain: context.targetChain,
|
|
@@ -1493,7 +1485,7 @@ function deriveStepView(step, _registration) {
|
|
|
1493
1485
|
// src/WithdrawModal.tsx
|
|
1494
1486
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1495
1487
|
var ReownWithdrawInner = lazy(
|
|
1496
|
-
() => import("./WithdrawModalReown-
|
|
1488
|
+
() => import("./WithdrawModalReown-EVHN5NOF.mjs").then((m) => ({
|
|
1497
1489
|
default: m.WithdrawModalReown
|
|
1498
1490
|
}))
|
|
1499
1491
|
);
|