-
Notifications
You must be signed in to change notification settings - Fork 120
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: unify internal transfer transactions #1456
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.
Awesome PR!!! 🚀 Super neat!
); | ||
|
||
// Currently we don't have the option of batching transfer transactions | ||
if (txList.length === 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.
Nitpick: let's prefer the use of the invariant? :)
} catch (err) { | ||
setGeneralErrorMessage(err + ""); | ||
setCurrentStepIndex(0); | ||
setTransaction(undefined); |
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.
After talking to @ChrisHoltDesign we won't have the timeline active on the "Signing" anymore, which simplifies A LOT of things. Maybe you can redirect directly to the transactions page after the storeTransaction
just like I did on #1454 - we can do it in a later PR too
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.
Oh, this is a copy and paste from that you implemented 😁
I'll open a new PR focused on the Timeline 👍
throw new Error("No gas config"); | ||
} | ||
invariant(sourceAddress, "Source address is not defined"); | ||
invariant(chainId, "Chain ID is undefined"); |
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, just maybe, we could use a function to validate these variables here? We're repeating this validation multiple times
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.
Yeah, I agree, some variables on the begin of the component as well. I'll explore this more on the next PRs
I'll merge it and address the comments in the next PR :) |
Create the hook
useTransfer
which can be used to any Namada(internal) transfer transaction (not ibc, maybe yet?).Then, apply it to the
<NamadaTransfer>
,<MaspShield>
and<MaspUnshield>
.Please note that this is the first step for #1297 as the notification implementation for
Transfer
andMasp
page will be the same now, but they both still has some notification issues that should be handled in a different PR focused on the notification systems, not the sdk transaction