message sign confirmation works perfectly

Need to check transaction signing. But we're in the home stretch.
This commit is contained in:
2023-10-23 12:02:28 -06:00
parent 72c844e34c
commit 602c232061
2 changed files with 53 additions and 15 deletions
+4 -2
View File
@@ -6,12 +6,14 @@ async function main() {
let port = browser.runtime.connect();
// wait for a message
port.onMessage.addListener(
function({title, miscinfo, timeout_ms}) {
function({title, miscinfo}) {
console.log('title', title);
console.log('miscinfo', miscinfo);
console.log('timeout_ms', timeout_ms);
document.getElementById('title-h1').innerHTML = title;
document.getElementById('miscinfo').innerHTML = miscinfo;
document.getElementById('good').onclick = function() { port.postMessage('good'); };
document.getElementById('bad').onclick = function() { port.postMessage('bad'); };
}
);
}