From d5f987c9e96caf8fec101f44d2cd082dc66dd858 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Wed, 4 May 2022 20:41:49 +0200 Subject: [PATCH] hw keepkey: workaround protobuf weirdness this adds a hackish workaround for https://github.com/spesmilo/electrum/issues/7779 --- electrum/plugins/keepkey/clientbase.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/electrum/plugins/keepkey/clientbase.py b/electrum/plugins/keepkey/clientbase.py index 67e7b78d6..5fa2339d7 100644 --- a/electrum/plugins/keepkey/clientbase.py +++ b/electrum/plugins/keepkey/clientbase.py @@ -162,6 +162,9 @@ class KeepKeyClientBase(HardwareClientBase, GuiMixin, Logger): self.transport.write(self.proto.Cancel()) def i4b(self, x): + if x < 0: + # hack. workaround for https://github.com/spesmilo/electrum/issues/7779 + x += 2 ** 32 return pack('>I', x) @runs_in_hwd_thread