@rango-dev/widget-embedded 0.1.16-next.1 → 0.1.16-next.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.
@@ -2987,20 +2987,24 @@ function Layout(_ref) {
2987
2987
  t
2988
2988
  } = useTranslation();
2989
2989
  useEffect(() => {
2990
- const chain = blockchains.find(chain => chain.name === config?.to?.blockchain);
2991
- const token = tokens.find(t => tokensAreEqual(t, config?.to?.token || null));
2992
- setToChain(chain || null);
2993
- setToToken(token || null);
2994
- }, [config?.to?.token, config?.to?.blockchain]);
2990
+ if (loadingMetaStatus === 'success') {
2991
+ const chain = blockchains.find(chain => chain.name === config?.to?.blockchain);
2992
+ const token = tokens.find(t => tokensAreEqual(t, config?.to?.token || null));
2993
+ setToChain(chain || null);
2994
+ setToToken(token || null);
2995
+ }
2996
+ }, [config?.to?.token, config?.to?.blockchain, loadingMetaStatus]);
2995
2997
  useEffect(() => {
2996
2998
  setInputAmount(config?.amount?.toString() || '');
2997
2999
  }, [config?.amount]);
2998
3000
  useEffect(() => {
2999
- const chain = blockchains.find(chain => chain.name === config?.from?.blockchain);
3000
- const token = tokens.find(t => tokensAreEqual(t, config?.from?.token || null));
3001
- setFromChain(chain || null);
3002
- setFromToken(token || null);
3003
- }, [config?.from?.token, config?.from?.blockchain]);
3001
+ if (loadingMetaStatus === 'success') {
3002
+ const chain = blockchains.find(chain => chain.name === config?.from?.blockchain);
3003
+ const token = tokens.find(t => tokensAreEqual(t, config?.from?.token || null));
3004
+ setFromChain(chain || null);
3005
+ setFromToken(token || null);
3006
+ }
3007
+ }, [config?.from?.token, config?.from?.blockchain, loadingMetaStatus]);
3004
3008
  useEffect(() => {
3005
3009
  setAffiliateRef(config?.affiliateRef || null);
3006
3010
  }, [config?.affiliateRef]);
@@ -3396,6 +3400,7 @@ const Widget = _ref => {
3396
3400
  providers: providers,
3397
3401
  onUpdateState: onUpdateState
3398
3402
  }, React.createElement("div", {
3403
+ id: "swap-container",
3399
3404
  className: activeTheme
3400
3405
  }, React.createElement(QueueManager, null, React.createElement(SwapContainer, {
3401
3406
  fixedHeight: currentPage !== navigationRoutes.home