Skip to content

Commit

Permalink
Implement the sub-address generation
Browse files Browse the repository at this point in the history
  • Loading branch information
breard-r committed Jul 25, 2023
1 parent ac3ae54 commit 2699b34
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pwa/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,11 @@ document.addEventListener('DOMContentLoaded', () => {

// Add a click event on the new address button to generate it
document.querySelector('#btn-generate').addEventListener('click', (event) => {
console.log('Generating a new address…');
event.preventDefault();
// TODO
const account = getAccountByName(document.querySelector('#account-name').value);
const new_address = account.genSubAddr(document.querySelector('#sub-addr-name').value);
document.querySelector('#generated-addr').value = new_address;
console.log(`New sub-address for account ${account.getName()}: ${new_address}`);
});
});

Expand Down

0 comments on commit 2699b34

Please sign in to comment.