@orderly.network/ui-transfer 3.1.4 → 3.1.5-alpha.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/index.mjs CHANGED
@@ -897,7 +897,7 @@ var useExclusiveDeposit = (options2) => {
897
897
  };
898
898
  var useExclusiveDepositOptions = (params) => {
899
899
  const networkId = useConfig("networkId");
900
- const tokensInfo = useTokensInfo();
900
+ const tokensInfo = useTokensInfo(networkId);
901
901
  const selectedNetwork = params?.selectedNetwork;
902
902
  const [, { findByChainId }] = useChains(networkId, {
903
903
  pick: "network_infos"
@@ -2480,9 +2480,9 @@ function useDepositAction(options2) {
2480
2480
  };
2481
2481
  }
2482
2482
  function useDepositFee(options2) {
2483
- const { nativeSymbol, depositFee = 0, getIndexPrice } = options2;
2483
+ const { nativeSymbol, depositFee = 0, getIndexPrice, networkId } = options2;
2484
2484
  const { account: account2 } = useAccount();
2485
- const tokenInfo = useTokenInfo(nativeSymbol);
2485
+ const tokenInfo = useTokenInfo(nativeSymbol, networkId);
2486
2486
  const feeProps = useMemo(() => {
2487
2487
  const decimals = account2.walletAdapter?.chainNamespace === ChainNamespace.solana ? 9 : 18;
2488
2488
  const dstGasFee = new Decimal(depositFee.toString()).div(new Decimal(10).pow(decimals)).toString();
@@ -4315,7 +4315,12 @@ var useDepositFormScript = (options2) => {
4315
4315
  setQuantity("");
4316
4316
  setDepositError("");
4317
4317
  }, [sourceToken, currentChain?.id]);
4318
- const fee = useDepositFee({ nativeSymbol, depositFee, getIndexPrice });
4318
+ const fee = useDepositFee({
4319
+ nativeSymbol,
4320
+ depositFee,
4321
+ getIndexPrice,
4322
+ networkId
4323
+ });
4319
4324
  const {
4320
4325
  inputStatus,
4321
4326
  hintMessage,
@@ -5238,8 +5243,8 @@ function useWithdrawAccountId(options2) {
5238
5243
  };
5239
5244
  }
5240
5245
  function useWithdrawFee(options2) {
5241
- const { crossChainWithdraw, currentChain, token, withdrawTo } = options2;
5242
- const tokenInfo = useTokenInfo(token);
5246
+ const { crossChainWithdraw, currentChain, networkId, token, withdrawTo } = options2;
5247
+ const tokenInfo = useTokenInfo(token, networkId);
5243
5248
  const fee = useMemo(() => {
5244
5249
  if (withdrawTo === "accountId" /* Account */) {
5245
5250
  return 0;
@@ -5759,6 +5764,7 @@ var useWithdrawFormScript = (options2) => {
5759
5764
  const fee = useWithdrawFee({
5760
5765
  crossChainWithdraw,
5761
5766
  currentChain,
5767
+ networkId,
5762
5768
  token: sourceToken?.symbol,
5763
5769
  withdrawTo
5764
5770
  });