@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.
Binary file
@@ -30113,24 +30113,32 @@ function EP(e, t) {
30113
30113
  handleSetDefaultPair: y
30114
30114
  };
30115
30115
  }
30116
- function CP() {
30117
- const { currentRpc: e } = Gr(), { setSuiClient: t, setAggregatorSDK: r } = xo(), { currentAccount: n } = Kr();
30116
+ function CP(e) {
30117
+ const { currentRpc: t } = Gr(), { setSuiClient: r, setAggregatorSDK: n } = xo(), { currentAccount: i } = Kr();
30118
30118
  yt(() => {
30119
- if (e) {
30120
- const i = new Vo({ url: e.link });
30121
- t(i);
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
- }, [e.link, n == null ? void 0 : n.address]);
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();
Binary file