diff --git a/packages/bridge-ui-v2/src/app.config.ts b/packages/bridge-ui-v2/src/app.config.ts
index 5584560c844..0c49606a95c 100644
--- a/packages/bridge-ui-v2/src/app.config.ts
+++ b/packages/bridge-ui-v2/src/app.config.ts
@@ -8,3 +8,8 @@ export const processingFeeComponent = {
closingDelayOptionClick: 300,
intervalComputeRecommendedFee: 20000,
};
+
+export const bridge = {
+ noOwnerGasLimit: BigInt(140000),
+ noTokenDeployedGasLimit: BigInt(3000000),
+};
diff --git a/packages/bridge-ui-v2/src/components/Bridge/Amount/Amount.svelte b/packages/bridge-ui-v2/src/components/Bridge/Amount/Amount.svelte
new file mode 100644
index 00000000000..9775ac28559
--- /dev/null
+++ b/packages/bridge-ui-v2/src/components/Bridge/Amount/Amount.svelte
@@ -0,0 +1,180 @@
+
+
+
diff --git a/packages/bridge-ui-v2/src/components/Bridge/AmountInput/Balance.svelte b/packages/bridge-ui-v2/src/components/Bridge/Amount/Balance.svelte
similarity index 84%
rename from packages/bridge-ui-v2/src/components/Bridge/AmountInput/Balance.svelte
rename to packages/bridge-ui-v2/src/components/Bridge/Amount/Balance.svelte
index 18000188fa6..ca4c24ccce4 100644
--- a/packages/bridge-ui-v2/src/components/Bridge/AmountInput/Balance.svelte
+++ b/packages/bridge-ui-v2/src/components/Bridge/Amount/Balance.svelte
@@ -10,25 +10,26 @@
import { destNetwork, selectedToken } from '../state';
- let tokenBalance: Maybe;
+ export let value: Maybe;
+
let computingTokenBalance = false;
let errorComputingTokenBalance = false;
async function updateTokenBalance(token: Maybe, account?: Account, srcChainId?: number, destChainId?: number) {
- if (!token || !account || !account.address) return;
+ if (!token || !srcChainId || !account?.address) return;
computingTokenBalance = true;
errorComputingTokenBalance = false;
try {
- tokenBalance = await getTokenBalance({
+ value = await getTokenBalance({
token,
+ srcChainId,
destChainId,
userAddress: account.address,
- chainId: srcChainId,
});
- } catch (error) {
- console.error(error);
+ } catch (err) {
+ console.error(err);
errorComputingTokenBalance = true;
} finally {
computingTokenBalance = false;
@@ -50,7 +51,7 @@
{:else}
- {renderTokenBalance(tokenBalance)}
+ {renderTokenBalance(value)}
{/if}
diff --git a/packages/bridge-ui-v2/src/components/Bridge/Amount/index.ts b/packages/bridge-ui-v2/src/components/Bridge/Amount/index.ts
new file mode 100644
index 00000000000..e8c536613eb
--- /dev/null
+++ b/packages/bridge-ui-v2/src/components/Bridge/Amount/index.ts
@@ -0,0 +1 @@
+export { default as Amount } from './Amount.svelte';
diff --git a/packages/bridge-ui-v2/src/components/Bridge/AmountInput/AmountInput.svelte b/packages/bridge-ui-v2/src/components/Bridge/AmountInput/AmountInput.svelte
deleted file mode 100644
index d2cd50a02cc..00000000000
--- a/packages/bridge-ui-v2/src/components/Bridge/AmountInput/AmountInput.svelte
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
diff --git a/packages/bridge-ui-v2/src/components/Bridge/AmountInput/index.ts b/packages/bridge-ui-v2/src/components/Bridge/AmountInput/index.ts
deleted file mode 100644
index ff5cf90c7ce..00000000000
--- a/packages/bridge-ui-v2/src/components/Bridge/AmountInput/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default as AmountInput } from './AmountInput.svelte';
diff --git a/packages/bridge-ui-v2/src/components/Bridge/Bridge.svelte b/packages/bridge-ui-v2/src/components/Bridge/Bridge.svelte
index 770e2c091a4..86a1baa5d1a 100644
--- a/packages/bridge-ui-v2/src/components/Bridge/Bridge.svelte
+++ b/packages/bridge-ui-v2/src/components/Bridge/Bridge.svelte
@@ -12,9 +12,9 @@
import type { Account } from '$stores/account';
import { type Network, network } from '$stores/network';
- import { AmountInput } from './AmountInput';
+ import { Amount } from './Amount';
import { ProcessingFee } from './ProcessingFee';
- import { RecipientInput } from './RecipientInput';
+ import { Recipient } from './Recipient';
import { destNetwork, selectedToken } from './state';
import SwitchChainsButton from './SwitchChainsButton.svelte';
@@ -45,7 +45,7 @@
-
+
@@ -61,7 +61,7 @@
-