Browse Source

labels: fix saving single label

3.3.3.1
Janus 6 years ago
parent
commit
617103bb2a
  1. 4
      electrum/plugins/labels/labels.py

4
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):

Loading…
Cancel
Save