-
Notifications
You must be signed in to change notification settings - Fork 121
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/1012: Improve Tx API in SDK #1033
Conversation
96c35fd
to
1d8ede5
Compare
0a1516d
to
42dcbcf
Compare
42dcbcf
to
4e0306b
Compare
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 ✅
@@ -22,6 +22,7 @@ export const LedgerConfirmation = (): JSX.Element => { | |||
<ViewKeys | |||
publicKeyAddress={account.publicKey} | |||
transparentAccountAddress={account.address} | |||
trimCharacters={35} |
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.
Missed this in a previous PR
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.
Tested everything except withdraw as I have to wait 8 hours xD LGTM!
4e0306b
to
366c4ee
Compare
Resolves #1012
This PR refactors the response from the various
build_
functions, includingbuild_batch
, to be able to provide via the SDK package a deserialized object that can be inspected and destructured. I think in the future, the@heliax/namada-sdk
should never return a reference to a Rust struct, as it's clunky and breaks TS convention to use. This PR returns an normal TS type where values can be inspected and destructured.NOTES
Instead of returning an instance of a Rust struct
BuiltTx
to the client, return a deserialized tx value:This makes the result of any build function something that can be inspected or destructured.
Testing
Example Tx