Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| onSubmit, | ||
| receipt, | ||
| statusWriteContract, | ||
| statusWriteContracts, |
There was a problem hiding this comment.
Instead of passing data back and forth from random components, we align the way data is stream by having:
- from the parent pushing down status update
- from the child to the parent set the status
So ideally lifeCycleStatus directs the experience of all components under the same provider.
This creates a drum bit, that help set the tone across all components.
| statusWriteContract === 'pending' || | ||
| statusWriteContracts === 'pending' || | ||
| isLoading; | ||
| lifeCycleStatus.statusName === 'transactionPending' || isLoading; |
There was a problem hiding this comment.
Not a fan of the name transactionPending, something to reflect more in the next few weeks.
| }); | ||
| (useCallsStatus as ReturnType<typeof vi.fn>).mockReturnValue({ | ||
| transactionHash: null, | ||
| status: 'IDLE', |
There was a problem hiding this comment.
apperently we were writing this wrong in a bunch of tests.
| contracts, | ||
| capabilities, | ||
| }); | ||
| }, [writeContractsAsync, contracts, capabilities]); |
There was a problem hiding this comment.
Less is more in this case!
| }, | ||
| }); | ||
| return { status, writeContractAsync, data }; | ||
| } catch (err) { |
There was a problem hiding this comment.
So, I was reflecting on when this try/catch will fire off, and I couldn't figure out a real case this can go off.
So I removed it for now.
What changed? Why?
Notes to reviewers
How has it been tested?