Browse Source
qt console: fix commands that do not expect a 'wallet' arg
dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
SomberNight
5 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
6 additions and
0 deletions
-
electrum/commands.py
|
|
@ -32,6 +32,7 @@ import ast |
|
|
|
import base64 |
|
|
|
import operator |
|
|
|
import asyncio |
|
|
|
import inspect |
|
|
|
from functools import wraps, partial |
|
|
|
from decimal import Decimal |
|
|
|
from typing import Optional, TYPE_CHECKING, Dict |
|
|
@ -144,6 +145,11 @@ class Commands: |
|
|
|
if cmd.requires_password: |
|
|
|
kwargs['password'] = password |
|
|
|
|
|
|
|
if 'wallet' in kwargs: |
|
|
|
sig = inspect.signature(f) |
|
|
|
if 'wallet' not in sig.parameters: |
|
|
|
kwargs.pop('wallet') |
|
|
|
|
|
|
|
coro = f(*args, **kwargs) |
|
|
|
fut = asyncio.run_coroutine_threadsafe(coro, asyncio.get_event_loop()) |
|
|
|
result = fut.result() |
|
|
|