-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[examples] Simple Javascript example for coin transfer #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
bf1827e
to
ff6bdd4
Compare
this is a huge PR, and has same fixes another PR has. I am a bit worried merging it now in regards to conflicts etc |
Sure, we can break it up into 3 PRs, but unfortunately one of them is still going to be big. |
I've shrunk this down to just the javascript example now (github is slow today though) |
ff6bdd4
to
741b801
Compare
let alice = Account.generate({ scheme: 0 }); | ||
let bob = Account.generate({ scheme: 0 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Should we use SigningScheme enum here, instead of directly using 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The enum only exists in Typescript, so unfortunately, it didn't work! Had to use the number directly rather than the enum in Javascript.
It's been an interesting learning of Javascript vs Typescript when using them together
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want both the constants and the enum then (since I was the one who pushed to replace the constants with an enum)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the enum as well, too bad for js i guess lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting.... we might want to have consts for js and enums for ts, we can probably build those "types" in separate files so if you use js import x.js
aca5cbe
to
8e1c2e7
Compare
30d400f
to
b3e922c
Compare
b3e922c
to
063b853
Compare
Description
The javascript example works and is able to do a coin transfer
Test Plan
Related Links