[wip] done genericizing popup (works!)
now moving on to mansplaining
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user