-
Notifications
You must be signed in to change notification settings - Fork 152
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: add connect wallet functionality to Swap component #1173
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -53,7 +57,7 @@ export const Wallet = ({ children }: WalletReact) => { | |||
|
|||
return ( | |||
<WalletProvider> | |||
<WalletContent>{children}</WalletContent> | |||
<WalletContent className={className}>{children}</WalletContent> |
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.
nice
src/swap/types.ts
Outdated
@@ -121,6 +131,7 @@ export type SwapButtonReact = { | |||
}; | |||
|
|||
export type SwapContextType = { | |||
address?: Address; |
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.
Probably we want a line of comment here explain when the address
here is used.
@@ -128,7 +142,17 @@ export function SwapProvider({ | |||
destination.setLoading(true); | |||
setLifeCycleStatus({ | |||
statusName: 'amountChange', | |||
statusData: null, | |||
statusData: { | |||
// when fetching quote, the previous |
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.
love the comments
|
||
const isMissingRequiredFields = | ||
!!statusData && | ||
'isMissingRequiredField' in statusData && |
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.
ok nice
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.
Ok, brilliant!!!
I know it's hard to think Life Cycle Status first, but this PR really helps showcase how this can happen.
It's more work for us, but overall keeps all the data layer better organized in one place.
const { chainId } = useContext(AppContext); | ||
|
||
console.log('base', base.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.
nit: remove
What changed? Why?
Screen.Recording.2024-08-27.at.12.17.00.PM.mov
Notes to reviewers
How has it been tested?