mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
wallet fixes
This commit is contained in:
parent
642258ebaa
commit
10faf75ee7
2 changed files with 6 additions and 4 deletions
|
@ -840,7 +840,7 @@ class Transaction:
|
||||||
def as_dict(self):
|
def as_dict(self):
|
||||||
import json
|
import json
|
||||||
out = {
|
out = {
|
||||||
"hex":self.raw,
|
"hex":str(self),
|
||||||
"complete":self.is_complete()
|
"complete":self.is_complete()
|
||||||
}
|
}
|
||||||
return out
|
return out
|
||||||
|
@ -849,7 +849,7 @@ class Transaction:
|
||||||
def requires_fee(self, verifier):
|
def requires_fee(self, verifier):
|
||||||
# see https://en.bitcoin.it/wiki/Transaction_fees
|
# see https://en.bitcoin.it/wiki/Transaction_fees
|
||||||
threshold = 57600000
|
threshold = 57600000
|
||||||
size = len(self.raw)/2
|
size = len(str(self))/2
|
||||||
if size >= 10000:
|
if size >= 10000:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -355,7 +355,9 @@ class Abstract_Wallet(object):
|
||||||
return self.accounts[account_id].get_pubkeys(*sequence)
|
return self.accounts[account_id].get_pubkeys(*sequence)
|
||||||
|
|
||||||
def add_keypairs(self, tx, keypairs, password):
|
def add_keypairs(self, tx, keypairs, password):
|
||||||
# first check the provided password. This will raise if invalid.
|
|
||||||
|
if self.is_watching_only():
|
||||||
|
return
|
||||||
self.check_password(password)
|
self.check_password(password)
|
||||||
|
|
||||||
addr_list, xpub_list = tx.inputs_to_sign()
|
addr_list, xpub_list = tx.inputs_to_sign()
|
||||||
|
|
Loading…
Add table
Reference in a new issue