From 617103bb2a54990741ade636b697b42ec51cd462 Mon Sep 17 00:00:00 2001 From: Janus Date: Thu, 6 Sep 2018 18:29:55 +0200 Subject: [PATCH] labels: fix saving single label --- electrum/plugins/labels/labels.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electrum/plugins/labels/labels.py b/electrum/plugins/labels/labels.py index 30c0c3127..623023cb7 100644 --- a/electrum/plugins/labels/labels.py +++ b/electrum/plugins/labels/labels.py @@ -54,7 +54,7 @@ class LabelsPlugin(BasePlugin): "walletNonce": nonce, "externalId": self.encode(wallet, item), "encryptedLabel": self.encode(wallet, label)} - asyncio.get_event_loop().create_task(self.do_post_safe("/label", False, bundle)) + asyncio.get_event_loop().create_task(self.do_post_safe("/label", bundle)) # Caller will write the wallet self.set_nonce(wallet, nonce + 1) @@ -71,7 +71,7 @@ class LabelsPlugin(BasePlugin): async def do_post(self, url = "/labels", data=None): url = 'https://' + self.target_host + url async with make_aiohttp_session(self.proxy) as session: - async with session.post(url, data=data) as result: + async with session.post(url, json=data) as result: return await result.json() async def push_thread(self, wallet):