Browse Source

added confirmation screen...

tags/v3.7.0
jojapoppa 10 months ago
parent
commit
6ea719cbc8
1 changed files with 14 additions and 7 deletions
  1. +14
    -7
      src/js/wsui_main.js

+ 14
- 7
src/js/wsui_main.js View File

@@ -2119,18 +2119,25 @@ function handleSendTransfer(){
<p>Enter this information at: http://rebalancetoken.io/fedoragold</p>
<dl>
<dt class="dt-ib">Amount:</dt>
<dd class="dd-ib">${amt}</dd>
<dd class="dd-ib">
<textarea data-cplabel="Amount" title="click to copy" class="ctcl default-textarea" rows="1" readonly="readonly">${amt}</textarea>
</dd>
<dt class="dt-ib">Proof:</dt>
<dd class="dd-ib">${proof}</dd>
<dd class="dd-ib">
<textarea data-cplabel="Proof" title="click to copy" class="ctcl default-textarea" rows="1" readonly="readonly">${proof}</textarea>
</dd>
<dt class="dt-ib">Transaction:</dt>
<dd class="dd-ib">${transactionHash}</dd>
<dd class="dd-ib">
<textarea data-cplabel="Transaction" title="click to copy" class="ctcl default-textarea" rows="1" readonly="readonly">${transactionHash}</textarea>
</dl>
</div>
</div>`
tpl += `<div class="div-panel-buttons">
<button data-target='#tf-dialog' type="button" class="form-bt button-green" id="button-send-ok">OK</button>
<button data-target='#tf-dialog' type="button" class="form-bt button-green" id="button-send-ok">Launch Bridge</button>
<button data-target='#tf-dialog' type="button" class="form-bt button-red dialog-close-default" id="button-send-ko">Close</button>
</div>`;

let dialog = document.getElementById('tf-dialog');
let newEl = dialog.cloneNode(false);
newEl.innerHTML = tpl;
dialog.parentNode.replaceChild(newEl, dialog);
@@ -2276,16 +2283,16 @@ function handleSendTransfer(){
if (token.length > 0) url = url+'&token_addresses='+token;

const req = https.get(url, options, res => {
log.warn("testERC20Balance page statusCode: "+res.statusCode);
//log.warn("testERC20Balance page statusCode: "+res.statusCode);

res.on('data', (datum) => {
log.warn("datum: "+datum);
//log.warn("datum: "+datum);
let dat = JSON.parse(datum);
let theBalance = '';
if (token.length > 0) theBalance = dat[0].balance;
else theBalance = dat.balance;
let bal = parseFloat(theBalance) / 1000000000000000000;
log.warn("balance data: "+bal);
//log.warn("balance data: "+bal);
resolve(bal);
});



Loading…
Cancel
Save