diff --git a/frontend/src/components/AccountReceiveTable.vue b/frontend/src/components/AccountReceiveTable.vue index 522cd8acc..434aaaa5e 100644 --- a/frontend/src/components/AccountReceiveTable.vue +++ b/frontend/src/components/AccountReceiveTable.vue @@ -87,6 +87,7 @@ @click="expanded = expanded[0] === props.key ? [] : [props.key]" color="primary" :dense="true" + :disable="isWithdrawInProgress" :flat="true" :label="props.expand ? 'Hide' : 'Withdraw'" /> diff --git a/frontend/src/pages/AccountSend.vue b/frontend/src/pages/AccountSend.vue index cca942616..cf60aca94 100644 --- a/frontend/src/pages/AccountSend.vue +++ b/frontend/src/pages/AccountSend.vue @@ -11,25 +11,26 @@
Recipient's ENS name
- +
Select token to send
- +
Amount to send
- +
- +
@@ -52,11 +53,14 @@ function useSendForm() { const { tokens: tokenOptions, getTokenBalances, balances, umbra, signer, userAddress } = useWalletStore(); const { txNotify } = useAlerts(); + // Form parameters const recipientId = ref(); const token = ref(); const humanAmount = ref(); + + // Helpers const sendFormRef = ref(); - const isSendInProgress = ref(false); + const isSending = ref(false); function isValidId(val: string) { if (val && (ens.isEnsDomain(val) || val.endsWith('.crypto'))) return true; @@ -86,7 +90,7 @@ function useSendForm() { if (amount.gt(balances.value[tokenAddress])) throw new Error('Amount exceeds wallet balance'); // If token, get approval - isSendInProgress.value = true; + isSending.value = true; if (token.value.symbol !== 'ETH') { // Check allowance const tokenContract = new Contract(token.value.address, erc20.abi, signer.value); @@ -106,7 +110,7 @@ function useSendForm() { await tx.wait(); resetForm(); } finally { - isSendInProgress.value = false; + isSending.value = false; } } @@ -119,7 +123,7 @@ function useSendForm() { return { userAddress, - isSendInProgress, + isSending, sendFormRef, recipientId, humanAmount,