Helper function to parseADA to Lovelace #143
nstanford5
started this conversation in
Ideas
Replies: 1 comment
-
I would like to have this type of functionality in a broader concept called TemplateParameters. Currently, that is part of Marlowe Extended, you can check it on the Playground's metadata tab I think it would be good to separate the concept from Marlowe Extended and make a sort DSL with constraints, to be able to say stuff like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Most DApps will present users with the ability to input token amounts to a UI component. Users typically think in terms of ADA amounts, but we need to send Lovelace amounts to the blockchain.
Should the SDK include a simple helper function to
parseADA
to Lovelace?Something like..
const parseADA = (num: number) => { return num * 1000000; };
On the other side of that, when querying the blockchain for amounts -- it will return Lovelace that needs to be formatted to ADA to present to users.
Should we also include a
formatLovelace
function?Beta Was this translation helpful? Give feedback.
All reactions