Skip to content

Commit

Permalink
feat: adds link to chainweaver v3 sign
Browse files Browse the repository at this point in the history
  • Loading branch information
alber70g committed Dec 3, 2024
1 parent b0c2506 commit 7cea52a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/sign-ledger-json.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
} else {
resetSubmit('Note: one or more signatures missing. Submit disabled.');
}
setOpenInChainweaver(JSON.stringify(txn, null, 2));
setSuccess(`Signed! Your signature:`);
disableFields();
} catch (e) {
Expand Down Expand Up @@ -319,6 +320,13 @@
} else return false;
}

function setOpenInChainweaver(msg){
//base64 encode and set link of id `open-in-chainweaver` to `https://wallet.kadena.io/sig-builder?transaction=${msg}`
const encoded = btoa(msg);
const openInChainweaver = document.getElementById('open-in-chainweaver');
openInChainweaver.href = `https://wallet.kadena.io/sig-builder?transaction=${encoded}`;
}

</script>
</head>
<body>
Expand Down Expand Up @@ -365,6 +373,13 @@ <h1>Kadena Sign with Ledger</h1>
<p id="status-lookup">Check your transaction: <br/><a id="status-link"/></a></p>
</div>
<br/>
<a
id="open-in-chainweaver"
target="_blank"
href="https://wallet.kadena.io/sig-builder?transaction="
>
Open in Chainweaver v3 Beta
</a>
<div id="submit-notice" style="display: none" class="ui center orange message"></div>
<button type="button" id="submit-button" class="ui disabled button">Submit Transaction</button>
<div type="text" id="publicKey" hidden /> </div>
Expand Down

0 comments on commit 7cea52a

Please sign in to comment.