diff --git a/js/packages/cli/src/candy-machine-cli.ts b/js/packages/cli/src/candy-machine-cli.ts index 300d5998c72..96cc2c4e145 100755 --- a/js/packages/cli/src/candy-machine-cli.ts +++ b/js/packages/cli/src/candy-machine-cli.ts @@ -201,9 +201,19 @@ programCommand('withdraw') } const walletKeyPair = loadWalletKey(keypair); const anchorProgram = await loadCandyProgram(walletKeyPair, env, rpcUrl); + + // this is hash of first 8 symbols in pubkey + // account:Config + const hashConfig = [155, 12, 170, 224, 30, 250, 204, 130]; const configOrCommitment = { commitment: 'confirmed', filters: [ + { + memcmp: { + offset: 0, + bytes: hashConfig, + }, + }, { memcmp: { offset: 8, @@ -710,7 +720,7 @@ programCommand('create_candy_machine') if (treasuryBalance === 0) { throw new Error(`Cannot use treasury account with 0 balance!`); } - wallet = treasuryAccount + wallet = treasuryAccount; } const config = new PublicKey(cacheContent.program.config);