diff --git a/packages/api/src/index.ts b/packages/api/src/index.ts index 9abf54cd27..c2ca0e570f 100644 --- a/packages/api/src/index.ts +++ b/packages/api/src/index.ts @@ -140,7 +140,7 @@ export default class Api implements ApiInterface { } private formatOutput (method: Method, params: Array, result?: any): Base { - const base = createType(method.type as string, result); + const base = createType(method.type as string).fromJSON(result); if (method.type === 'StorageData') { const type = (params[0] as StorageKey).outputType;