diff --git a/dapp/src/hooks/useDepositBTCTransaction.ts b/dapp/src/hooks/useDepositBTCTransaction.ts index 201567507..5146e1457 100644 --- a/dapp/src/hooks/useDepositBTCTransaction.ts +++ b/dapp/src/hooks/useDepositBTCTransaction.ts @@ -53,13 +53,13 @@ export function useDepositBTCTransaction( // @ts-expect-error adjust types to handle bitcoin wallet wrappers // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment const txhash: string = await client.sendBitcoin(recipient, satoshis) - setInProgress(false) setTransactionHash(txhash) } catch (error) { if (onError) { onError(error) } console.error(error) + } finally { setInProgress(false) } },