From ffd0b585adfcaf5d94006c8578ff3c3bcffa68fd Mon Sep 17 00:00:00 2001 From: Ezerous Date: Sat, 18 May 2019 16:12:01 +0300 Subject: [PATCH] Handle dismiss of sign window with a new one --- app/src/containers/StartTopicContainer.js | 2 +- app/src/utils/EthereumIdentityProvider.js | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/containers/StartTopicContainer.js b/app/src/containers/StartTopicContainer.js index 7e01e1d..f45b540 100644 --- a/app/src/containers/StartTopicContainer.js +++ b/app/src/containers/StartTopicContainer.js @@ -120,7 +120,7 @@ class StartTopicContainer extends Component { placeholder="Post" id="topicMessageInput" rows={5} - autoHeight + autoheight="true" onChange={this.handleInputChange} />] } diff --git a/app/src/utils/EthereumIdentityProvider.js b/app/src/utils/EthereumIdentityProvider.js index 0ba707b..5f0473e 100644 --- a/app/src/utils/EthereumIdentityProvider.js +++ b/app/src/utils/EthereumIdentityProvider.js @@ -10,7 +10,14 @@ class EthereumIdentityProvider { async getId () { return this.id; } 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) {