Skip to content

Commit 85439ba

Browse files
committed
Fixed issue on createTransactionFromJson
Changed default validation result value to false;
1 parent a28caf5 commit 85439ba

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/model/transaction/Transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export abstract class Transaction {
211211
const commonTransactionObject = {
212212
type: this.type,
213213
networkType: this.networkType,
214-
version: this.version,
214+
version: this.versionToDTO(),
215215
maxFee: this.maxFee.toDTO(),
216216
deadline: this.deadline.toDTO(),
217217
signature: this.signature ? this.signature : '',

src/service/AggregateTransactionService.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class AggregateTransactionService {
8989
*/
9090
const sortedKeys = Array.from(graphInfo.multisigAccounts.keys()).sort((a, b) => b - a);
9191
const cosignatoriesReceived = cosignatories;
92-
let validationResult = true;
92+
let validationResult = false;
9393

9494
let isMultisigRemoval = false;
9595

@@ -106,7 +106,7 @@ export class AggregateTransactionService {
106106

107107
sortedKeys.forEach((key) => {
108108
const multisigInfo = graphInfo.multisigAccounts.get(key);
109-
if (multisigInfo && validationResult) {
109+
if (multisigInfo && !validationResult) {
110110
multisigInfo.forEach((multisig) => {
111111
if (multisig.minApproval >= 1 && multisig.minRemoval) { // To make sure it is multisig account
112112
const matchedCosignatories = this.compareArrays(cosignatoriesReceived,
@@ -122,6 +122,7 @@ export class AggregateTransactionService {
122122
if (cosignatoriesReceived.indexOf(multisig.account.publicKey) === -1) {
123123
cosignatoriesReceived.push(multisig.account.publicKey);
124124
}
125+
validationResult = true;
125126
} else {
126127
validationResult = false;
127128
}

0 commit comments

Comments
 (0)