From 09e0413d381bfd36b2add440b2b26d966469ee03 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 17 Jun 2024 14:44:42 +0000 Subject: [PATCH] trustedcoin: rm dead code (unused server method transfer_credit) --- electrum/plugins/trustedcoin/trustedcoin.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/electrum/plugins/trustedcoin/trustedcoin.py b/electrum/plugins/trustedcoin/trustedcoin.py index d0008014d..35f600c12 100644 --- a/electrum/plugins/trustedcoin/trustedcoin.py +++ b/electrum/plugins/trustedcoin/trustedcoin.py @@ -234,27 +234,6 @@ class TrustedCoinCosignerClient(Logger): return self.send_request('post', 'cosigner/%s/sign' % quote(id), payload, timeout=60) - def transfer_credit(self, id, recipient, otp, signature_callback): - """ - Transfer a cosigner's credits to another cosigner. - :param id: the id of the sending cosigner - :param recipient: the id of the recipient cosigner - :param otp: the one time password (of the sender) - :param signature_callback: a callback that signs a text message using xpubkey1/0/0 returning a compact sig - """ - payload = { - 'otp': otp, - 'recipient': recipient, - 'timestamp': int(time.time()), - - } - relative_url = 'cosigner/%s/transfer' % quote(id) - full_url = urljoin(self.base_url, relative_url) - headers = { - 'x-signature': signature_callback(full_url + '\n' + json.dumps(payload)) - } - return self.send_request('post', relative_url, payload, headers) - server = TrustedCoinCosignerClient(user_agent="Electrum/" + version.ELECTRUM_VERSION)