Browse Source

Merge branch 'feat_dojo_dmt_messages' into 'develop'

improve the xpub tools screen

See merge request dojo/samourai-dojo!161
use-env-var-docker
kenshin-samourai 4 years ago
parent
commit
e87fb70b31
  1. 8
      static/admin/dmt/xpubs-tools/xpubs-tools.html
  2. 12
      static/admin/dmt/xpubs-tools/xpubs-tools.js

8
static/admin/dmt/xpubs-tools/xpubs-tools.html

@ -23,7 +23,13 @@
<span>This XPUB isn't tracked by your Dojo. Do you want to import it and track its activity?</span>
</div>
<div id="import-deriv-reimport-msg">
<span>This XPUB is already tracked by your Dojo. Do you want to reimport it with a new derivation type?</span>
<span>Do you want to reimport this XPUB with a new derivation type?</span>
<br/><br/>
<span>WARNING: Are you sure you need to retype this XPUB? Generally, the 'auto' derivation will type your XPUB correctly.</span>
<br/>
<span>Retyping your XPUB is reserved for very specific circumstances, and should not be taken lightly.</span>
<br/>
<span>If in doubt, contact <a href="mailto:support@samouraiwallet.com">support@samouraiwallet.com</a></span>
</div>
<div class="spacer20"></div>
<div>

12
static/admin/dmt/xpubs-tools/xpubs-tools.js

@ -2,6 +2,7 @@ const screenXpubsToolsScript = {
explorerInfo: null,
currentXpub: null,
isReimport: false,
initPage: function() {
this.getExplorerInfo()
@ -13,7 +14,7 @@ const screenXpubsToolsScript = {
$('#btn-xpub-rescan-cancel').click(() => {this.hideRescanForm()})
$('#btn-xpub-import-go').click(() => {this.importXpub()})
$('#btn-xpub-details-retype').click(() => {this.showImportForm(true)})
$('#btn-xpub-import-cancel').click(() => {this.showSearchForm()})
$('#btn-xpub-import-cancel').click(() => {this.hideImportForm(this.isReimport)})
$('#xpubs-tool').keyup(evt => {
if (evt.keyCode === 13) {
this.searchXpub()
@ -210,6 +211,8 @@ const screenXpubsToolsScript = {
},
showImportForm: function(isReimport) {
this.isReimport = isReimport
$('#xpubs-tool-search-form').hide()
$('#xpubs-tool-details').hide()
@ -227,6 +230,13 @@ const screenXpubsToolsScript = {
$('#xpubs-tool-import').show()
},
hideImportForm: function(isReimport) {
if (isReimport)
this.showXpubDetails()
else
this.showSearchForm()
},
showXpubDetails: function() {
$('#xpubs-tool-search-form').hide()
$('#xpubs-tool-import').hide()

Loading…
Cancel
Save