Skip to content

Commit

Permalink
fix(nftsUA)L Trying to fix the issue of ix not assigning
Browse files Browse the repository at this point in the history
  • Loading branch information
bguillaumat committed Aug 12, 2023
1 parent 537900f commit ed5b370
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sqds/cli",
"version": "2.3.7",
"version": "2.3.11",
"description": "",
"main": "bin/index.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions src/lib/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ class Menu{
const executeIxTx = new Transaction({lastValidBlockHeight, blockhash, feePayer: this.wallet.publicKey});
executeIxTx.add(additionalComputeBudgetInstruction,ix);
const signed = await this.wallet.signTransaction(executeIxTx);
const txid = await this.api.connection.sendRawTransaction(signed.serialize());
await this.api.connection.confirmTransaction(txid, "processed");
const txid = await this.api.connection.sendRawTransaction(signed.serialize(), {skipPreflight: true});
await this.api.connection.confirmTransaction(txid, "confirmed");
await this.api.squads.getTransaction(tx.publicKey)
}catch(e){
console.log("Error executing instruction, trying it again");
Expand All @@ -381,8 +381,8 @@ class Menu{
const executeIxTx = new Transaction({lastValidBlockHeight, blockhash, feePayer: this.wallet.publicKey});
executeIxTx.add(additionalComputeBudgetInstruction,ix);
const signed = await this.wallet.signTransaction(executeIxTx);
const txid = await this.api.connection.sendRawTransaction(signed.serialize());
await this.api.connection.confirmTransaction(txid, "processed");
const txid = await this.api.connection.sendRawTransaction(signed.serialize(), {skipPreflight: true});
await this.api.connection.confirmTransaction(txid, "confirmed");
}
await this.api.squads.getTransaction(tx.publicKey);
successfullyExecuted++;
Expand Down
4 changes: 2 additions & 2 deletions src/lib/nfts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export const createAuthorityUpdateTx = async (squadsSdk: Squads, multisig: Publi
const queue = mints;
let txState = await squadsSdk.createTransaction(multisig, 1);
ws.write(`Created Transaction at PDA: ${txState.publicKey.toBase58()}\n`);
await squadsSdk.getTransaction(txState.publicKey);
const batchLength = mints.length;
ws.write(`Attaching ${batchLength} instructions for each metadata account\n`);
let hasError = false;
Expand All @@ -223,6 +224,7 @@ export const createAuthorityUpdateTx = async (squadsSdk: Squads, multisig: Publi
// flash tx state
await squadsSdk.getTransaction(txState.publicKey);
}catch (e) {
ws.write(`Failed to attach ix: ${e}\n`);
attachFails.push(mint);
}
}
Expand Down Expand Up @@ -434,9 +436,7 @@ export const sendTxMetaIx = async (msPDA: PublicKey, txPDA: PublicKey, member: P

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

0 comments on commit ed5b370

Please sign in to comment.