|
@ -11,8 +11,11 @@ const screenXpubsToolsScript = { |
|
|
$('#btn-xpub-search-go').click(() => {this.searchXpub()}) |
|
|
$('#btn-xpub-search-go').click(() => {this.searchXpub()}) |
|
|
$('#btn-xpub-details-reset').click(() => {this.showSearchForm()}) |
|
|
$('#btn-xpub-details-reset').click(() => {this.showSearchForm()}) |
|
|
$('#btn-xpub-details-rescan').click(() => {this.showRescanForm()}) |
|
|
$('#btn-xpub-details-rescan').click(() => {this.showRescanForm()}) |
|
|
|
|
|
$('#btn-xpub-details-delete').click(() => {this.showDeletionForm()}) |
|
|
$('#btn-xpub-rescan-go').click(() => {this.rescanXpub()}) |
|
|
$('#btn-xpub-rescan-go').click(() => {this.rescanXpub()}) |
|
|
$('#btn-xpub-rescan-cancel').click(() => {this.hideRescanForm()}) |
|
|
$('#btn-xpub-rescan-cancel').click(() => {this.hideRescanForm()}) |
|
|
|
|
|
$('#btn-xpub-delete-go').click(() => {this.deleteXpub()}) |
|
|
|
|
|
$('#btn-xpub-delete-cancel').click(() => {this.hideDeletionForm()}) |
|
|
$('#btn-xpub-import-go').click(() => {this.importXpub()}) |
|
|
$('#btn-xpub-import-go').click(() => {this.importXpub()}) |
|
|
$('#btn-xpub-details-retype').click(() => {this.showImportForm(true)}) |
|
|
$('#btn-xpub-details-retype').click(() => {this.showImportForm(true)}) |
|
|
$('#btn-xpub-import-cancel').click(() => {this.hideImportForm(this.isReimport)}) |
|
|
$('#btn-xpub-import-cancel').click(() => {this.hideImportForm(this.isReimport)}) |
|
@ -25,6 +28,7 @@ const screenXpubsToolsScript = { |
|
|
|
|
|
|
|
|
preparePage: function() { |
|
|
preparePage: function() { |
|
|
this.hideRescanForm() |
|
|
this.hideRescanForm() |
|
|
|
|
|
this.hideDeletionForm() |
|
|
this.showSearchForm() |
|
|
this.showSearchForm() |
|
|
$("#xpub").focus() |
|
|
$("#xpub").focus() |
|
|
}, |
|
|
}, |
|
@ -128,6 +132,18 @@ const screenXpubsToolsScript = { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
deleteXpub: function() { |
|
|
|
|
|
lib_msg.displayMessage('Deleting a xpub. Please wait...') |
|
|
|
|
|
return lib_api.getXpubDelete(this.currentXpub) |
|
|
|
|
|
.then(result => { |
|
|
|
|
|
this.currentXpub = null |
|
|
|
|
|
this.preparePage() |
|
|
|
|
|
lib_msg.displayInfo('Xpub successfully deleted') |
|
|
|
|
|
}).catch(e => { |
|
|
|
|
|
lib_errors.processError(e) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
checkRescanStatus: function(callback) { |
|
|
checkRescanStatus: function(callback) { |
|
|
this.rescanStatusTimerId = setTimeout(() => { |
|
|
this.rescanStatusTimerId = setTimeout(() => { |
|
|
lib_api.getXpubRescanStatus(this.currentXpub) |
|
|
lib_api.getXpubRescanStatus(this.currentXpub) |
|
@ -281,6 +297,17 @@ const screenXpubsToolsScript = { |
|
|
$('#xpubs-tool-actions').show() |
|
|
$('#xpubs-tool-actions').show() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showDeletionForm: function() { |
|
|
|
|
|
$('#xpubs-tool-actions').hide() |
|
|
|
|
|
$('#xpubs-deletion-actions').show() |
|
|
|
|
|
lib_msg.cleanMessagesUi() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
hideDeletionForm: function() { |
|
|
|
|
|
$('#xpubs-deletion-actions').hide() |
|
|
|
|
|
$('#xpubs-tool-actions').show() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
screenScripts.set('#screen-xpubs-tools', screenXpubsToolsScript) |
|
|
screenScripts.set('#screen-xpubs-tools', screenXpubsToolsScript) |
|
|