Skip to content

Instantly share code, notes, and snippets.

@ryanpedersen42
Created September 9, 2019 01:52
Show Gist options
  • Select an option

  • Save ryanpedersen42/08af2447cbbe686ff9bef13e0bd10acc to your computer and use it in GitHub Desktop.

Select an option

Save ryanpedersen42/08af2447cbbe686ff9bef13e0bd10acc to your computer and use it in GitHub Desktop.
getSecret
getSecret = async () => {
const { displayValueKey, dappSpace } = this.state;
//returns string || object.. undefined if no such key
const displayValue = await dappSpace.private.get(displayValueKey)
if (displayValue) {
await this.setState({ displayValue, displayValueKey: '' });
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment