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

New onboarding: connect to web3 #978

Merged
merged 13 commits into from Sep 9, 2019

Conversation

@sohkai
Copy link
Member

commented Sep 9, 2019

Connects the new onboarding experience with web3.

This is still fairly raw, with various parts to improve:

  • Loading states (for fetching / checking information)
  • Error states (for fetching information / signing transactions)

I also noticed a few issues with our current templates being very close to the gas limit on Rinkeby; we may have to downgrade the Rinkeby environment to always using two transactions for the foreseeable future (but at least it gives us a good place to test multi-transaction onboarding).

May be easier to review commit-by-commit.

sohkai added 7 commits Sep 8, 2019

@auto-assign auto-assign bot requested review from AquiGorka and bpierre Sep 9, 2019

import { ClaimDomain, Review, Voting, Tokens } from '../kit'

import header from './header.svg'
import icon from './icon.svg'

export default {
id: 'company',
id: 'company-template.aragonpm.eth',

This comment has been minimized.

Copy link
@sohkai

sohkai Sep 9, 2019

Author Member

@bpierre I've repurposed each template's id to their aragonPM repo domains, since we need it anyway for ENS resolution.

votingSettings,
financePeriod,
} = data
const { domain, tokens, voting } = data

This comment has been minimized.

Copy link
@sohkai

sohkai Sep 9, 2019

Author Member

@bpierre I went ahead and grouped each configuration step into its own object and adjusted the three templates to use it (these templates' arguments were previously incorrect as well)


if (!cancelled) {
setTransactionProgress(({ signed, errored }) => ({
signed: signed + 1,

This comment has been minimized.

Copy link
@sohkai

sohkai Sep 9, 2019

Author Member

Wasn't sure, but we may want an interim state here, that goes between "waiting for signature" and mined (e.g. "successfully signed and waiting to be mined")?

Right now the state does look kind of odd.

This comment has been minimized.

Copy link
@bpierre

bpierre Sep 9, 2019

Member

Yes, perhaps we could use symbols for these individual statuses? We could also store the time MINE_PENDING started, so we can e.g. make the progress bar move based on that.

  • SIGN_PENDING
  • SIGN_ERROR
  • MINE_PENDING (signing successful)
  • MINE_ERROR
  • SUCCESS
log('Failed onboarding transaction', err)
if (!cancelled) {
setTransactionProgress(({ signed, errored }) => ({
errored: errored + 1,

This comment has been minimized.

Copy link
@sohkai

sohkai Sep 9, 2019

Author Member

This will happen either due to the user cancelling the transaction, or to the transaction itself failing. We should handle this in DeploymentSteps and let the user go back to review (probably easiest?) or resend transactions.

This comment has been minimized.

Copy link
@bpierre

bpierre Sep 9, 2019

Member

Yes I think it could be nice to have the two options? Resend a failed transaction, or come back to the review screen (or to the first configuration screen directly?). /cc @dizzypaty

@@ -265,7 +399,12 @@ function Create() {
>
{status === STATUS_DEPLOYMENT ? (
<Deployment
ready={signedTransactions === deployTransactions.length}
loadingTransactions={fetchingTemplateInformation}

This comment has been minimized.

Copy link
@sohkai

sohkai Sep 9, 2019

Author Member

We may also want to show different UI in DeploymentSteps based on if we're still waiting for the ABI to be fetched before sending transactions.

@bpierre
bpierre approved these changes Sep 9, 2019
sohkai added 3 commits Sep 9, 2019
Onboarding: move templates' ENS resolution to be blocking at the temp…
…late detail level instead of on create

@now now bot temporarily deployed to staging Sep 9, 2019 Inactive

@sohkai sohkai merged commit acee3e7 into onboarding2 Sep 9, 2019

8 of 9 checks passed

build build
Details
install install
Details
lint lint
Details
License Compliance FOSSA is analyzing this commit
Details
WIP Ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
now Deployment has completed
Details

@sohkai sohkai deleted the onboarding2-web3 branch Sep 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.