Skip to content

Commit 7d1d2fb

Browse files
committed
Added #4 check if an aggregate complete transaction has all cosignatories
1 parent 972f55d commit 7d1d2fb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/model/transaction/AggregateTransaction.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,17 @@ export class AggregateTransaction extends Transaction {
147147
|| (this.signer !== undefined && this.signer.equals(publicAccount));
148148
}
149149

150+
/**
151+
* Check if an aggregate complete transaction has all cosignatories
152+
* @returns {boolean}
153+
*/
154+
public isComplete(): boolean {
155+
let isCompleted = false;
156+
this.innerTransactions.forEach((innerTransaction) => {
157+
if (!isCompleted) {
158+
isCompleted = this.cosignatures.find((cosignature) => cosignature.signer.equals(innerTransaction.signer)) !== undefined;
159+
}
160+
});
161+
return isCompleted;
162+
}
150163
}

0 commit comments

Comments
 (0)