From 82c4466a6a9505f88b6983878067d4a4a7f84b77 Mon Sep 17 00:00:00 2001 From: eric-volz Date: Sun, 15 Oct 2023 15:45:36 +0200 Subject: [PATCH] fix node import multi method --- defichain/node/modules/wallet.py | 2 +- tests/node/test_wallet.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/defichain/node/modules/wallet.py b/defichain/node/modules/wallet.py index f1762f5..cd64213 100644 --- a/defichain/node/modules/wallet.py +++ b/defichain/node/modules/wallet.py @@ -683,7 +683,7 @@ def importmulti(self, requests: {}, rescan: bool = True) -> [{}]: # 22 """ options = BuildJson() options.append("rescan", rescan) - return self._node._rpc.call("importmulti", requests, rescan) + return self._node._rpc.call("importmulti", requests, options.build()) def importprivkey(self, privkey: str, label: str = "", rescan: bool = True) -> None: # 23 """ diff --git a/tests/node/test_wallet.py b/tests/node/test_wallet.py index a41d53d..c36658d 100644 --- a/tests/node/test_wallet.py +++ b/tests/node/test_wallet.py @@ -201,12 +201,8 @@ def test_importaddress(): # 22 @pytest.mark.query def test_importmulti(): # 23 - string = '.* RPC_TYPE_ERROR: Expected type object, got bool' - with pytest.raises(InternalServerError, match=string): assert node.wallet.importmulti([]) - with pytest.raises(InternalServerError, match=string): assert node.wallet.importmulti([], False) - with pytest.raises(InternalServerError, match=string): assert node.wallet.importmulti(requests=[], rescan=False)