abstore smart contract - Fixed Aval and Bval validation

Signed-off-by: Michał Mirończuk <michalmironczuk1@gmail.com>
This commit is contained in:
Michał Mirończuk 2021-03-31 18:18:21 +02:00
parent 3acff50554
commit 9c9eeeddfe

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');
} }