Skip to content
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

Merged
merged 24 commits into from
Feb 7, 2019

Conversation

jorgelo
Copy link
Contributor

@jorgelo jorgelo commented Feb 6, 2019

  • 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.

@jorgelo jorgelo requested review from tobek and sruddy February 7, 2019 00:16
Copy link
Member

@tobek tobek left a 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.
Copy link
Member

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) {
Copy link
Member

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} />
Copy link
Contributor

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

@sruddy sruddy merged commit 96e8b87 into master Feb 7, 2019
@dankins dankins deleted the jorgelo/CIVIL-307/connect-storefront-to-backend branch February 28, 2019 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants