-
Notifications
You must be signed in to change notification settings - Fork 101
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
feat: cleanup memory on rust panic #317
Conversation
packages/shared/src/index.ts
Outdated
(...args: U): Promise<T> => { | ||
return new Promise(async (resolve, reject) => { | ||
const t = setTimeout(() => { | ||
reject(`Balance query timed out after ${timeout}s.`); |
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.
Maybe we could do something like promiseWithTimeout where we pass in the error message as an arg to display, as these are not all balance queries?
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.
Ah yeah :) Focused too much on balances 👍
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 think this looks good! I just left a minor comment
This fixes a bug introduced in #317 where `new Query` cannot be called because Query was transpiled to ES5 and relies on the class it extends to also be transpiled, but the parent class was generated from Rust and not transpiled. target JS version for namada-interface too.
This fixes a bug introduced in #317 where `new Query` cannot be called because Query was transpiled to ES5 and relies on the class it extends to also be transpiled, but the parent class was generated from Rust and not transpiled. PR #317 already fixed this for the extension; this commit just sets the target JS version for namada-interface too.
Context:
What've changed:
wasm:build:dev
wasm:build:dev
we define panic_hook - addeddev
featurees2015
to be able to extend generated Query classWe can do something similar for the Sdk class, it might be a bit tricky though as for example submit shielded transfer can take a while