Last active
December 27, 2019 19:33
-
-
Save ryanpedersen42/c3f2694284e0bb8f7b9e7d9208b3b128 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| auth3Box = async () => { | |
| const { user, logUserIn, history, setUserProfile, setBox, setDappSpace } = this.props; | |
| const box = await Box.openBox(user.ethAddress, window.ethereum, {}); | |
| await new Promise((resolve, reject) => box.onSyncDone(resolve)); | |
| const dappSpace = await box.openSpace('catRoulette'); | |
| const userProfile = await Box.getProfile(user.ethAddress) | |
| await setBox(box) | |
| await setDappSpace(dappSpace) | |
| await setUserProfile(userProfile) | |
| await logUserIn() | |
| history.push('/main') | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment