@orderly.network/ui-transfer 2.8.7 → 2.8.8-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.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -6266,6 +6266,17 @@ function useWithdrawToken(params) {
|
|
|
6266
6266
|
}
|
|
6267
6267
|
}
|
|
6268
6268
|
});
|
|
6269
|
+
react.useEffect(() => {
|
|
6270
|
+
if (withdrawTo !== "wallet" /* Wallet */ || !allTokens.length)
|
|
6271
|
+
return;
|
|
6272
|
+
const holdingSymbols = new Set(allTokens.map((t) => t.symbol));
|
|
6273
|
+
if (!sourceToken?.symbol || !holdingSymbols.has(sourceToken.symbol)) {
|
|
6274
|
+
const defaultToken = getTokenByTokenList(allTokens);
|
|
6275
|
+
if (defaultToken) {
|
|
6276
|
+
handleSourceTokenChange(defaultToken);
|
|
6277
|
+
}
|
|
6278
|
+
}
|
|
6279
|
+
}, [withdrawTo, allTokens, sourceToken?.symbol, handleSourceTokenChange]);
|
|
6269
6280
|
react.useEffect(() => {
|
|
6270
6281
|
syncToken();
|
|
6271
6282
|
}, [
|