Skip to content

Commit

Permalink
fix node import multi method
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-volz committed Oct 15, 2023
1 parent d669b32 commit 82c4466
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion defichain/node/modules/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
4 changes: 0 additions & 4 deletions tests/node/test_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 82c4466

Please sign in to comment.