Added instructions on which code to remove in Step 5

This commit is contained in:
AlexanderBuzz
2023-07-28 11:40:58 +02:00
parent a5e2c9c774
commit 64cca16dc2

View File

@@ -941,7 +941,28 @@ contextBridge.exposeInMainWorld('electronAPI', {
</dialog>
```
6. In `view/renderer.js` add at the top:
6. In `view/renderer.js`, replace the `openAccountAddressDialog` part at the top:
```javascript
// Remove the following section in Step 5
document.addEventListener('DOMContentLoaded', openAccountAddressDialog);
function openAccountAddressDialog(){
const accountAddressDialog = document.getElementById('account-address-dialog');
const accountAddressInput = accountAddressDialog.querySelector('input');
const submitButton = accountAddressDialog.querySelector('button[type="submit"]');
submitButton.addEventListener('click', () => {
const address = accountAddressInput.value;
window.electronAPI.onEnterAccountAddress(address)
accountAddressDialog.close()
});
accountAddressDialog.showModal()
}
```
With this code:
```javascript
window.electronAPI.onOpenSeedDialog((_event) => {