Browse Source

Handle dismiss of sign window with a new one

develop
Ezerous 6 years ago
parent
commit
ffd0b585ad
  1. 2
      app/src/containers/StartTopicContainer.js
  2. 9
      app/src/utils/EthereumIdentityProvider.js

2
app/src/containers/StartTopicContainer.js

@ -120,7 +120,7 @@ class StartTopicContainer extends Component {
placeholder="Post" placeholder="Post"
id="topicMessageInput" id="topicMessageInput"
rows={5} rows={5}
autoHeight autoheight="true"
onChange={this.handleInputChange} onChange={this.handleInputChange}
/>] />]
} }

9
app/src/utils/EthereumIdentityProvider.js

@ -10,7 +10,14 @@ class EthereumIdentityProvider {
async getId () { return this.id; } async getId () { return this.id; }
async signIdentity (data) { async signIdentity (data) {
return await web3.eth.personal.sign(data, this.id,""); //Password not required for MetaMask while(true){ //Insist (e.g. if user dismisses dialog)
try{
return await web3.eth.personal.sign(data, this.id,""); //Password not required for MetaMask
}
catch (e) {
console.error("Failed to sign data.");
}
}
} }
static async verifyIdentity (identity) { static async verifyIdentity (identity) {

Loading…
Cancel
Save