diff --git a/webapps/world-builder-dashboard/src/assets/background.jpeg b/webapps/world-builder-dashboard/src/assets/background.jpeg new file mode 100644 index 00000000..483234cf Binary files /dev/null and b/webapps/world-builder-dashboard/src/assets/background.jpeg differ diff --git a/webapps/world-builder-dashboard/src/components/bridge/bridge/BridgeView.tsx b/webapps/world-builder-dashboard/src/components/bridge/bridge/BridgeView.tsx index d60eeec5..c4888bab 100644 --- a/webapps/world-builder-dashboard/src/components/bridge/bridge/BridgeView.tsx +++ b/webapps/world-builder-dashboard/src/components/bridge/bridge/BridgeView.tsx @@ -120,15 +120,10 @@ const BridgeView = ({ try { console.log('fetching allowances') const bridgeTokenAllowance = await _bridger.getAllowance(direction === 'DEPOSIT' ? selectedLowNetwork.rpcs[0] : selectedHighNetwork.rpcs[0], connectedAccount) - console.log('bridgeTokenAllowance', bridgeTokenAllowance) + bridgeTokenAllowance && console.log('bridgeTokenAllowance', ethers.utils.formatUnits(bridgeTokenAllowance, selectedBridgeToken.decimals)) const nativeTokenAllowance = await _bridger.getNativeAllowance(direction === 'DEPOSIT' ? selectedLowNetwork.rpcs[0] : selectedHighNetwork.rpcs[0], connectedAccount) - console.log('nativeTokenAllowance', nativeTokenAllowance) - if (bridgeTokenAllowance && nativeTokenAllowance) { - console.log( - ethers.utils.formatUnits(bridgeTokenAllowance!, selectedBridgeToken.decimals), - ethers.utils.formatEther(nativeTokenAllowance!) - ) - } + nativeTokenAllowance && console.log('nativeTokenAllowance', ethers.utils.formatEther(nativeTokenAllowance)) + setBridgeTokenAllowance(bridgeTokenAllowance as ethers.BigNumber | null) setNativeTokenAllowance(nativeTokenAllowance as ethers.BigNumber | null) } catch (error) { diff --git a/webapps/world-builder-dashboard/src/components/bridge/bridge/MultiTokenApproval.tsx b/webapps/world-builder-dashboard/src/components/bridge/bridge/MultiTokenApproval.tsx index 03d4e960..4cf229b5 100644 --- a/webapps/world-builder-dashboard/src/components/bridge/bridge/MultiTokenApproval.tsx +++ b/webapps/world-builder-dashboard/src/components/bridge/bridge/MultiTokenApproval.tsx @@ -57,13 +57,14 @@ export const MultiTokenApproval: React.FC = ({ showAppr } const currentToken = tokens[currentTokenIndex]; - const initialAmount = currentTokenIndex === 1 - ? ethers.utils.parseUnits(gasFees[1] || '0', currentToken.decimals || 18) - : currentTokenIndex === 0 - ? ethers.utils.parseUnits(amount || '0', decimals || 18) - : ethers.utils.parseUnits(amount || '0', currentToken.decimals || 18) - - setNewAllowance(initialAmount); + if (!newAllowance) { + const initialAmount = currentTokenIndex === 1 + ? ethers.utils.parseUnits(gasFees[1] || '0', currentToken.decimals || 18) + : currentTokenIndex === 0 + ? ethers.utils.parseUnits(amount || '0', decimals || 18) + : ethers.utils.parseUnits(amount || '0', currentToken.decimals || 18) + setNewAllowance(initialAmount); + } }, [currentTokenIndex, tokens, amount, decimals, gasFees]); const approve = useMutation( diff --git a/webapps/world-builder-dashboard/src/hooks/useBridger.ts b/webapps/world-builder-dashboard/src/hooks/useBridger.ts index 253206e0..cf8efa0c 100644 --- a/webapps/world-builder-dashboard/src/hooks/useBridger.ts +++ b/webapps/world-builder-dashboard/src/hooks/useBridger.ts @@ -66,7 +66,7 @@ export const useBridger = () => { const destinationProvider = direction === 'DEPOSIT' ? selectedHighNetwork.rpcs[0] : - undefined + selectedLowNetwork.rpcs[0] console.log("Destination provider:", destinationProvider) diff --git a/webapps/world-builder-dashboard/src/layouts/MainLayout/MainLayout.module.css b/webapps/world-builder-dashboard/src/layouts/MainLayout/MainLayout.module.css index 8afd3d94..d9fb2284 100644 --- a/webapps/world-builder-dashboard/src/layouts/MainLayout/MainLayout.module.css +++ b/webapps/world-builder-dashboard/src/layouts/MainLayout/MainLayout.module.css @@ -5,6 +5,7 @@ width: 100vw; position: relative; font-family: Inter, sans-serif; + background: url('../../../src/assets/background.jpeg') lightgray 0px -1.156px / 100% 100.23% no-repeat; } .sideBar { @@ -18,6 +19,7 @@ min-width: 280px; border-right: 1px solid var(--Gray-200, #eaecf0); background: var(--Base-White, #fff); + backdrop-filter: blur(2px); } .sideBarTop { @@ -76,7 +78,8 @@ font-size: 16px; font-style: normal; font-weight: 600; - line-height: 24px; /* 150% */ + line-height: 24px; + /* 150% */ text-transform: capitalize; } @@ -119,7 +122,8 @@ font-size: 14px; font-style: normal; font-weight: 400; - line-height: 20px; /* 142.857% */ + line-height: 20px; + /* 142.857% */ } .iconButton { @@ -138,6 +142,7 @@ flex-direction: column; min-width: 100vw; } + .logoContainer { padding: 0; } @@ -166,7 +171,8 @@ font-size: 14px; font-style: normal; font-weight: 600; - line-height: 20px; /* 142.857% */ + line-height: 20px; + /* 142.857% */ } .connectingWalletText { @@ -176,7 +182,8 @@ font-size: 14px; font-style: normal; font-weight: 600; - line-height: 20px; /* 142.857% */ + line-height: 20px; + /* 142.857% */ } .icon { @@ -239,4 +246,4 @@ width: var(--20px, 20px); height: var(--20px, 20px); stroke: var(--Selected-Theme-Icon, #fff); -} +} \ No newline at end of file