@rhinestone/deposit-modal 0.1.39 → 0.1.40
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-YTUE3XAB.mjs → DepositModalReown-3HNOCOOO.mjs} +1 -1
- package/dist/{DepositModalReown-UMUTS37L.cjs → DepositModalReown-ZZKRN6J3.cjs} +2 -2
- package/dist/{chunk-VTTEVMB6.cjs → chunk-3O37UPSC.cjs} +16 -3
- package/dist/{chunk-TK7BVWX6.mjs → chunk-F5S6RHUI.mjs} +16 -3
- package/dist/deposit.cjs +2 -2
- package/dist/deposit.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +1 -1
- package/dist/reown.cjs +2 -2
- package/dist/reown.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk3O37UPSCcjs = require('./chunk-3O37UPSC.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@ function DepositModalWithReown(props) {
|
|
|
20
20
|
reown.disconnect();
|
|
21
21
|
}, [reown.disconnect]);
|
|
22
22
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
23
|
-
|
|
23
|
+
_chunk3O37UPSCcjs.DepositModalInner,
|
|
24
24
|
{
|
|
25
25
|
...props,
|
|
26
26
|
reownWallet: reown,
|
|
@@ -1588,6 +1588,7 @@ function DepositFlow({
|
|
|
1588
1588
|
const portfolioAssetsRef = _react.useRef.call(void 0, []);
|
|
1589
1589
|
const stableWalletSignerRef = _react.useRef.call(void 0, null);
|
|
1590
1590
|
const stableWalletSelectionKeyRef = _react.useRef.call(void 0, null);
|
|
1591
|
+
const hasNavigatedBackRef = _react.useRef.call(void 0, false);
|
|
1591
1592
|
const handleAssetsLoaded = _react.useCallback.call(void 0, (assets) => {
|
|
1592
1593
|
portfolioAssetsRef.current = assets;
|
|
1593
1594
|
}, []);
|
|
@@ -1804,10 +1805,20 @@ function DepositFlow({
|
|
|
1804
1805
|
setFlowMode("deposit-address");
|
|
1805
1806
|
setStep({ type: "setup" });
|
|
1806
1807
|
}, []);
|
|
1807
|
-
const
|
|
1808
|
+
const handleResetFlow = _react.useCallback.call(void 0, () => {
|
|
1809
|
+
portfolioAssetsRef.current = [];
|
|
1810
|
+
stableWalletSignerRef.current = null;
|
|
1811
|
+
stableWalletSelectionKeyRef.current = null;
|
|
1812
|
+
hasNavigatedBackRef.current = false;
|
|
1813
|
+
setTotalBalanceUsd(0);
|
|
1814
|
+
setSelectedConnectAddress(null);
|
|
1815
|
+
setIsConnectSelectionConfirmed(false);
|
|
1808
1816
|
setFlowMode(null);
|
|
1809
1817
|
setStep({ type: "setup" });
|
|
1810
1818
|
}, []);
|
|
1819
|
+
const handleNewDeposit = _react.useCallback.call(void 0, () => {
|
|
1820
|
+
handleResetFlow();
|
|
1821
|
+
}, [handleResetFlow]);
|
|
1811
1822
|
const handleSetupComplete = _react.useCallback.call(void 0,
|
|
1812
1823
|
(smartAccount) => {
|
|
1813
1824
|
if (isDepositAddressMode) {
|
|
@@ -1927,7 +1938,6 @@ function DepositFlow({
|
|
|
1927
1938
|
}
|
|
1928
1939
|
return null;
|
|
1929
1940
|
}, [selectedConnectAddress, walletOptions]);
|
|
1930
|
-
const hasNavigatedBackRef = _react.useRef.call(void 0, false);
|
|
1931
1941
|
_react.useEffect.call(void 0, () => {
|
|
1932
1942
|
if (!showConnectStep && isConnectSelectionConfirmed && flowMode === "wallet" && !signerContext) {
|
|
1933
1943
|
setSelectedConnectAddress(null);
|
|
@@ -2139,7 +2149,7 @@ function DepositFlow({
|
|
|
2139
2149
|
// src/DepositModal.tsx
|
|
2140
2150
|
|
|
2141
2151
|
var ReownDepositInner = _react.lazy.call(void 0,
|
|
2142
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-
|
|
2152
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-ZZKRN6J3.cjs"))).then((m) => ({ default: m.DepositModalReown }))
|
|
2143
2153
|
);
|
|
2144
2154
|
function DepositModal(props) {
|
|
2145
2155
|
const needsReown = !!props.reownAppId;
|
|
@@ -2206,6 +2216,9 @@ function DepositModalInner({
|
|
|
2206
2216
|
_react.useEffect.call(void 0, () => {
|
|
2207
2217
|
if (!isOpen) {
|
|
2208
2218
|
setCurrentStepIndex(0);
|
|
2219
|
+
setTotalBalanceUsd(null);
|
|
2220
|
+
backHandlerRef.current = void 0;
|
|
2221
|
+
hasCalledReady.current = false;
|
|
2209
2222
|
}
|
|
2210
2223
|
}, [isOpen]);
|
|
2211
2224
|
const handleStepChange = _react.useCallback.call(void 0,
|
|
@@ -1588,6 +1588,7 @@ function DepositFlow({
|
|
|
1588
1588
|
const portfolioAssetsRef = useRef5([]);
|
|
1589
1589
|
const stableWalletSignerRef = useRef5(null);
|
|
1590
1590
|
const stableWalletSelectionKeyRef = useRef5(null);
|
|
1591
|
+
const hasNavigatedBackRef = useRef5(false);
|
|
1591
1592
|
const handleAssetsLoaded = useCallback3((assets) => {
|
|
1592
1593
|
portfolioAssetsRef.current = assets;
|
|
1593
1594
|
}, []);
|
|
@@ -1804,10 +1805,20 @@ function DepositFlow({
|
|
|
1804
1805
|
setFlowMode("deposit-address");
|
|
1805
1806
|
setStep({ type: "setup" });
|
|
1806
1807
|
}, []);
|
|
1807
|
-
const
|
|
1808
|
+
const handleResetFlow = useCallback3(() => {
|
|
1809
|
+
portfolioAssetsRef.current = [];
|
|
1810
|
+
stableWalletSignerRef.current = null;
|
|
1811
|
+
stableWalletSelectionKeyRef.current = null;
|
|
1812
|
+
hasNavigatedBackRef.current = false;
|
|
1813
|
+
setTotalBalanceUsd(0);
|
|
1814
|
+
setSelectedConnectAddress(null);
|
|
1815
|
+
setIsConnectSelectionConfirmed(false);
|
|
1808
1816
|
setFlowMode(null);
|
|
1809
1817
|
setStep({ type: "setup" });
|
|
1810
1818
|
}, []);
|
|
1819
|
+
const handleNewDeposit = useCallback3(() => {
|
|
1820
|
+
handleResetFlow();
|
|
1821
|
+
}, [handleResetFlow]);
|
|
1811
1822
|
const handleSetupComplete = useCallback3(
|
|
1812
1823
|
(smartAccount) => {
|
|
1813
1824
|
if (isDepositAddressMode) {
|
|
@@ -1927,7 +1938,6 @@ function DepositFlow({
|
|
|
1927
1938
|
}
|
|
1928
1939
|
return null;
|
|
1929
1940
|
}, [selectedConnectAddress, walletOptions]);
|
|
1930
|
-
const hasNavigatedBackRef = useRef5(false);
|
|
1931
1941
|
useEffect7(() => {
|
|
1932
1942
|
if (!showConnectStep && isConnectSelectionConfirmed && flowMode === "wallet" && !signerContext) {
|
|
1933
1943
|
setSelectedConnectAddress(null);
|
|
@@ -2139,7 +2149,7 @@ function DepositFlow({
|
|
|
2139
2149
|
// src/DepositModal.tsx
|
|
2140
2150
|
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2141
2151
|
var ReownDepositInner = lazy(
|
|
2142
|
-
() => import("./DepositModalReown-
|
|
2152
|
+
() => import("./DepositModalReown-3HNOCOOO.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
2143
2153
|
);
|
|
2144
2154
|
function DepositModal(props) {
|
|
2145
2155
|
const needsReown = !!props.reownAppId;
|
|
@@ -2206,6 +2216,9 @@ function DepositModalInner({
|
|
|
2206
2216
|
useEffect8(() => {
|
|
2207
2217
|
if (!isOpen) {
|
|
2208
2218
|
setCurrentStepIndex(0);
|
|
2219
|
+
setTotalBalanceUsd(null);
|
|
2220
|
+
backHandlerRef.current = void 0;
|
|
2221
|
+
hasCalledReady.current = false;
|
|
2209
2222
|
}
|
|
2210
2223
|
}, [isOpen]);
|
|
2211
2224
|
const handleStepChange = useCallback4(
|
package/dist/deposit.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk3O37UPSCcjs = require('./chunk-3O37UPSC.cjs');
|
|
4
4
|
require('./chunk-AHOFT42H.cjs');
|
|
5
5
|
require('./chunk-FLXTBFMZ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.DepositModal =
|
|
8
|
+
exports.DepositModal = _chunk3O37UPSCcjs.DepositModal;
|
package/dist/deposit.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk3O37UPSCcjs = require('./chunk-3O37UPSC.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkK7BHCDJQcjs = require('./chunk-K7BHCDJQ.cjs');
|
|
@@ -66,4 +66,4 @@ var _chunkFLXTBFMZcjs = require('./chunk-FLXTBFMZ.cjs');
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
exports.CHAIN_BY_ID = _chunkFLXTBFMZcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkFLXTBFMZcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkFLXTBFMZcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal =
|
|
69
|
+
exports.CHAIN_BY_ID = _chunkFLXTBFMZcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkFLXTBFMZcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkFLXTBFMZcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunk3O37UPSCcjs.DepositModal; exports.NATIVE_TOKEN_ADDRESS = _chunkFLXTBFMZcjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkFLXTBFMZcjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkFLXTBFMZcjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunkK7BHCDJQcjs.WithdrawModal; exports.chainRegistry = _chunkFLXTBFMZcjs.chainRegistry; exports.findChainIdForToken = _chunkFLXTBFMZcjs.findChainIdForToken; exports.getChainBadge = _chunkFLXTBFMZcjs.getChainBadge; exports.getChainIcon = _chunkFLXTBFMZcjs.getChainIcon; exports.getChainId = _chunkFLXTBFMZcjs.getChainId; exports.getChainName = _chunkFLXTBFMZcjs.getChainName; exports.getChainObject = _chunkFLXTBFMZcjs.getChainObject; exports.getExplorerName = _chunkFLXTBFMZcjs.getExplorerName; exports.getExplorerTxUrl = _chunkFLXTBFMZcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkFLXTBFMZcjs.getExplorerUrl; exports.getSupportedChainIds = _chunkFLXTBFMZcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkFLXTBFMZcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkFLXTBFMZcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkFLXTBFMZcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkFLXTBFMZcjs.getTokenAddress; exports.getTokenDecimals = _chunkFLXTBFMZcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkFLXTBFMZcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkFLXTBFMZcjs.getTokenIcon; exports.getTokenSymbol = _chunkFLXTBFMZcjs.getTokenSymbol; exports.getUsdcAddress = _chunkFLXTBFMZcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkFLXTBFMZcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkFLXTBFMZcjs.isSupportedTokenAddressForChain;
|
package/dist/index.mjs
CHANGED
package/dist/reown.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk3O37UPSCcjs = require('./chunk-3O37UPSC.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkK7BHCDJQcjs = require('./chunk-K7BHCDJQ.cjs');
|
|
@@ -9,4 +9,4 @@ require('./chunk-FLXTBFMZ.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.DepositModal =
|
|
12
|
+
exports.DepositModal = _chunk3O37UPSCcjs.DepositModal; exports.WithdrawModal = _chunkK7BHCDJQcjs.WithdrawModal;
|
package/dist/reown.mjs
CHANGED