-
Notifications
You must be signed in to change notification settings - Fork 2
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
Hooks refactors 1 #472
Hooks refactors 1 #472
Conversation
…ts, EOA, and safes
…tor useNeedsFunds for improved balance handling
safeAddress: safe.address, | ||
contractCall: new MulticallContract( | ||
safe.address, | ||
GNOSIS_SAFE_ABI, |
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.
should base on service selected home chain id?
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.
the contracts don't have an assigned chainId in the multicall package, they're processed via chain specific provider in step 2
() => (safeBalance?.ETH || 0) >= (serviceFundRequirements?.eth || 0), | ||
[serviceFundRequirements?.eth, safeBalance], | ||
() => { | ||
if (!serviceFundRequirements) return ; |
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.
also small, but I noticed in needsInitialFunding
you return false in similar cases, but here undefined;
for type safety and consistency, maybe you could specify the return type? might help prevent surprises
const hasEnoughEthForInitialFunding: boolean = useMemo(
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, however, boolean hides that the value is not yet loaded..
i.e. if it's true/false we can't assume that a new value is coming, or it is not yet defined due to awaiting some promise
…ntend' into refactor/hooks
c3c01f2
into
refactor/multi-chain-support-frontend
Proposed changes
Refactor hooks to support updated contexts
About half way through ~
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that apply