@haven-fi/solauto-sdk 1.0.766 → 1.0.768
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -222,7 +222,7 @@ async function getComputeUnitPriceEstimate(umi, tx, prioritySetting, useAccounts
|
|
222
222
|
return feeEstimate;
|
223
223
|
}
|
224
224
|
async function spamSendTransactionUntilConfirmed(connection, transaction, blockhash, spamInterval = 1500) {
|
225
|
-
let transactionSignature
|
225
|
+
let transactionSignature;
|
226
226
|
const sendTx = async () => {
|
227
227
|
try {
|
228
228
|
const txSignature = await connection.sendRawTransaction(Buffer.from(transaction.serialize()), { skipPreflight: true, maxRetries: 0 });
|
@@ -238,7 +238,7 @@ async function spamSendTransactionUntilConfirmed(connection, transaction, blockh
|
|
238
238
|
await sendTx();
|
239
239
|
}, spamInterval);
|
240
240
|
if (!transactionSignature) {
|
241
|
-
throw new Error("
|
241
|
+
throw new Error("No transaction signature found");
|
242
242
|
}
|
243
243
|
const resp = await connection
|
244
244
|
.confirmTransaction({
|
package/package.json
CHANGED
package/src/utils/solanaUtils.ts
CHANGED
@@ -387,7 +387,7 @@ async function spamSendTransactionUntilConfirmed(
|
|
387
387
|
blockhash: BlockhashWithExpiryBlockHeight,
|
388
388
|
spamInterval: number = 1500
|
389
389
|
): Promise<string> {
|
390
|
-
let transactionSignature: string |
|
390
|
+
let transactionSignature: string | undefined;
|
391
391
|
|
392
392
|
const sendTx = async () => {
|
393
393
|
try {
|
@@ -409,7 +409,7 @@ async function spamSendTransactionUntilConfirmed(
|
|
409
409
|
}, spamInterval);
|
410
410
|
|
411
411
|
if (!transactionSignature) {
|
412
|
-
throw new Error("
|
412
|
+
throw new Error("No transaction signature found");
|
413
413
|
}
|
414
414
|
|
415
415
|
const resp = await connection
|