-
Notifications
You must be signed in to change notification settings - Fork 86
[react]: add useSendTransaction hook #229
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
base: master
Are you sure you want to change the base?
Conversation
This reverts commit 4fa027d.
…into useSendTransaction
🦋 Changeset detectedLatest commit: e22e4c1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@nickfrosty check this out once (my bad multiple commits in order to fix the changeset file) |
What's the benefit of using a mutation over something like |
@macalinao here we used |
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.
Hey! Nice work on this hook 🎉
Just noticed a small naming issue: the parameter signature
in line 19 should probably be wireTransaction
or transaction
instead.
Currently it's a bit confusing because:
- We're passing IN a transaction (base64 encoded)
- We're getting OUT a signature (the transaction ID)
Using signature
for the input makes it seem like we're passing in a signature, when we're actually passing in the whole transaction. What do you think about renaming it?
@GuiBibeau thanks for the review i'll make sure all the changes which are reviewed will be added by tomorrow |
Problem
Implement the sendTransaction call as a hook
Summary of Changes
as mentioned in #167 to create a sendTransaction hook i have done
useSendTransaction
inhooks/send-transaction.ts
send-transaction.ts
- ensures type safety and correct response shapes for all supported encodingsreact
packageREADME.md