Clean previously generated address
This commit is contained in:
parent
5bfaac7c54
commit
04189f7e7c
1 changed files with 7 additions and 0 deletions
|
@ -175,6 +175,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
document.querySelector('#generated-addr').value = new_address;
|
||||
console.log(`New sub-address for account ${account.getName()}: ${new_address}`);
|
||||
});
|
||||
|
||||
// Add a change event on the main form to remove previously generated address
|
||||
['#account-name', '#sub-addr-name'].forEach((selector) => {
|
||||
document.querySelector(selector).addEventListener('change', () => {
|
||||
document.querySelector('#generated-addr').value = '';
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
|
|
Loading…
Reference in a new issue