mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-21 04:05:49 +00:00
Clarified Step 1 instructions
This commit is contained in:
@@ -42,7 +42,12 @@ const main = async () => {
|
|||||||
if (!fs.existsSync(path.join(__dirname, WALLET_DIR , 'seed.txt'))) {
|
if (!fs.existsSync(path.join(__dirname, WALLET_DIR , 'seed.txt'))) {
|
||||||
saveSaltedSeed(WALLET_DIR, seed, password)
|
saveSaltedSeed(WALLET_DIR, seed, password)
|
||||||
} else {
|
} else {
|
||||||
|
try {
|
||||||
seed = loadSaltedSeed(WALLET_DIR, password)
|
seed = loadSaltedSeed(WALLET_DIR, password)
|
||||||
|
} catch (error) {
|
||||||
|
appWindow.webContents.send('open-password-dialog', true)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const wallet = xrpl.Wallet.fromSeed(seed)
|
const wallet = xrpl.Wallet.fromSeed(seed)
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ window.electronAPI.onOpenSeedDialog((_event) => {
|
|||||||
|
|
||||||
const passwordDialog = document.getElementById('password-dialog')
|
const passwordDialog = document.getElementById('password-dialog')
|
||||||
const passwordInput = passwordDialog.querySelector('input')
|
const passwordInput = passwordDialog.querySelector('input')
|
||||||
|
const passwordError = passwordDialog.querySelector('span.invalid-password')
|
||||||
const passwordSubmitButton = passwordDialog.querySelector('button[type="submit"]')
|
const passwordSubmitButton = passwordDialog.querySelector('button[type="submit"]')
|
||||||
const changeSeedButton = passwordDialog.querySelector('button[type="button"]')
|
const changeSeedButton = passwordDialog.querySelector('button[type="button"]')
|
||||||
|
|
||||||
@@ -31,7 +32,10 @@ const handleChangeSeedFn = () => {
|
|||||||
window.electronAPI.requestSeedChange()
|
window.electronAPI.requestSeedChange()
|
||||||
}
|
}
|
||||||
|
|
||||||
window.electronAPI.onOpenPasswordDialog((_event) => {
|
window.electronAPI.onOpenPasswordDialog((_event, showInvalidPassword = false) => {
|
||||||
|
if (showInvalidPassword) {
|
||||||
|
passwordError.innerHTML = 'INVALID PASSWORD'
|
||||||
|
}
|
||||||
passwordSubmitButton.addEventListener('click', handlePasswordSubmitFn, {once : true});
|
passwordSubmitButton.addEventListener('click', handlePasswordSubmitFn, {once : true});
|
||||||
changeSeedButton.addEventListener('click', handleChangeSeedFn, {once : true});
|
changeSeedButton.addEventListener('click', handleChangeSeedFn, {once : true});
|
||||||
passwordDialog.showModal()
|
passwordDialog.showModal()
|
||||||
|
|||||||
@@ -58,7 +58,8 @@
|
|||||||
<form method="dialog">
|
<form method="dialog">
|
||||||
<div>
|
<div>
|
||||||
<label for="password-input">Enter password (min-length 5):</label><br />
|
<label for="password-input">Enter password (min-length 5):</label><br />
|
||||||
<input type="text" id="password-input" name="password-input" />
|
<input type="text" id="password-input" name="password-input" /><br />
|
||||||
|
<span class="invalid-password"></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="button">Change Seed</button>
|
<button type="button">Change Seed</button>
|
||||||
|
|||||||
@@ -42,7 +42,12 @@ const main = async () => {
|
|||||||
if (!fs.existsSync(path.join(__dirname, WALLET_DIR , 'seed.txt'))) {
|
if (!fs.existsSync(path.join(__dirname, WALLET_DIR , 'seed.txt'))) {
|
||||||
saveSaltedSeed(WALLET_DIR, seed, password)
|
saveSaltedSeed(WALLET_DIR, seed, password)
|
||||||
} else {
|
} else {
|
||||||
|
try {
|
||||||
seed = loadSaltedSeed(WALLET_DIR, password)
|
seed = loadSaltedSeed(WALLET_DIR, password)
|
||||||
|
} catch (error) {
|
||||||
|
appWindow.webContents.send('open-password-dialog', true)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const wallet = xrpl.Wallet.fromSeed(seed)
|
const wallet = xrpl.Wallet.fromSeed(seed)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ window.electronAPI.onOpenSeedDialog((_event) => {
|
|||||||
|
|
||||||
const passwordDialog = document.getElementById('password-dialog')
|
const passwordDialog = document.getElementById('password-dialog')
|
||||||
const passwordInput = passwordDialog.querySelector('input')
|
const passwordInput = passwordDialog.querySelector('input')
|
||||||
|
const passwordError = passwordDialog.querySelector('span.invalid-password')
|
||||||
const passwordSubmitButton = passwordDialog.querySelector('button[type="submit"]')
|
const passwordSubmitButton = passwordDialog.querySelector('button[type="submit"]')
|
||||||
const changeSeedButton = passwordDialog.querySelector('button[type="button"]')
|
const changeSeedButton = passwordDialog.querySelector('button[type="button"]')
|
||||||
|
|
||||||
@@ -30,7 +31,10 @@ const handleChangeSeedFn = () => {
|
|||||||
window.electronAPI.requestSeedChange()
|
window.electronAPI.requestSeedChange()
|
||||||
}
|
}
|
||||||
|
|
||||||
window.electronAPI.onOpenPasswordDialog((_event) => {
|
window.electronAPI.onOpenPasswordDialog((_event, showInvalidPassword = false) => {
|
||||||
|
if (showInvalidPassword) {
|
||||||
|
passwordError.innerHTML = 'INVALID PASSWORD'
|
||||||
|
}
|
||||||
passwordSubmitButton.addEventListener('click', handlePasswordSubmitFn, {once : true});
|
passwordSubmitButton.addEventListener('click', handlePasswordSubmitFn, {once : true});
|
||||||
changeSeedButton.addEventListener('click', handleChangeSeedFn, {once : true});
|
changeSeedButton.addEventListener('click', handleChangeSeedFn, {once : true});
|
||||||
passwordDialog.showModal()
|
passwordDialog.showModal()
|
||||||
|
|||||||
@@ -102,7 +102,8 @@
|
|||||||
<form method="dialog">
|
<form method="dialog">
|
||||||
<div>
|
<div>
|
||||||
<label for="password-input">Enter password (min-length 5):</label><br />
|
<label for="password-input">Enter password (min-length 5):</label><br />
|
||||||
<input type="text" id="password-input" name="password-input" />
|
<input type="text" id="password-input" name="password-input" /><br />
|
||||||
|
<span class="invalid-password"></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="button">Change Seed</button>
|
<button type="button">Change Seed</button>
|
||||||
|
|||||||
@@ -43,7 +43,12 @@ const main = async () => {
|
|||||||
if (!fs.existsSync(path.join(__dirname, WALLET_DIR , 'seed.txt'))) {
|
if (!fs.existsSync(path.join(__dirname, WALLET_DIR , 'seed.txt'))) {
|
||||||
saveSaltedSeed(WALLET_DIR, seed, password)
|
saveSaltedSeed(WALLET_DIR, seed, password)
|
||||||
} else {
|
} else {
|
||||||
|
try {
|
||||||
seed = loadSaltedSeed(WALLET_DIR, password)
|
seed = loadSaltedSeed(WALLET_DIR, password)
|
||||||
|
} catch (error) {
|
||||||
|
appWindow.webContents.send('open-password-dialog', true)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const wallet = xrpl.Wallet.fromSeed(seed)
|
const wallet = xrpl.Wallet.fromSeed(seed)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ window.electronAPI.onOpenSeedDialog((_event) => {
|
|||||||
|
|
||||||
const passwordDialog = document.getElementById('password-dialog')
|
const passwordDialog = document.getElementById('password-dialog')
|
||||||
const passwordInput = passwordDialog.querySelector('input')
|
const passwordInput = passwordDialog.querySelector('input')
|
||||||
|
const passwordError = passwordDialog.querySelector('span.invalid-password')
|
||||||
const passwordSubmitButton = passwordDialog.querySelector('button[type="submit"]')
|
const passwordSubmitButton = passwordDialog.querySelector('button[type="submit"]')
|
||||||
const changeSeedButton = passwordDialog.querySelector('button[type="button"]')
|
const changeSeedButton = passwordDialog.querySelector('button[type="button"]')
|
||||||
|
|
||||||
@@ -30,7 +31,10 @@ const handleChangeSeedFn = () => {
|
|||||||
window.electronAPI.requestSeedChange()
|
window.electronAPI.requestSeedChange()
|
||||||
}
|
}
|
||||||
|
|
||||||
window.electronAPI.onOpenPasswordDialog((_event) => {
|
window.electronAPI.onOpenPasswordDialog((_event, showInvalidPassword = false) => {
|
||||||
|
if (showInvalidPassword) {
|
||||||
|
passwordError.innerHTML = 'INVALID PASSWORD'
|
||||||
|
}
|
||||||
passwordSubmitButton.addEventListener('click', handlePasswordSubmitFn, {once : true});
|
passwordSubmitButton.addEventListener('click', handlePasswordSubmitFn, {once : true});
|
||||||
changeSeedButton.addEventListener('click', handleChangeSeedFn, {once : true});
|
changeSeedButton.addEventListener('click', handleChangeSeedFn, {once : true});
|
||||||
passwordDialog.showModal()
|
passwordDialog.showModal()
|
||||||
|
|||||||
@@ -138,7 +138,8 @@
|
|||||||
<form method="dialog">
|
<form method="dialog">
|
||||||
<div>
|
<div>
|
||||||
<label for="password-input">Enter password (min-length 5):</label><br />
|
<label for="password-input">Enter password (min-length 5):</label><br />
|
||||||
<input type="text" id="password-input" name="password-input" />
|
<input type="text" id="password-input" name="password-input" /><br />
|
||||||
|
<span class="invalid-password"></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="button">Change Seed</button>
|
<button type="button">Change Seed</button>
|
||||||
|
|||||||
@@ -44,7 +44,12 @@ const main = async () => {
|
|||||||
if (!fs.existsSync(path.join(__dirname, WALLET_DIR , 'seed.txt'))) {
|
if (!fs.existsSync(path.join(__dirname, WALLET_DIR , 'seed.txt'))) {
|
||||||
saveSaltedSeed(WALLET_DIR, seed, password)
|
saveSaltedSeed(WALLET_DIR, seed, password)
|
||||||
} else {
|
} else {
|
||||||
|
try {
|
||||||
seed = loadSaltedSeed(WALLET_DIR, password)
|
seed = loadSaltedSeed(WALLET_DIR, password)
|
||||||
|
} catch (error) {
|
||||||
|
appWindow.webContents.send('open-password-dialog', true)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const wallet = xrpl.Wallet.fromSeed(seed)
|
const wallet = xrpl.Wallet.fromSeed(seed)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ window.electronAPI.onOpenSeedDialog((_event) => {
|
|||||||
|
|
||||||
const passwordDialog = document.getElementById('password-dialog')
|
const passwordDialog = document.getElementById('password-dialog')
|
||||||
const passwordInput = passwordDialog.querySelector('input')
|
const passwordInput = passwordDialog.querySelector('input')
|
||||||
|
const passwordError = passwordDialog.querySelector('span.invalid-password')
|
||||||
const passwordSubmitButton = passwordDialog.querySelector('button[type="submit"]')
|
const passwordSubmitButton = passwordDialog.querySelector('button[type="submit"]')
|
||||||
const changeSeedButton = passwordDialog.querySelector('button[type="button"]')
|
const changeSeedButton = passwordDialog.querySelector('button[type="button"]')
|
||||||
|
|
||||||
@@ -30,7 +31,10 @@ const handleChangeSeedFn = () => {
|
|||||||
window.electronAPI.requestSeedChange()
|
window.electronAPI.requestSeedChange()
|
||||||
}
|
}
|
||||||
|
|
||||||
window.electronAPI.onOpenPasswordDialog((_event) => {
|
window.electronAPI.onOpenPasswordDialog((_event, showInvalidPassword = false) => {
|
||||||
|
if (showInvalidPassword) {
|
||||||
|
passwordError.innerHTML = 'INVALID PASSWORD'
|
||||||
|
}
|
||||||
passwordSubmitButton.addEventListener('click', handlePasswordSubmitFn, {once : true});
|
passwordSubmitButton.addEventListener('click', handlePasswordSubmitFn, {once : true});
|
||||||
changeSeedButton.addEventListener('click', handleChangeSeedFn, {once : true});
|
changeSeedButton.addEventListener('click', handleChangeSeedFn, {once : true});
|
||||||
passwordDialog.showModal()
|
passwordDialog.showModal()
|
||||||
|
|||||||
@@ -141,7 +141,8 @@
|
|||||||
<form method="dialog">
|
<form method="dialog">
|
||||||
<div>
|
<div>
|
||||||
<label for="password-input">Enter password (min-length 5):</label><br />
|
<label for="password-input">Enter password (min-length 5):</label><br />
|
||||||
<input type="text" id="password-input" name="password-input" />
|
<input type="text" id="password-input" name="password-input" /><br />
|
||||||
|
<span class="invalid-password"></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="button">Change Seed</button>
|
<button type="button">Change Seed</button>
|
||||||
|
|||||||
@@ -64,6 +64,10 @@ main {
|
|||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.invalid-password {
|
||||||
|
color: #dc3545;
|
||||||
|
}
|
||||||
|
|
||||||
.accountVerificationIndicator{
|
.accountVerificationIndicator{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -859,7 +859,12 @@ const main = async () => {
|
|||||||
if (!fs.existsSync(path.join(__dirname, WALLET_DIR , 'seed.txt'))) {
|
if (!fs.existsSync(path.join(__dirname, WALLET_DIR , 'seed.txt'))) {
|
||||||
saveSaltedSeed('../' + WALLET_DIR, seed, password)
|
saveSaltedSeed('../' + WALLET_DIR, seed, password)
|
||||||
} else {
|
} else {
|
||||||
seed = loadSaltedSeed('../' + WALLET_DIR, password)
|
try {
|
||||||
|
seed = loadSaltedSeed(WALLET_DIR, password)
|
||||||
|
} catch (error) {
|
||||||
|
appWindow.webContents.send('open-password-dialog', true)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const wallet = xrpl.Wallet.fromSeed(seed)
|
const wallet = xrpl.Wallet.fromSeed(seed)
|
||||||
@@ -942,7 +947,8 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
|||||||
<form method="dialog">
|
<form method="dialog">
|
||||||
<div>
|
<div>
|
||||||
<label for="password-input">Enter password (min-length 5):</label>
|
<label for="password-input">Enter password (min-length 5):</label>
|
||||||
<input type="text" id="password-input" name="password-input" />
|
<input type="text" id="password-input" name="password-input" /><br />
|
||||||
|
<span class="invalid-password"></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="button">Change Seed</button>
|
<button type="button">Change Seed</button>
|
||||||
@@ -994,6 +1000,7 @@ window.electronAPI.onOpenSeedDialog((_event) => {
|
|||||||
|
|
||||||
const passwordDialog = document.getElementById('password-dialog')
|
const passwordDialog = document.getElementById('password-dialog')
|
||||||
const passwordInput = passwordDialog.querySelector('input')
|
const passwordInput = passwordDialog.querySelector('input')
|
||||||
|
const passwordError = passwordDialog.querySelector('span.invalid-password')
|
||||||
const passwordSubmitButton = passwordDialog.querySelector('button[type="submit"]')
|
const passwordSubmitButton = passwordDialog.querySelector('button[type="submit"]')
|
||||||
const changeSeedButton = passwordDialog.querySelector('button[type="button"]')
|
const changeSeedButton = passwordDialog.querySelector('button[type="button"]')
|
||||||
|
|
||||||
@@ -1008,7 +1015,10 @@ const handleChangeSeedFn = () => {
|
|||||||
window.electronAPI.requestSeedChange()
|
window.electronAPI.requestSeedChange()
|
||||||
}
|
}
|
||||||
|
|
||||||
window.electronAPI.onOpenPasswordDialog((_event) => {
|
window.electronAPI.onOpenPasswordDialog((_event, showInvalidPassword = false) => {
|
||||||
|
if (showInvalidPassword) {
|
||||||
|
passwordError.innerHTML = 'INVALID PASSWORD'
|
||||||
|
}
|
||||||
passwordSubmitButton.addEventListener('click', handlePasswordSubmitFn, {once : true});
|
passwordSubmitButton.addEventListener('click', handlePasswordSubmitFn, {once : true});
|
||||||
changeSeedButton.addEventListener('click', handleChangeSeedFn, {once : true});
|
changeSeedButton.addEventListener('click', handleChangeSeedFn, {once : true});
|
||||||
passwordDialog.showModal()
|
passwordDialog.showModal()
|
||||||
|
|||||||
Reference in New Issue
Block a user