Skip to content

Commit

Permalink
offline - delete wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
bokkypoobah committed Apr 21, 2024
1 parent 01fe625 commit f4cc5e8
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion docs/offline.html
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@
</b-form-group>
<b-form-group v-if="address.mode == 'vieworupdate'" label="" label-for="address-update" label-size="sm" label-cols-sm="3" label-align-sm="right" class="mx-0 my-1 p-0">
<b-button size="sm" :disabled="!address.address" id="address-update" @click="addressUpdate()" variant="primary">Update</b-button>
<b-button size="sm" :disabled="!address.address" @click="addressDelete()" variant="warning">Delete</b-button>
</b-form-group>
</b-modal>

Expand Down Expand Up @@ -930,7 +931,11 @@
this.address.type = 'address';
this.address.address = null;
this.address.addressError = null;
// TODO: Reset other address data
this.address.name = null;
this.address.keystore = null;
this.address.password = null;
this.address.passwordError = null;
this.address.privateKey = null;
this.$bvModal.show('modal-address');
},

Expand Down Expand Up @@ -1139,6 +1144,21 @@
this.$bvModal.hide('modal-address');
},

async addressDelete() {
console.log(moment().format("HH:mm:ss") + " addressDelete - this.address: " + JSON.stringify(this.address, null, 2));
this.$bvModal.msgBoxConfirm("Delete " + this.address.address + '?')
.then(confirmed => {
if (confirmed) {
Vue.delete(this.addresses, this.address.address);
localStorage.topSecretsOfflineAddresses = JSON.stringify(this.addresses);
console.log(moment().format("HH:mm:ss") + " addressDelete - this.addresses: " + JSON.stringify(this.addresses, null, 2));
this.$bvModal.hide('modal-address');
}
})
.catch(err => {
});
},

async signMessageSign() {
console.log(moment().format("HH:mm:ss") + " signMessageSign - this.signMessage: " + JSON.stringify(this.signMessage, null, 2));
const walletInfo = this.addresses[this.signMessage.wallet];
Expand Down

0 comments on commit f4cc5e8

Please sign in to comment.