diff --git a/src/types/TransactionTarget.ts b/src/types/TransactionTarget.ts index fc2c9e7d..12b097b8 100644 --- a/src/types/TransactionTarget.ts +++ b/src/types/TransactionTarget.ts @@ -556,10 +556,14 @@ export class TransactionTarget { return 'Native'; } else if (this.stored !== undefined) { const serializer = new TypedJSON(StoredTarget); - return serializer.toPlainJson(this.stored); + return { + Stored: serializer.toPlainJson(this.stored) + }; } else if (this.session !== undefined) { const serializer = new TypedJSON(SessionTarget); - return serializer.toPlainJson(this.session); + return { + Session: serializer.toPlainJson(this.session) + }; } else { throw new Error('unknown target type'); }