Skip to content

Commit

Permalink
feat(backup): Add encoded seed to the backup dialog
Browse files Browse the repository at this point in the history
Using the backup dialog a user now can just copy their encoded seed to paste it into the node configuration file.
  • Loading branch information
beregovoy68 committed Jul 19, 2016
1 parent 4ef675a commit 9d038bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ <h2>ACCOUNT INFO BACKUP</h2>
<form id="backupForm">
<label for="seedBackup">Seed</label><br/>
<textarea id="seedBackup" class="wInput" rows="3" readonly></textarea><br/>
<label for="encodedSeedBackup">Encoded seed</label><br/>
<textarea id="encodedSeedBackup" class="wInput" rows="3" readonly></textarea><br/>
<label for="privateKeyBackup">Private Key</label><br/>
<input id="privateKeyBackup" class="wInput" type="text" name="privateKeyBackup" readonly/><br/>
<label for="publicKeyBackup">Public Key</label><br/>
Expand Down
3 changes: 3 additions & 0 deletions js/waves.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ var Waves = (function(Waves, $, undefined) {
$('#header-wPop-backup').on($.modal.BEFORE_OPEN, function() {
Waves.apiRequest(Waves.api.waves.address, Waves.publicKey, function(response) {
$('#seedBackup').val(Waves.passphrase);
$('#encodedSeedBackup').val(Base58.encode(converters.stringToByteArray(Waves.passphrase)));
$('#privateKeyBackup').val(Waves.privateKey);
$('#publicKeyBackup').val(Waves.publicKey);
$("#addressBackup").val(Waves.Addressing.fromRawAddress(response.address).getDisplayAddress());
Expand All @@ -379,6 +380,7 @@ var Waves = (function(Waves, $, undefined) {

$('#header-wPop-backup').on($.modal.AFTER_CLOSE, function() {
$('#seedBackup').val('');
$('#encodedSeedBackup').val('');
$('#privateKeyBackup').val('');
$('#publicKeyBackup').val('');
$("#addressBackup").val('');
Expand Down Expand Up @@ -489,6 +491,7 @@ var Waves = (function(Waves, $, undefined) {

//copy to clipboard
var text = "Seed: " + $('#seedBackup').val() + "\n";
text += "Encoded seed: " + $('#encodedSeedBackup').val() + "\n";
text += "Private key: " + $('#privateKeyBackup').val() + "\n";
text += "Public key: " + $('#publicKeyBackup').val() + "\n";
text += "Address: " + $('#addressBackup').val();
Expand Down

0 comments on commit 9d038bc

Please sign in to comment.