Skip to content

Commit 132f206

Browse files
committed
add compute budget for last redeem tx separately
it depends on the first txs and simulation will fail otherwise
1 parent 371d77b commit 132f206

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

sdk/src/contexts/solana/utils/computeBudget/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ async function determinePriorityFee(
7676
): Promise<number> {
7777
// https://twitter.com/0xMert_/status/1768669928825962706
7878

79-
let fee = 1; // Set fee to 100,000 microlamport by default
79+
let fee = 1; // Set fee to 1 microlamport by default
8080

8181
try {
8282
const recentFeesResponse = await connection.getRecentPrioritizationFees({

sdk/src/contexts/solana/utils/sendAndConfirmPostVaa.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,11 @@ export async function postVaaWithRetry(
4141
vaa,
4242
commitment,
4343
);
44-
for (const unsignedTransaction of unsignedTransactions) {
45-
await addComputeBudget(connection, unsignedTransaction, []);
46-
}
47-
4844
const postVaaTransaction = unsignedTransactions.pop()!;
4945

46+
for (const unsignedTransaction of unsignedTransactions) {
47+
await addComputeBudget(connection, unsignedTransaction);
48+
}
5049
const responses = await sendAndConfirmTransactionsWithRetry(
5150
connection,
5251
modifySignTransaction(signTransaction, ...signers),
@@ -55,6 +54,7 @@ export async function postVaaWithRetry(
5554
maxRetries,
5655
);
5756
//While the signature_set is used to create the final instruction, it doesn't need to sign it.
57+
await addComputeBudget(connection, postVaaTransaction);
5858
responses.push(
5959
...(await sendAndConfirmTransactionsWithRetry(
6060
connection,

wormhole-connect/src/utils/wallet/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ export const postVaa = async (
166166
pk.toString(),
167167
Buffer.from(signedVAA),
168168
MAX_VAA_UPLOAD_RETRIES_SOLANA,
169-
undefined,
170169
);
171170
};
172171

0 commit comments

Comments
 (0)