Add local smsg addresses if missing.

master^2
tecnovert 6 months ago
parent d93a73c29e
commit 57f238d48e
No known key found for this signature in database
GPG Key ID: 8ED6D8750C4E3F93
  1. 6
      basicswap/basicswap.py

@ -7553,9 +7553,11 @@ class BasicSwap(BaseApp):
use_session = self.openSession(session) use_session = self.openSession(session)
try: try:
mode = '-' if active_ind == 0 else '+' mode = '-' if active_ind == 0 else '+'
self.callrpc('smsglocalkeys', ['recv', mode, address]) rv = self.callrpc('smsglocalkeys', ['recv', mode, address])
if 'not found' in rv['result']:
self.callrpc('smsgaddlocaladdress', [address,])
self.callrpc('smsglocalkeys', ['anon', '-', address])
values = {'active_ind': active_ind, 'addr': address, 'use_type': use_type} values = {'active_ind': active_ind, 'addr': address, 'use_type': use_type}
query_str: str = 'UPDATE smsgaddresses SET active_ind = :active_ind' query_str: str = 'UPDATE smsgaddresses SET active_ind = :active_ind'
if addressnote is not None: if addressnote is not None:
values['note'] = addressnote values['note'] = addressnote

Loading…
Cancel
Save