Skip to content

Commit bb7cbc2

Browse files
committed
chore(txs): Use optimized logic to load all txs
1 parent 2bca8fa commit bb7cbc2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sqds/cli",
3-
"version": "2.3.17",
3+
"version": "2.3.18",
44
"description": "",
55
"main": "bin/index.js",
66
"scripts": {

src/lib/api.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ class API{
5353

5454
getTransactions = async (ms: any) => {
5555
const txIndex = ms.transactionIndex;
56-
const transactions = await Promise.all([...new Array(txIndex)].map(async (_, i) => {
56+
const txsPDA = [...new Array(txIndex)].map( (_, i) => {
5757
const ind = new BN(i+1);
58-
const [txPDA] = await getTxPDA(ms.publicKey, ind, this.programId);
59-
return this.squads.getTransaction(txPDA);
60-
}));
61-
return transactions;
58+
const [txPDA] = getTxPDA(ms.publicKey, ind, this.programId);
59+
return txPDA;
60+
})
61+
return this.squads.getTransactions(txsPDA)
6262
}
6363

6464
createMultisig = async (threshold: number, createKey: PublicKey,members: PublicKey[]) => {

0 commit comments

Comments
 (0)