tHandle None satoshis properly - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit a4a2eb9b5c6c67e2873bd3eb165f237b4f929990
DIR parent cf44e65ba8fc2e9be025d1d051487586af2c5721
HTML Author: Neil Booth <kyuupichan@gmail.com>
Date: Sat, 26 Sep 2015 17:19:14 +0900
Handle None satoshis properly
Diffstat:
M plugins/exchange_rate.py | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
---
DIR diff --git a/plugins/exchange_rate.py b/plugins/exchange_rate.py
t@@ -416,6 +416,8 @@ class Plugin(BasePlugin, ThreadJob):
return True
def value_str(self, satoshis, rate):
+ if satoshis is None: # Can happen with incomplete history
+ return _("Unknown")
if rate:
value = Decimal(satoshis) / COIN * Decimal(rate)
return "%s" % (self.ccy_amount_str(value, True))