ui: Display XMR subaddress on wallets page.

2024-05-20_merge
tecnovert 3 years ago
parent b228f6b408
commit 1e01851152
No known key found for this signature in database
GPG Key ID: 8ED6D8750C4E3F93
  1. 2
      basicswap/basicswap.py
  2. 4
      basicswap/http_server.py
  3. 2
      basicswap/interface_xmr.py
  4. 7
      basicswap/templates/wallets.html
  5. 1
      doc/release-notes.md

@ -5123,6 +5123,8 @@ class BasicSwap(BaseApp):
rv['anon_pending'] = walletinfo['unconfirmed_anon'] + walletinfo['immature_anon_balance']
rv['blind_balance'] = walletinfo['blind_balance']
rv['blind_unconfirmed'] = walletinfo['unconfirmed_blind']
elif coin == Coins.XMR:
rv['main_address'] = self.getCachedMainWalletAddress(ci)
return rv

@ -386,7 +386,6 @@ class HttpHandler(BaseHTTPRequestHandler):
wf['unconfirmed'] = w['unconfirmed']
if k == Coins.PART:
wf['stealth_address'] = w['stealth_address']
wf['blind_balance'] = w['blind_balance']
if float(w['blind_unconfirmed']) > 0.0:
@ -395,6 +394,9 @@ class HttpHandler(BaseHTTPRequestHandler):
if float(w['anon_pending']) > 0.0:
wf['anon_pending'] = w['anon_pending']
elif k == Coins.XMR:
wf['main_address'] = w.get('main_address', 'Refresh necessary')
if 'wd_type_from_' + cid in page_data:
wf['wd_type_from'] = page_data['wd_type_from_' + cid]
if 'wd_type_to_' + cid in page_data:

@ -158,7 +158,7 @@ class XMRInterface(CoinInterface):
with self._mx_wallet:
self._log.warning('TODO - subaddress?')
self.rpc_wallet_cb('open_wallet', {'filename': self._wallet_filename})
return self.rpc_wallet_cb('get_address')['address']
return self.rpc_wallet_cb('create_address', {'account_index': 0})['address']
def get_fee_rate(self, conf_target=2):
self._log.warning('TODO - estimate fee rate?')

@ -39,7 +39,12 @@
{% if w.cid == '1' %}
<tr><td>Stealth Address</td><td colspan=2>{{ w.stealth_address }}</td></tr>
{% endif %}
<tr><td><input type="submit" name="newaddr_{{ w.cid }}" value="Deposit Address"></td><td colspan=2>{{ w.deposit_address }}</td></tr>
{% if w.cid == '6' %}
<tr><td>Main Address</td><td colspan=2>{{ w.main_address }}</td></tr>
<tr><td><input type="submit" name="newaddr_{{ w.cid }}" value="New Subaddress"></td><td colspan=2>{{ w.deposit_address }}</td></tr>
{% else %}
<tr><td><input type="submit" name="newaddr_{{ w.cid }}" value="New Deposit Address"></td><td colspan=2>{{ w.deposit_address }}</td></tr>
{% endif %}
<tr><td><input type="submit" name="withdraw_{{ w.cid }}" value="Withdraw" onclick="return confirmWithdrawal();"></td><td>Amount: <input type="text" name="amt_{{ w.cid }}" value="{{ w.wd_value }}"></td><td>Address: <input type="text" name="to_{{ w.cid }}" value="{{ w.wd_address }}"></td><td>Subtract fee: <input type="checkbox" name="subfee_{{ w.cid }}" {% if w.wd_subfee==true %} checked="true"{% endif %}></td></tr>
{% if w.cid == '1' %}
<tr><td>Type From, To</td><td>

@ -7,6 +7,7 @@
- Prevent old shutdown link from shutting down a new session.
- ui: Connected XMR wallet to rpc page.
- Separate chain to generate smsg addresses.
- ui: Display XMR subaddress on wallets page.
0.0.26

Loading…
Cancel
Save