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. 7
      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}
/>] />]
} }

7
app/src/utils/EthereumIdentityProvider.js

@ -10,8 +10,15 @@ class EthereumIdentityProvider {
async getId () { return this.id; } async getId () { return this.id; }
async signIdentity (data) { async signIdentity (data) {
while(true){ //Insist (e.g. if user dismisses dialog)
try{
return await web3.eth.personal.sign(data, this.id,""); //Password not required for MetaMask 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) {
// Verify that identity was signed by the ID // Verify that identity was signed by the ID

Loading…
Cancel
Save