mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 09:45:18 +00:00
Merge pull request #1115 from romanz/offline-mode-fix
Offline mode fixes
This commit is contained in:
commit
a44f1bc4d3
2 changed files with 5 additions and 1 deletions
|
@ -689,6 +689,9 @@ class ElectrumWindow(QMainWindow):
|
||||||
for item in self.wallet.get_history(self.current_account):
|
for item in self.wallet.get_history(self.current_account):
|
||||||
tx_hash, conf, value, timestamp, balance = item
|
tx_hash, conf, value, timestamp, balance = item
|
||||||
time_str = _("unknown")
|
time_str = _("unknown")
|
||||||
|
if conf is None and timestamp is None:
|
||||||
|
continue # skip history in offline mode
|
||||||
|
|
||||||
if conf > 0:
|
if conf > 0:
|
||||||
time_str = self.format_time(timestamp)
|
time_str = self.format_time(timestamp)
|
||||||
if conf == -1:
|
if conf == -1:
|
||||||
|
|
|
@ -744,7 +744,8 @@ class Abstract_Wallet(object):
|
||||||
#balance += value
|
#balance += value
|
||||||
conf, timestamp = self.verifier.get_confirmations(tx_hash) if self.verifier else (None, None)
|
conf, timestamp = self.verifier.get_confirmations(tx_hash) if self.verifier else (None, None)
|
||||||
history.append( (tx_hash, conf, value, timestamp) )
|
history.append( (tx_hash, conf, value, timestamp) )
|
||||||
history.sort(key = lambda x: self.verifier.get_txpos(x[0]))
|
if self.verifier:
|
||||||
|
history.sort(key = lambda x: self.verifier.get_txpos(x[0]))
|
||||||
|
|
||||||
c, u = self.get_balance(domain)
|
c, u = self.get_balance(domain)
|
||||||
balance = c + u
|
balance = c + u
|
||||||
|
|
Loading…
Add table
Reference in a new issue