[wip] various inconsequential changes

This commit is contained in:
2022-11-17 16:01:19 -07:00
parent ab2b816f88
commit 9589adaef8
5 changed files with 95 additions and 52 deletions
+4 -4
View File
@@ -21,7 +21,7 @@
<ol>
<li>Wallet Address: <code class="pv-address"></code></li>
<li>SpendTx Base58: <code class="pv-spendtx-base58"></code></li>
<li>SpendTx Base64: <code class="pv-spendtx-base64"></code></li>
</ol>
<!-- step 1 detect -->
@@ -64,13 +64,13 @@ by your backend</p>
<h5>SpendTx JS object</h5>
<pre id="spendtx-json"></pre>
<h5>SpendTx Base58</h5>
<pre class="pv-spendtx-base58"></pre>
<h5>SpendTx Base64</h5>
<pre class="pv-spendtx-base64"></pre>
<h2>4.3 Sign the transaction (sidekick)</h2>
<ol>
<li><pre class="pv-spendtx-base58"></pre></li>
<li><pre class="pv-spendtx-base64"></pre></li>
</ol>
<button id="sign-spendtx">Sign Transaction</button>
+7 -7
View File
@@ -3,7 +3,7 @@ import * as awcp from './jex_include/local-awcp-0.1.0/dist/awcp.js';
import * as sk from './jex_include/local-sidekick-0.1.0/dist/sidekick.js';
var pv_address: string;
var pv_spendtx_base58: string;
var pv_spendtx_base64: string;
function
set_pv_address
@@ -18,12 +18,12 @@ set_pv_address
}
function
set_pv_spendtx_base58
set_pv_spendtx_base64
(new_address: string)
: void
{
pv_spendtx_base58 = new_address;
for (let elt of document.getElementsByClassName('pv-spendtx-base58'))
pv_spendtx_base64 = new_address;
for (let elt of document.getElementsByClassName('pv-spendtx-base64'))
{
elt.innerHTML = new_address;
}
@@ -175,8 +175,8 @@ form_tx
JSON.stringify(spendtx, undefined, 4);
let tx = await ae_node.PostSpend(ae_node.URL_TESTNET, spendtx);
// @ts-ignore
set_pv_spendtx_base58(tx.tx);
//document.getElementById('spendtx-base58')!.innerHTML =
set_pv_spendtx_base64(tx.tx);
//document.getElementById('spendtx-base64')!.innerHTML =
// JSON.stringify(tx, undefined, 4);
//
}
@@ -187,7 +187,7 @@ sign_tx
: Promise<void>
{
let sign_params = {
tx: pv_spendtx_base58,
tx: pv_spendtx_base64,
// returnsigned: false tells it to propagate the transaction
// returnsigned: true just signs it and returns the signed tx back
returnSigned: true as true,