Skip to content
Snippets Groups Projects
Commit 040d1da5 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

Avoid message "invalid registration" if already a member - fix #194

parent dc685b40
No related branches found
No related tags found
No related merge requests found
...@@ -354,7 +354,7 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser ...@@ -354,7 +354,7 @@ angular.module('cesium.wallet.services', ['ngResource', 'ngApi', 'cesium.bma.ser
data.sigDate = block.time; data.sigDate = block.time;
// Check if self has been done on a valid block // Check if self has been done on a valid block
if (blockNumber!== 0 && blockHash !== block.hash) { if (!data.isMember && blockNumber!== 0 && blockHash !== block.hash) {
addEvent({type: 'error', message: 'ERROR.WALLET_INVALID_BLOCK_HASH'}); addEvent({type: 'error', message: 'ERROR.WALLET_INVALID_BLOCK_HASH'});
console.debug("Invalid membership for uid={0}: block hash not match a real block (block cancelled)".format(data.uid)); console.debug("Invalid membership for uid={0}: block hash not match a real block (block cancelled)".format(data.uid));
} }
......
...@@ -192,7 +192,7 @@ angular.module('cesium.wot.services', ['ngResource', 'ngApi', 'cesium.bma.servic ...@@ -192,7 +192,7 @@ angular.module('cesium.wot.services', ['ngResource', 'ngApi', 'cesium.bma.servic
identity.sigDate = block.time; identity.sigDate = block.time;
// Check if self has been done on a valid block // Check if self has been done on a valid block
if (identity.number !== 0 && identity.hash !== block.hash) { if (!identity.isMember && identity.number !== 0 && identity.hash !== block.hash) {
addEvent(identity, {type: 'error', message: 'ERROR.IDENTITY_INVALID_BLOCK_HASH'}); addEvent(identity, {type: 'error', message: 'ERROR.IDENTITY_INVALID_BLOCK_HASH'});
console.debug("Invalid membership for uid={0}: block hash not match a real block (block cancelled)".format(identity.uid)); console.debug("Invalid membership for uid={0}: block hash not match a real block (block cancelled)".format(identity.uid));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment