@cetusprotocol/terminal 1.0.1 → 1.0.2
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/cetus-swap.cjs.js +2 -2
- package/dist/cetus-swap.cjs.js.gz +0 -0
- package/dist/cetus-swap.es.js +25 -17
- package/dist/cetus-swap.es.js.gz +0 -0
- package/dist/cetus-swap.umd.js +2 -2
- package/dist/cetus-swap.umd.js.gz +0 -0
- package/dist/hooks/useSuiClient.d.ts +2 -1
- package/dist/types/config.d.ts +2 -0
- package/package.json +1 -1
|
Binary file
|
package/dist/cetus-swap.es.js
CHANGED
|
@@ -30113,24 +30113,32 @@ function EP(e, t) {
|
|
|
30113
30113
|
handleSetDefaultPair: y
|
|
30114
30114
|
};
|
|
30115
30115
|
}
|
|
30116
|
-
function CP() {
|
|
30117
|
-
const { currentRpc:
|
|
30116
|
+
function CP(e) {
|
|
30117
|
+
const { currentRpc: t } = Gr(), { setSuiClient: r, setAggregatorSDK: n } = xo(), { currentAccount: i } = Kr();
|
|
30118
30118
|
yt(() => {
|
|
30119
|
-
if (
|
|
30120
|
-
const
|
|
30121
|
-
|
|
30122
|
-
}
|
|
30123
|
-
}, [e]), yt(() => {
|
|
30124
|
-
if (e) {
|
|
30125
|
-
const i = new $v({
|
|
30126
|
-
endpoint: _s.aggregatorUrl,
|
|
30127
|
-
signer: (n == null ? void 0 : n.address) || "",
|
|
30128
|
-
client: new Vo({ url: e.link }),
|
|
30129
|
-
env: M0.Mainnet
|
|
30130
|
-
});
|
|
30131
|
-
r(i);
|
|
30119
|
+
if (t) {
|
|
30120
|
+
const s = new Vo({ url: t.link });
|
|
30121
|
+
r(s);
|
|
30132
30122
|
}
|
|
30133
|
-
}, [
|
|
30123
|
+
}, [t]);
|
|
30124
|
+
const o = () => {
|
|
30125
|
+
const s = {
|
|
30126
|
+
endpoint: _s.aggregatorUrl,
|
|
30127
|
+
signer: (i == null ? void 0 : i.address) || "",
|
|
30128
|
+
client: new Vo({ url: t.link }),
|
|
30129
|
+
env: M0.Mainnet,
|
|
30130
|
+
overlayFeeRate: (e == null ? void 0 : e.overlayFeeRate) || void 0,
|
|
30131
|
+
// Overlay fee rate (0.01 represents 1%).
|
|
30132
|
+
overlayFeeReceiver: (e == null ? void 0 : e.overlayFeeReceiver) || void 0
|
|
30133
|
+
// Address to receive the overlay fees
|
|
30134
|
+
}, a = new $v(s);
|
|
30135
|
+
n(a);
|
|
30136
|
+
};
|
|
30137
|
+
yt(() => {
|
|
30138
|
+
t && o();
|
|
30139
|
+
}, [t.link, i == null ? void 0 : i.address]), yt(() => {
|
|
30140
|
+
e != null && e.overlayFeeRate && (e != null && e.overlayFeeReceiver) && o();
|
|
30141
|
+
}, [e == null ? void 0 : e.overlayFeeRate, e == null ? void 0 : e.overlayFeeReceiver]);
|
|
30134
30142
|
}
|
|
30135
30143
|
const lh = Wi((e, t) => ({
|
|
30136
30144
|
transactionData: void 0,
|
|
@@ -35767,7 +35775,7 @@ function zU({
|
|
|
35767
35775
|
initProps: e = {},
|
|
35768
35776
|
customWallet: t
|
|
35769
35777
|
}) {
|
|
35770
|
-
CP();
|
|
35778
|
+
CP(e);
|
|
35771
35779
|
const { ToastContainer: r } = Vs(), { fetchRouterConfig: n } = bP(), { getTrustTokens: i } = So(), { transactionData: o, setTransactionData: s } = lh(), { isOpenSecondary: a, fromCoin: c, toAmount: l, toCoin: u, fromAmount: f } = nn(), [p, y] = St(0), x = Er(p);
|
|
35772
35780
|
EP(e), yt(() => {
|
|
35773
35781
|
i(), n();
|
package/dist/cetus-swap.es.js.gz
CHANGED
|
Binary file
|