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
Port advanced Stardust examples to Wasm #1018
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.
Thanks for porting all the examples to Typescript. Looks good to me so far, minor comments below.
const companyAddress = Bech32Helper.addressFromBech32(companyAddressBech32, networkName); | ||
|
||
// Create a timestamp 24 hours from now. | ||
const tomorrow: number = Math.floor(Date.now() / 1000) + (60 * 60 * 24); |
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.
Could we use the library's Timestamp
and Duration
to simplify this? The only problem was the lack of .toUnix
due to u64/bigint problems in wasm-bindgen`, but that seems to have been fixed with the latest release? rustwasm/wasm-bindgen#3037
Maybe an issue is needed, if only to expose .toUnix
.
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.
Description of change
Links to any relevant issues
#984
Type of change
Add an
x
to the boxes that are relevant to your changes.How the change has been tested
Run the new examples locally and add them as tests to run in CI.
Change checklist
Add an
x
to the boxes that are relevant to your changes.