Skip to content

Commit 5255097

Browse files
committed
make execute via other member
1 parent aa3e26f commit 5255097

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/nft-collections/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,14 @@ const collectionAndNewNFTExample = () => __awaiter(void 0, void 0, void 0, funct
170170
});
171171
const { blockhash, lastValidBlockHeight } = yield squads.connection.getLatestBlockhash("confirmed");
172172
const executeTx = new web3_js_1.Transaction({
173-
feePayer: walletKeypair.publicKey,
173+
feePayer: otherMembersBesidesWallet[0].publicKey,
174174
blockhash,
175175
lastValidBlockHeight,
176176
});
177177
executeTx.add(computeIx);
178178
executeTx.add(executeIx);
179179
// sign & serialize and send
180-
executeTx.sign(walletKeypair);
180+
executeTx.sign(otherMembersBesidesWallet[0]);
181181
const txid = yield squads.connection.sendRawTransaction(executeTx.serialize(), { skipPreflight: true, preflightCommitment: 'confirmed' });
182182
console.log("sent execute tx!", txid);
183183
console.log("finished, check the added nft mint at", newNftMint.toBase58());

examples/nft-collections/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ const collectionAndNewNFTExample = async () => {
154154
})
155155
const {blockhash, lastValidBlockHeight} = await squads.connection.getLatestBlockhash("confirmed");
156156
const executeTx = new Transaction({
157-
feePayer: walletKeypair.publicKey,
157+
feePayer: otherMembersBesidesWallet[0].publicKey,
158158
blockhash,
159159
lastValidBlockHeight,
160160
});
161161
executeTx.add(computeIx);
162162
executeTx.add(executeIx);
163163
// sign & serialize and send
164-
executeTx.sign(walletKeypair);
164+
executeTx.sign(otherMembersBesidesWallet[0]);
165165
const txid = await squads.connection.sendRawTransaction(executeTx.serialize(), {skipPreflight: true, preflightCommitment: 'confirmed'});
166166
console.log("sent execute tx!", txid);
167167
console.log("finished, check the added nft mint at", newNftMint.toBase58());

0 commit comments

Comments
 (0)