@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.
- package/dist/components/Layout.d.ts.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/widget-embedded.cjs.development.js +15 -10
- package/dist/widget-embedded.cjs.development.js.map +1 -1
- package/dist/widget-embedded.cjs.production.min.js +15 -10
- package/dist/widget-embedded.cjs.production.min.js.map +1 -1
- package/dist/widget-embedded.esm.js +15 -10
- package/dist/widget-embedded.esm.js.map +1 -1
- package/package.json +2 -6
- package/src/components/Layout.tsx +22 -18
- package/src/index.tsx +144 -14
- package/dist/App.d.ts +0 -9
- package/dist/App.d.ts.map +0 -1
- package/dist/lib.d.ts +0 -10
- package/dist/lib.d.ts.map +0 -1
- package/src/App.tsx +0 -123
- package/src/app.css +0 -12
- package/src/lib.tsx +0 -144
|
@@ -2987,20 +2987,24 @@ function Layout(_ref) {
|
|
|
2987
2987
|
t
|
|
2988
2988
|
} = useTranslation();
|
|
2989
2989
|
useEffect(() => {
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
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
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
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
|