[wip] done genericizing popup (works!)

now moving on to mansplaining
This commit is contained in:
2023-10-23 13:55:53 -06:00
parent 602c232061
commit 546f990b97
4 changed files with 44 additions and 41 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{type, library}.
{realm, local}.
{name, vdk_aeser}.
{version, "0.1.0"}.
{version, "0.1.1"}.
{deps, ["local-vdk_base58-0.1.0",
"local-vdk_base64-0.1.0",
"local-vdk_rlp-0.1.0",
+21 -1
View File
@@ -22,7 +22,8 @@ export {
unbaseNcheck,
baseNcheck,
signed_tx,
mansplain
mansplain,
mansplain_str
}
export type {
@@ -290,6 +291,24 @@ signed_tx
/**
* Take apart some API-encoded data and return a string that explains it to the
* user.
*
* Mostly for the "confirm transaction" popup
*/
async function
mansplain_str
(api_str : string)
: Promise<string>
{
let mansplained_obj : object = await mansplain(api_str)
return JSON.stringify(mansplained_obj, undefined, 4);
}
/**
* Take apart some API-encoded data and show its component parts
*
@@ -314,6 +333,7 @@ mansplain
}
/**
* Take RLP encoded bytes and mansplain them
*/