From bb32a85962d00f94db9a82f3e3e72287dce5a5e8 Mon Sep 17 00:00:00 2001 From: Denys Karmazyn Date: Tue, 26 Nov 2024 11:45:40 +0100 Subject: [PATCH] feat(frontend): handle insufficientFundsForFee case in BtcSendReview (#3755) # Motivation This PR fixes issue described [here](https://github.com/dfinity/oisy-wallet/issues/3480#issuecomment-2491849981) - there was no check in the BTC send flow which makes sure that provided amount and related utxos fee do not exceed available balance. The component now checks `insufficientFundsForFee` case, disabled "send" button if it's true, as well as shows the following user message: error --- .../btc/components/send/BtcSendReview.svelte | 33 +++++++++++++++---- .../btc/components/send/BtcSendReview.spec.ts | 24 +++++++++++--- 2 files changed, 46 insertions(+), 11 deletions(-) diff --git a/src/frontend/src/btc/components/send/BtcSendReview.svelte b/src/frontend/src/btc/components/send/BtcSendReview.svelte index a11f9a8796..eb0b13c2a1 100644 --- a/src/frontend/src/btc/components/send/BtcSendReview.svelte +++ b/src/frontend/src/btc/components/send/BtcSendReview.svelte @@ -1,5 +1,6 @@