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

This commit is contained in:
Michał Mirończuk 2021-03-30 17:51:37 +02:00
parent 3acff50554
commit 51775f6d1d

View file

@ -25,7 +25,7 @@ var ABstore = class {
let Aval = args[1];
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');
}