poanetwork / poa-popa

DApp for proof of physical address (PoPA) attestation for validators of POA Network
https://popa.poa.network
GNU General Public License v3.0
24 stars 18 forks source link

(Refactor) explicitly check claim is nonzero before decoding #147

Closed phahulin closed 6 years ago

phahulin commented 6 years ago

https://github.com/poanetwork/poa-popa/blob/master/blockchain/contracts/ProofOfPhysicalAddress.sol#L127 Add an explicit check that claim is not zero:

claim = registry.getClaim(address(this), wallet, keccakIdentifier);
if (0 == claim) return false;
return PhysicalAddressClaim.decodeConfirmation(claim) > 0