abstore contract - Aval, Bval bad validation if values are not a number

Signed-off-by: Michał Mirończuk <michalmironczuk1@gmail.com>
This commit is contained in:
Michał Mirończuk 2021-03-30 17:51:37 +02:00
parent 3acff50554
commit 8a1c0ab01f

View file

@ -25,7 +25,7 @@ var ABstore = class {
let Aval = args[1]; let Aval = args[1];
let Bval = args[3]; let Bval = args[3];
if (typeof parseInt(Aval) !== 'number' || typeof parseInt(Bval) !== 'number') { if (isNaN(parseInt(Aval)) || isNaN(parseInt(Bval))) {
return shim.error('Expecting integer value for asset holding'); return shim.error('Expecting integer value for asset holding');
} }