@orderly.network/ui-transfer 2.8.7 → 2.8.8

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
@@ -6264,6 +6264,17 @@ function useWithdrawToken(params) {
6264
6264
  }
6265
6265
  }
6266
6266
  });
6267
+ useEffect(() => {
6268
+ if (withdrawTo !== "wallet" /* Wallet */ || !allTokens.length)
6269
+ return;
6270
+ const holdingSymbols = new Set(allTokens.map((t) => t.symbol));
6271
+ if (!sourceToken?.symbol || !holdingSymbols.has(sourceToken.symbol)) {
6272
+ const defaultToken = getTokenByTokenList(allTokens);
6273
+ if (defaultToken) {
6274
+ handleSourceTokenChange(defaultToken);
6275
+ }
6276
+ }
6277
+ }, [withdrawTo, allTokens, sourceToken?.symbol, handleSourceTokenChange]);
6267
6278
  useEffect(() => {
6268
6279
  syncToken();
6269
6280
  }, [