From 53ce979ccdbfe9e425a3611e7d959590f446ae57 Mon Sep 17 00:00:00 2001 From: VitaliiBabchenkoSecurrency Date: Fri, 22 Sep 2023 15:37:45 +0300 Subject: [PATCH] Add string data type to compareOpVCompareGeneration --- .../code-generator/engine/modules/ConditionsGenerator.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/code-generator/engine/modules/ConditionsGenerator.js b/modules/code-generator/engine/modules/ConditionsGenerator.js index 9fab90b..4b32f4f 100644 --- a/modules/code-generator/engine/modules/ConditionsGenerator.js +++ b/modules/code-generator/engine/modules/ConditionsGenerator.js @@ -106,11 +106,16 @@ class ConditionsGenerator { compareTemplates.compareOperationValueToCompare1Bytes(), {valueToCompare: value, i: i} ); - case this.supportedDataType.uint || this.supportedDataType.int || this.supportedDataType.bytes32: + break; + case this.supportedDataType.uint: + case this.supportedDataType.int: + case this.supportedDataType.bytes32: + case this.supportedDataType.string: return whiskers.render( compareTemplates.compareOperationValueToCompare32Bytes(), {valueToCompare: valueToCompare, i: i} ); + break; default: throw new Error(`Unsupported data type: "${dataType}"`); }