diff --git a/lib/runtime/wasmer/imports.go b/lib/runtime/wasmer/imports.go index 304855a986..6a4fcf5b7c 100644 --- a/lib/runtime/wasmer/imports.go +++ b/lib/runtime/wasmer/imports.go @@ -962,7 +962,9 @@ func ext_misc_runtime_version_version_1(context unsafe.Pointer, dataSpan C.int64 // Note: we must call the `Encode` method and NOT // scale.Marshal or this one would encode the Version - // interface but not the actual implementation. + // interface pointer instead of the actual struct implementation. + // Encode also respects the legacy boolean field of the version + // and encodes the version differently if it is set to true. encodedData, err := version.Encode() if err != nil { logger.Errorf("failed to encode result: %s", err)