diff --git a/src/components/modals/StakeCAP.svelte b/src/components/modals/StakeCAP.svelte index 2e4bf18..3a5eeb7 100644 --- a/src/components/modals/StakeCAP.svelte +++ b/src/components/modals/StakeCAP.svelte @@ -13,7 +13,7 @@ import { focusInput, hideModal } from '@lib/ui' import LabelValue from '../layout/LabelValue.svelte' - let amount, isSubmitting, walletBalance = "0.0"; + let amount, isSubmitting, isApproving, walletBalance = "0.0"; $: formattedWalletBalance = formatCAPForDisplay(walletBalance); @@ -35,7 +35,12 @@ } async function _approveAsset() { - const result = await approveAsset('CAP', 'FundStore'); + isApproving = true; + try { + await approveAsset('CAP', 'FundStore'); + } finally { + isApproving = false; + } } async function getBalance() { @@ -75,7 +80,7 @@