@orderly.network/ui-transfer 3.1.4 → 3.1.5

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/index.d.mts CHANGED
@@ -447,6 +447,7 @@ declare function useDepositFee(options: {
447
447
  nativeSymbol?: string;
448
448
  depositFee?: bigint;
449
449
  getIndexPrice: (token: string) => number;
450
+ networkId: NetworkId;
450
451
  }): {
451
452
  dstGasFee: string;
452
453
  feeQty: string;
package/dist/index.d.ts CHANGED
@@ -447,6 +447,7 @@ declare function useDepositFee(options: {
447
447
  nativeSymbol?: string;
448
448
  depositFee?: bigint;
449
449
  getIndexPrice: (token: string) => number;
450
+ networkId: NetworkId;
450
451
  }): {
451
452
  dstGasFee: string;
452
453
  feeQty: string;
package/dist/index.js CHANGED
@@ -899,7 +899,7 @@ var useExclusiveDeposit = (options2) => {
899
899
  };
900
900
  var useExclusiveDepositOptions = (params) => {
901
901
  const networkId = hooks.useConfig("networkId");
902
- const tokensInfo = hooks.useTokensInfo();
902
+ const tokensInfo = hooks.useTokensInfo(networkId);
903
903
  const selectedNetwork = params?.selectedNetwork;
904
904
  const [, { findByChainId }] = hooks.useChains(networkId, {
905
905
  pick: "network_infos"
@@ -2482,9 +2482,9 @@ function useDepositAction(options2) {
2482
2482
  };
2483
2483
  }
2484
2484
  function useDepositFee(options2) {
2485
- const { nativeSymbol, depositFee = 0, getIndexPrice } = options2;
2485
+ const { nativeSymbol, depositFee = 0, getIndexPrice, networkId } = options2;
2486
2486
  const { account: account2 } = hooks.useAccount();
2487
- const tokenInfo = hooks.useTokenInfo(nativeSymbol);
2487
+ const tokenInfo = hooks.useTokenInfo(nativeSymbol, networkId);
2488
2488
  const feeProps = react.useMemo(() => {
2489
2489
  const decimals = account2.walletAdapter?.chainNamespace === types.ChainNamespace.solana ? 9 : 18;
2490
2490
  const dstGasFee = new utils.Decimal(depositFee.toString()).div(new utils.Decimal(10).pow(decimals)).toString();
@@ -4317,7 +4317,12 @@ var useDepositFormScript = (options2) => {
4317
4317
  setQuantity("");
4318
4318
  setDepositError("");
4319
4319
  }, [sourceToken, currentChain?.id]);
4320
- const fee = useDepositFee({ nativeSymbol, depositFee, getIndexPrice });
4320
+ const fee = useDepositFee({
4321
+ nativeSymbol,
4322
+ depositFee,
4323
+ getIndexPrice,
4324
+ networkId
4325
+ });
4321
4326
  const {
4322
4327
  inputStatus,
4323
4328
  hintMessage,
@@ -5240,8 +5245,8 @@ function useWithdrawAccountId(options2) {
5240
5245
  };
5241
5246
  }
5242
5247
  function useWithdrawFee(options2) {
5243
- const { crossChainWithdraw, currentChain, token, withdrawTo } = options2;
5244
- const tokenInfo = hooks.useTokenInfo(token);
5248
+ const { crossChainWithdraw, currentChain, networkId, token, withdrawTo } = options2;
5249
+ const tokenInfo = hooks.useTokenInfo(token, networkId);
5245
5250
  const fee = react.useMemo(() => {
5246
5251
  if (withdrawTo === "accountId" /* Account */) {
5247
5252
  return 0;
@@ -5761,6 +5766,7 @@ var useWithdrawFormScript = (options2) => {
5761
5766
  const fee = useWithdrawFee({
5762
5767
  crossChainWithdraw,
5763
5768
  currentChain,
5769
+ networkId,
5764
5770
  token: sourceToken?.symbol,
5765
5771
  withdrawTo
5766
5772
  });