Browse Source

replace multiaddr & unspent tabs by wallet tab in DMT

use-env-var-docker
kenshin-samourai 5 years ago
parent
commit
8cfb520d32
  1. 14
      static/admin/lib/api-wrapper.js
  2. 7
      static/admin/tool/index.html
  3. 15
      static/admin/tool/index.js

14
static/admin/lib/api-wrapper.js

@ -119,18 +119,10 @@ var lib_api = {
},
/**
* Multiaddr
* Wallet
*/
getMultiaddr: function(arguments) {
let uri = this.baseUri + '/multiaddr';
return this.sendGetUriEncoded(uri, arguments);
},
/**
* Unspent
*/
getUnspent: function(arguments) {
let uri = this.baseUri + '/unspent';
getWallet: function(arguments) {
let uri = this.baseUri + '/wallet';
return this.sendGetUriEncoded(uri, arguments);
},

7
static/admin/tool/index.html

@ -64,11 +64,8 @@
<li id="link-rescan-address">
<a href="#">ADDR. RESCAN</a>
</li>
<li id="link-multiaddr">
<a href="#">MULTIADDR</a>
</li>
<li id="link-unspent">
<a href="#">UNSPENT</a>
<li id="link-wallet">
<a href="#">WALLET</a>
</li>
<li id="link-tx">
<a href="#">TX</a>

15
static/admin/tool/index.js

@ -62,8 +62,7 @@ function initTabs() {
'#link-info-address',
'#link-rescan-address',
'#link-rescan-blocks',
'#link-multiaddr',
'#link-unspent',
'#link-wallet',
'#link-tx'
];
@ -142,10 +141,8 @@ function preparePage() {
$("#cell-args2").show();
placeholder = 'RESCAN BLOCKS FROM HEIGHT...';
placeholder2 = '...TO HEIGHT (OPTIONAL)';
} else if (activeTab == '#link-multiaddr') {
placeholder = 'ENTER /MULTIADDR URL ARGUMENTS (e.g.: active=xpub0123456789&new=address2|address3&pubkey=pubkey4)';
} else if (activeTab == '#link-unspent') {
placeholder = 'ENTER /UNSPENT URL ARGUMENTS (e.g.: active=xpub0123456789&new=address2|address3&pubkey=pubkey4)';
} else if (activeTab == '#link-wallet') {
placeholder = 'ENTER /WALLET URL ARGUMENTS (e.g.: active=xpub0123456789&new=address2|address3&pubkey=pubkey4)';
} else if (activeTab == '#link-tx') {
placeholder = 'ENTER A TRANSACTION TXID';
} else if (activeTab == '#link-rescan-xpub') {
@ -231,10 +228,8 @@ function processAction(activeTab, args, args2, args3) {
jsonData[aArg[0]] = aArg[1];
}
if (activeTab == '#link-multiaddr')
return lib_api.getMultiaddr(jsonData);
else if (activeTab == '#link-unspent')
return lib_api.getUnspent(jsonData);
if (activeTab == '#link-wallet')
return lib_api.getWallet(jsonData);
else if (activeTab == '#link-xpub')
return lib_api.postXpub(jsonData);
}

Loading…
Cancel
Save