Skip to content

Commit 73f80a4

Browse files
authored
fix: sequential build and sign messages
2 parents 1682929 + c5ec2ad commit 73f80a4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

modules/sdk-core/src/bitgo/walletUtil/signAccountBasedMidnightClaimMessages.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ async function bulkSignAccountBasedMessagesWithProvider(
3838
// Extract wallet constructor params
3939
const { bitgo, baseCoin, _wallet: walletData } = wallet as Wallet;
4040

41-
// Process all messages in parallel, each with a new Wallet instance
42-
const results = await Promise.all(
43-
allMessages.map(async (messageInfo) => {
44-
const newWallet = new Wallet(bitgo, baseCoin, walletData);
45-
return signOrBuildMessage(newWallet, messageInfo, messageStandardType, walletPassphrase);
46-
})
47-
);
41+
// Process all messages sequentially, each with a new Wallet instance
42+
const results: { success: boolean; address: string; txRequestId?: string }[] = [];
43+
for (const messageInfo of allMessages) {
44+
const newWallet = new Wallet(bitgo, baseCoin, walletData);
45+
const result = await signOrBuildMessage(newWallet, messageInfo, messageStandardType, walletPassphrase);
46+
results.push(result);
47+
}
4848
processResults(results, txRequests, failedAddresses);
4949
return { failedAddresses, txRequests };
5050
}

0 commit comments

Comments
 (0)