From bbb96b6e25220b7030c0136e3c3be53976e0601d Mon Sep 17 00:00:00 2001 From: coval3nte <65908512+coval3nte@users.noreply.github.com> Date: Mon, 28 Feb 2022 14:16:43 +0100 Subject: [PATCH 1/2] fix get_balance method --- electrum/interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electrum/interface.py b/electrum/interface.py index 7c3ae041f..955538570 100644 --- a/electrum/interface.py +++ b/electrum/interface.py @@ -1019,8 +1019,8 @@ class Interface(Logger): # check response assert_dict_contains_field(res, field_name='confirmed') assert_dict_contains_field(res, field_name='unconfirmed') - assert_non_negative_integer(res['confirmed']) - assert_non_negative_integer(res['unconfirmed']) + assert_integer(res['confirmed']) + assert_integer(res['unconfirmed']) return res async def get_txid_from_txpos(self, tx_height: int, tx_pos: int, merkle: bool): From f60bbf96d8d5f71735055f14416d5e8b6792e6f9 Mon Sep 17 00:00:00 2001 From: coval3nte <65908512+coval3nte@users.noreply.github.com> Date: Mon, 28 Feb 2022 15:17:56 +0100 Subject: [PATCH 2/2] fix --- electrum/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/interface.py b/electrum/interface.py index 955538570..20d12a189 100644 --- a/electrum/interface.py +++ b/electrum/interface.py @@ -1019,7 +1019,7 @@ class Interface(Logger): # check response assert_dict_contains_field(res, field_name='confirmed') assert_dict_contains_field(res, field_name='unconfirmed') - assert_integer(res['confirmed']) + assert_non_negative_integer(res['confirmed']) assert_integer(res['unconfirmed']) return res