abstore smart contract - Fixed Aval and Bval validation (#436)

Signed-off-by: Michał Mirończuk <michalmironczuk1@gmail.com>
This commit is contained in:
Michał Mirończuk 2021-03-31 18:50:59 +02:00 committed by GitHub
parent 3acff50554
commit c5e190680f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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