@rhinestone/deposit-modal 0.1.69 → 0.2.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-3GU5B776.cjs → DepositModalReown-66DE7NAY.cjs} +3 -3
- package/dist/{DepositModalReown-WN2E3EQ3.mjs → DepositModalReown-PROPLCBI.mjs} +2 -2
- package/dist/{WithdrawModalReown-WIV5IEIW.cjs → WithdrawModalReown-HXTXSZCJ.cjs} +3 -3
- package/dist/{WithdrawModalReown-6ZBCJOPK.mjs → WithdrawModalReown-URF6AERQ.mjs} +2 -2
- package/dist/{chunk-DA3XVDNQ.mjs → chunk-3CRG5NPG.mjs} +44 -0
- package/dist/{chunk-3RV2B6JM.mjs → chunk-7NEVAAPY.mjs} +141 -20
- package/dist/{chunk-2ATEEBQZ.cjs → chunk-7TEGUTU4.cjs} +42 -42
- package/dist/{chunk-P3CGKXXZ.mjs → chunk-TKTOPC2W.mjs} +2 -2
- package/dist/{chunk-6W42ROAB.cjs → chunk-UHQSFV5V.cjs} +244 -123
- package/dist/{chunk-TCILEYM5.cjs → chunk-XW4M7WDI.cjs} +44 -0
- package/dist/deposit.cjs +3 -3
- package/dist/deposit.mjs +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +3 -3
- package/dist/reown.cjs +4 -4
- package/dist/reown.mjs +3 -3
- package/dist/styles.css +5 -5
- package/dist/withdraw.cjs +3 -3
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -703,6 +703,50 @@ function createDepositService(baseUrl, options) {
|
|
|
703
703
|
hasMore: Boolean(nextCursor)
|
|
704
704
|
});
|
|
705
705
|
return { deposits, nextCursor };
|
|
706
|
+
},
|
|
707
|
+
async checkLiquidity(params) {
|
|
708
|
+
const searchParams = new URLSearchParams({
|
|
709
|
+
sourceChainId: String(params.sourceChainId),
|
|
710
|
+
sourceToken: params.sourceToken,
|
|
711
|
+
destinationChainId: String(params.destinationChainId),
|
|
712
|
+
destinationToken: params.destinationToken,
|
|
713
|
+
amount: params.amount
|
|
714
|
+
});
|
|
715
|
+
const url = apiUrl(`/liquidity?${searchParams.toString()}`);
|
|
716
|
+
debugLog(debug, scope, "checkLiquidity:request", {
|
|
717
|
+
url,
|
|
718
|
+
sourceChainId: params.sourceChainId,
|
|
719
|
+
destinationChainId: params.destinationChainId,
|
|
720
|
+
amount: params.amount
|
|
721
|
+
});
|
|
722
|
+
const response = await fetch(url, {
|
|
723
|
+
method: "GET",
|
|
724
|
+
headers: { "Content-Type": "application/json" },
|
|
725
|
+
cache: "no-store"
|
|
726
|
+
});
|
|
727
|
+
if (!response.ok) {
|
|
728
|
+
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
729
|
+
debugError(debug, scope, "checkLiquidity:failed", error, {
|
|
730
|
+
status: response.status
|
|
731
|
+
});
|
|
732
|
+
throw new Error(
|
|
733
|
+
error.error || `Liquidity check failed: ${response.status}`
|
|
734
|
+
);
|
|
735
|
+
}
|
|
736
|
+
const data = await response.json();
|
|
737
|
+
const result = {
|
|
738
|
+
hasLiquidity: data.hasLiquidity === true,
|
|
739
|
+
symbol: typeof data.symbol === "string" ? data.symbol : "",
|
|
740
|
+
decimals: typeof data.decimals === "number" ? data.decimals : 0,
|
|
741
|
+
unlimited: data.unlimited === true,
|
|
742
|
+
maxAmount: typeof data.maxAmount === "string" ? data.maxAmount : null
|
|
743
|
+
};
|
|
744
|
+
debugLog(debug, scope, "checkLiquidity:success", {
|
|
745
|
+
hasLiquidity: result.hasLiquidity,
|
|
746
|
+
unlimited: result.unlimited,
|
|
747
|
+
maxAmount: result.maxAmount
|
|
748
|
+
});
|
|
749
|
+
return result;
|
|
706
750
|
}
|
|
707
751
|
};
|
|
708
752
|
}
|
package/dist/deposit.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunkUHQSFV5Vcjs = require('./chunk-UHQSFV5V.cjs');
|
|
4
|
+
require('./chunk-XW4M7WDI.cjs');
|
|
5
5
|
require('./chunk-MUWVDVY4.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.DepositModal =
|
|
8
|
+
exports.DepositModal = _chunkUHQSFV5Vcjs.DepositModal;
|
package/dist/deposit.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkUHQSFV5Vcjs = require('./chunk-UHQSFV5V.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk7TEGUTU4cjs = require('./chunk-7TEGUTU4.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkYQFH2WSWcjs = require('./chunk-YQFH2WSW.cjs');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-XW4M7WDI.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -70,4 +70,4 @@ var _chunkMUWVDVY4cjs = require('./chunk-MUWVDVY4.cjs');
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
exports.CHAIN_BY_ID = _chunkMUWVDVY4cjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkMUWVDVY4cjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkMUWVDVY4cjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal =
|
|
73
|
+
exports.CHAIN_BY_ID = _chunkMUWVDVY4cjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkMUWVDVY4cjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkMUWVDVY4cjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunkUHQSFV5Vcjs.DepositModal; exports.NATIVE_TOKEN_ADDRESS = _chunkMUWVDVY4cjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkMUWVDVY4cjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkMUWVDVY4cjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunk7TEGUTU4cjs.WithdrawModal; exports.chainRegistry = _chunkMUWVDVY4cjs.chainRegistry; exports.disconnectWallet = _chunkYQFH2WSWcjs.disconnectWallet; exports.findChainIdForToken = _chunkMUWVDVY4cjs.findChainIdForToken; exports.getChainBadge = _chunkMUWVDVY4cjs.getChainBadge; exports.getChainIcon = _chunkMUWVDVY4cjs.getChainIcon; exports.getChainId = _chunkMUWVDVY4cjs.getChainId; exports.getChainName = _chunkMUWVDVY4cjs.getChainName; exports.getChainObject = _chunkMUWVDVY4cjs.getChainObject; exports.getExplorerName = _chunkMUWVDVY4cjs.getExplorerName; exports.getExplorerTxUrl = _chunkMUWVDVY4cjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkMUWVDVY4cjs.getExplorerUrl; exports.getSupportedChainIds = _chunkMUWVDVY4cjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkMUWVDVY4cjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkMUWVDVY4cjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkMUWVDVY4cjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkMUWVDVY4cjs.getTokenAddress; exports.getTokenDecimals = _chunkMUWVDVY4cjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkMUWVDVY4cjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkMUWVDVY4cjs.getTokenIcon; exports.getTokenSymbol = _chunkMUWVDVY4cjs.getTokenSymbol; exports.getUsdcAddress = _chunkMUWVDVY4cjs.getUsdcAddress; exports.getUsdcDecimals = _chunkMUWVDVY4cjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkMUWVDVY4cjs.isSupportedTokenAddressForChain;
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7NEVAAPY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
WithdrawModal
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TKTOPC2W.mjs";
|
|
7
7
|
import {
|
|
8
8
|
disconnectWallet
|
|
9
9
|
} from "./chunk-5YXAQB6A.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-3CRG5NPG.mjs";
|
|
11
11
|
import {
|
|
12
12
|
CHAIN_BY_ID,
|
|
13
13
|
DEFAULT_BACKEND_URL,
|
package/dist/reown.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkUHQSFV5Vcjs = require('./chunk-UHQSFV5V.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk7TEGUTU4cjs = require('./chunk-7TEGUTU4.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkYQFH2WSWcjs = require('./chunk-YQFH2WSW.cjs');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-XW4M7WDI.cjs');
|
|
11
11
|
require('./chunk-MUWVDVY4.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
exports.DepositModal =
|
|
16
|
+
exports.DepositModal = _chunkUHQSFV5Vcjs.DepositModal; exports.WithdrawModal = _chunk7TEGUTU4cjs.WithdrawModal; exports.disconnectWallet = _chunkYQFH2WSWcjs.disconnectWallet;
|
package/dist/reown.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7NEVAAPY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
WithdrawModal
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TKTOPC2W.mjs";
|
|
7
7
|
import {
|
|
8
8
|
disconnectWallet
|
|
9
9
|
} from "./chunk-5YXAQB6A.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-3CRG5NPG.mjs";
|
|
11
11
|
import "./chunk-SDZKKUCJ.mjs";
|
|
12
12
|
export {
|
|
13
13
|
DepositModal,
|
package/dist/styles.css
CHANGED
|
@@ -2591,19 +2591,19 @@
|
|
|
2591
2591
|
display: inline-flex;
|
|
2592
2592
|
align-items: center;
|
|
2593
2593
|
justify-content: center;
|
|
2594
|
-
width:
|
|
2595
|
-
height:
|
|
2594
|
+
width: 14px;
|
|
2595
|
+
height: 14px;
|
|
2596
2596
|
color: var(--rs-muted-foreground);
|
|
2597
2597
|
flex-shrink: 0;
|
|
2598
2598
|
}
|
|
2599
2599
|
|
|
2600
2600
|
.rs-price-impact-row-icon svg {
|
|
2601
|
-
width:
|
|
2602
|
-
height:
|
|
2601
|
+
width: 14px;
|
|
2602
|
+
height: 14px;
|
|
2603
2603
|
}
|
|
2604
2604
|
|
|
2605
2605
|
.rs-price-impact-label {
|
|
2606
|
-
font-size:
|
|
2606
|
+
font-size: 11px;
|
|
2607
2607
|
color: var(--rs-muted-foreground);
|
|
2608
2608
|
font-weight: 500;
|
|
2609
2609
|
}
|
package/dist/withdraw.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk7TEGUTU4cjs = require('./chunk-7TEGUTU4.cjs');
|
|
4
|
+
require('./chunk-XW4M7WDI.cjs');
|
|
5
5
|
require('./chunk-MUWVDVY4.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.WithdrawModal =
|
|
8
|
+
exports.WithdrawModal = _chunk7TEGUTU4cjs.WithdrawModal;
|
package/dist/withdraw.mjs
CHANGED