[wip] done genericizing popup (works!)
now moving on to mansplaining
This commit is contained in:
@@ -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