How to use the arc.checkNetworkAndWarn function in arc

To help you get started, we’ve selected a few arc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github daostack / alchemy / src / components / CreateProposal / SchemeForms / CreateSchemeRegistrarProposal.tsx View on Github external
public async handleSubmit(values: FormValues, { setSubmitting }: any ) {
    if (!(await checkNetworkAndWarn(this.props.showNotification))) { return; }

    const proposalValues = {...values,
      type: IProposalType.SchemeRegistrarPropose,
      parametersHash: "0x0000000000000000000000000000000000000000000000000000000000001234", //TODO: use real value
      permissions: "0x0000001f" // values.permissions.registerOtherSchemes
    };

    setSubmitting(false);
    await this.props.createProposal(this.props.daoAvatarAddress, proposalValues);
  }