From 3c3fac7ca41396d25f6fe73e317f1af5158ea3d3 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Sat, 8 Dec 2018 04:12:07 +0100 Subject: [PATCH] qt history list: fix shortcut in refresh() --- electrum/util.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/electrum/util.py b/electrum/util.py index f770c67cc..fd2bb4721 100644 --- a/electrum/util.py +++ b/electrum/util.py @@ -146,6 +146,12 @@ class Satoshis(object): def __str__(self): return format_satoshis(self.value) + " BTC" + def __eq__(self, other): + return self.value == other.value + + def __ne__(self, other): + return not (self == other) + # note: this is not a NamedTuple as then its json encoding cannot be customized class Fiat(object): @@ -166,6 +172,12 @@ class Fiat(object): else: return "{:.2f}".format(self.value) + ' ' + self.ccy + def __eq__(self, other): + return self.ccy == other.ccy and self.value == other.value + + def __ne__(self, other): + return not (self == other) + class MyEncoder(json.JSONEncoder): def default(self, obj):