1
0

qt console: accept kwargs for commands.py methods

e.g. make_seed(nbits=264, segwit=True)

also allow setting "password" as a kwarg
This commit is contained in:
SomberNight
2019-08-06 05:20:53 +02:00
parent 3a35ab2574
commit 9547fb7b06
2 changed files with 8 additions and 9 deletions

View File

@@ -2087,7 +2087,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
c = commands.Commands(self.config, self.wallet, self.network, lambda: self.console.set_json(True))
methods = {}
def mkfunc(f, method):
return lambda *args: f(method, args, self.password_dialog)
return lambda *args, **kwargs: f(method, args, self.password_dialog, **kwargs)
for m in dir(c):
if m[0]=='_' or m in ['network','wallet','config']: continue
methods[m] = mkfunc(c._run, m)