From 409e7a4cb46440f392952471411b20e5bd419ad7 Mon Sep 17 00:00:00 2001
From: shadab-taiko <108871478+shadab-taiko@users.noreply.github.com>
Date: Tue, 3 Jan 2023 18:06:42 +0530
Subject: [PATCH] fix(bridge): fix max amount button (#6246)
* fix(bridge): fix max amount button
* feat(bridge): reduce max token amount to four decimal digits
---
packages/bridge-ui/src/components/form/BridgeForm.svelte | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/packages/bridge-ui/src/components/form/BridgeForm.svelte b/packages/bridge-ui/src/components/form/BridgeForm.svelte
index 5ff95209c76..e198a6f9607 100644
--- a/packages/bridge-ui/src/components/form/BridgeForm.svelte
+++ b/packages/bridge-ui/src/components/form/BridgeForm.svelte
@@ -38,6 +38,7 @@
import FaucetModal from "../modals/FaucetModal.svelte";
let amount: string;
+ let amountInput: HTMLInputElement;
let requiresAllowance: boolean = true;
let btnDisabled: boolean = true;
let tokenBalance: string;
@@ -244,6 +245,7 @@
function useFullAmount() {
amount = tokenBalance;
+ amountInput.value = tokenBalance.toString();
}
function updateAmount(e: any) {
@@ -273,7 +275,7 @@
{/if}
@@ -289,6 +291,7 @@
on:input={updateAmount}
class="input input-primary bg-dark-4 input-md md:input-lg w-full focus:ring-0"
name="amount"
+ bind:this={amountInput}
/>