Skip to content

Commit

Permalink
move btn disable before async funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
amiraabouhadid committed Dec 15, 2024
1 parent 2ad9eb5 commit 2a63f6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/playground/src/dashboard/transfer_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,16 @@ async function transfer(recipientTwin: Twin) {
}
}
async function submitFormAddress() {
isValidAddressTransfer.value = false;
loadingAddressTransfer.value = true;
await transfer(recepTwinFromAddress.value!);
loadingAddressTransfer.value = false;
isValidAddressTransfer.value = false;
}
function createInvalidTransferToast(message: string) {
createCustomToast(message, ToastType.danger);
}
async function submitFormTwinID() {
isValidTwinIDTransfer.value = false;
if (gridStore) {
const twinDetails = await gridStore.client.twins.get({
id: parseInt(recipientTwinId.value.trim()),
Expand All @@ -246,6 +247,5 @@ async function submitFormTwinID() {
createInvalidTransferToast("twin ID doesn't exist");
}
}
isValidTwinIDTransfer.value = false;
}
</script>

0 comments on commit 2a63f6e

Please sign in to comment.