Skip to content

Commit ed5b370

Browse files
committed
fix(nftsUA)L Trying to fix the issue of ix not assigning
1 parent 537900f commit ed5b370

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
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.7",
3+
"version": "2.3.11",
44
"description": "",
55
"main": "bin/index.js",
66
"scripts": {

src/lib/menu.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,8 @@ class Menu{
370370
const executeIxTx = new Transaction({lastValidBlockHeight, blockhash, feePayer: this.wallet.publicKey});
371371
executeIxTx.add(additionalComputeBudgetInstruction,ix);
372372
const signed = await this.wallet.signTransaction(executeIxTx);
373-
const txid = await this.api.connection.sendRawTransaction(signed.serialize());
374-
await this.api.connection.confirmTransaction(txid, "processed");
373+
const txid = await this.api.connection.sendRawTransaction(signed.serialize(), {skipPreflight: true});
374+
await this.api.connection.confirmTransaction(txid, "confirmed");
375375
await this.api.squads.getTransaction(tx.publicKey)
376376
}catch(e){
377377
console.log("Error executing instruction, trying it again");
@@ -381,8 +381,8 @@ class Menu{
381381
const executeIxTx = new Transaction({lastValidBlockHeight, blockhash, feePayer: this.wallet.publicKey});
382382
executeIxTx.add(additionalComputeBudgetInstruction,ix);
383383
const signed = await this.wallet.signTransaction(executeIxTx);
384-
const txid = await this.api.connection.sendRawTransaction(signed.serialize());
385-
await this.api.connection.confirmTransaction(txid, "processed");
384+
const txid = await this.api.connection.sendRawTransaction(signed.serialize(), {skipPreflight: true});
385+
await this.api.connection.confirmTransaction(txid, "confirmed");
386386
}
387387
await this.api.squads.getTransaction(tx.publicKey);
388388
successfullyExecuted++;

src/lib/nfts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ export const createAuthorityUpdateTx = async (squadsSdk: Squads, multisig: Publi
197197
const queue = mints;
198198
let txState = await squadsSdk.createTransaction(multisig, 1);
199199
ws.write(`Created Transaction at PDA: ${txState.publicKey.toBase58()}\n`);
200+
await squadsSdk.getTransaction(txState.publicKey);
200201
const batchLength = mints.length;
201202
ws.write(`Attaching ${batchLength} instructions for each metadata account\n`);
202203
let hasError = false;
@@ -223,6 +224,7 @@ export const createAuthorityUpdateTx = async (squadsSdk: Squads, multisig: Publi
223224
// flash tx state
224225
await squadsSdk.getTransaction(txState.publicKey);
225226
}catch (e) {
227+
ws.write(`Failed to attach ix: ${e}\n`);
226228
attachFails.push(mint);
227229
}
228230
}
@@ -434,9 +436,7 @@ export const sendTxMetaIx = async (msPDA: PublicKey, txPDA: PublicKey, member: P
434436

435437
// rough calculation of how much SOL the process will take
436438
export const estimateBulkUpdate = async (sdk: Squads, connection: Connection, buckets: PublicKey[][], testKey: PublicKey) => {
437-
const numTx = buckets.length;
438439
// iterate through each bucket, and create a transaction, then create an instruction for each item in each bucket
439-
const {blockhash, lastValidBlockHeight} = await connection.getLatestBlockhash();
440440
let ixBytes = 0;
441441
const metaIx = await updateMetadataAuthorityIx(testKey, testKey, testKey);
442442
const testIx = await sdk.buildAddInstruction(testKey, testKey, metaIx, 0);

0 commit comments

Comments
 (0)