From 06221f207514c0deffef998471cac4ee5dd9fbc7 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Thu, 26 Oct 2023 01:15:12 +0200 Subject: [PATCH] wallet: store fee for not_enough_{unlocked_,}balance --- src/wallet/wallet_errors.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wallet/wallet_errors.h b/src/wallet/wallet_errors.h index 1ca1b21e4..8c1594412 100644 --- a/src/wallet/wallet_errors.h +++ b/src/wallet/wallet_errors.h @@ -494,11 +494,13 @@ namespace tools : transfer_error(std::move(loc), "not enough unlocked money") , m_available(available) , m_tx_amount(tx_amount) + , m_fee(fee) { } uint64_t available() const { return m_available; } uint64_t tx_amount() const { return m_tx_amount; } + uint64_t fee() const { return m_fee; } std::string to_string() const { @@ -512,6 +514,7 @@ namespace tools private: uint64_t m_available; uint64_t m_tx_amount; + uint64_t m_fee; }; //---------------------------------------------------------------------------------------------------- struct not_enough_money : public transfer_error @@ -520,11 +523,13 @@ namespace tools : transfer_error(std::move(loc), "not enough money") , m_available(available) , m_tx_amount(tx_amount) + , m_fee(fee) { } uint64_t available() const { return m_available; } uint64_t tx_amount() const { return m_tx_amount; } + uint64_t fee() const { return m_fee; } std::string to_string() const { @@ -538,6 +543,7 @@ namespace tools private: uint64_t m_available; uint64_t m_tx_amount; + uint64_t m_fee; }; //---------------------------------------------------------------------------------------------------- struct tx_not_possible : public transfer_error