Skip to content

Instantly share code, notes, and snippets.

@onpaws
Last active January 16, 2019 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onpaws/c063cee614239b9463788329823e6fcb to your computer and use it in GitHub Desktop.
Save onpaws/c063cee614239b9463788329823e6fcb to your computer and use it in GitHub Desktop.
Thoughts on Digitizer mutation & async behavior

Method A

Look for the receipt event 12th confirmation event matching a certain UUID

component Implementation: https://github.com/apollographql/react-apollo/blob/master/src/Subscriptions.tsx Docs: https://www.apollographql.com/docs/react/api/react-apollo.html#subscription

The component doesn't expose the raw WebSocket, but we can filter the data prop.

Method B

Have the FE originate the UUID.

Pass it in as a required param to the mutation? for example...

mint(custodianAddress, amount, contractAddress) { uuid }

becomes

mint(custodianAddress, amount, contractAddress, uuid) { amount }

mint(custodianAddress, amount, contractAddress, uuid) { uuid }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment