-
Notifications
You must be signed in to change notification settings - Fork 22
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
Connect storefront to backend and add wallet component. #873
Connect storefront to backend and add wallet component. #873
Conversation
jorgelo
commented
Feb 6, 2019
•
edited
Loading
edited
- Adds logic to redirect to connect your wallet.
- Includes Toby's add wallet component.
- Covers tickets CIVIL-307 and CIVIL-310
- Adds a nice little helper called LoadUser that returns the user if there is one.
…ct-storefront-to-backend
…storefront-to-backend
…onnect-storefront-to-backend
…onnect-storefront-to-backend
…onnect-storefront-to-backend
…hub.com:joincivil/Civil into jorgelo/CIVIL-307/connect-storefront-to-backend
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.
Looks good!
pathname: `/tokens`, | ||
state: {}, | ||
}); | ||
// TODO(jorgelo): Same as above, there should be a better way to force a refetch. |
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.
Check this again after we merge my PR #867 with updated AccountEthAuth component - the update
property passed to <Mutation>
updates the cached value for the currentUser { ethAddress }
query, which I damn hope also updates the cached value for the larger currentUser
query you use, so it should update state without refresh.
return ( | ||
<Query query={userQuery}> | ||
{({ loading, error, data }) => { | ||
if (loading || error) { |
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.
If you haven't already you should double check that this handles the logged-out state (which will cause this request to error) in the way you expect - unless you're only using this component in routes that require authentication?
return ( | ||
<TokenAccountOuter> | ||
<TokenAccountInner> | ||
<UserTokenAccountHeader /> | ||
<FlexColumns> | ||
<FlexColumnsPrimary> | ||
<FlexColumnsPrimaryModule> | ||
<UserTokenAccountSignup step={"completed"} /> | ||
<UserTokenAccountSignup step={accountSignupStep} /> |
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.
I updated this flow a little bit in a new branch so we're going to have some merge conflicts to work out. Should be easy fixes but there are a few things we should discuss. Same with TokensAccountSignup.tsx