Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
samwise2 committed Jun 7, 2022
1 parent 1d3df44 commit 9cc4c16
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 0 additions & 2 deletions contracts/sdk/gumball-machine/instructions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export async function createInitializeGumballMachineIxs(
},
gumballMachineInitArgs
);
// initGumballMachineInstr.keys maybe initGumballMachineInstr.keys[].isSigner = true
return [allocGumballMachineAcctInstr, allocMerkleRollAcctInstr, initGumballMachineInstr];
}

Expand All @@ -101,7 +100,6 @@ export async function createDispenseNFTForSolIx(
gumballMachine: gumballMachineAcctKeypair.publicKey,
payer: payer.publicKey,
receiver: receiver,
//systemProgram: SystemProgram.programId,
willyWonka: willyWonkaPDAKey,
recentBlockhashes: SYSVAR_SLOT_HASHES_PUBKEY,
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY,
Expand Down
10 changes: 1 addition & 9 deletions contracts/tests/gumball-machine-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import { createMint, getOrCreateAssociatedTokenAccount, mintTo, getAccount } fro
import {
NATIVE_MINT
} from "@solana/spl-token";
import { logTx, num32ToBuffer } from "./utils";
import { logTx, num32ToBuffer, arrayEquals } from "./utils";

// @ts-ignore
let GumballMachine;
Expand All @@ -57,14 +57,6 @@ let Bubblegum;
let GummyrollProgramId;
let BubblegumProgramId;

// TODO(sorend): port this to utils
function arrayEquals(a, b) {
return Array.isArray(a) &&
Array.isArray(b) &&
a.length === b.length &&
a.every((val, index) => val === b[index]);
}

describe("gumball-machine", () => {
// Configure the client to use the local cluster.

Expand Down
6 changes: 6 additions & 0 deletions contracts/tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ export function num32ToBuffer(num: number) {
return Buffer.from([byte1, byte2, byte3, byte4])
}

export function arrayEquals(a, b) {
return Array.isArray(a) &&
Array.isArray(b) &&
a.length === b.length &&
a.every((val, index) => val === b[index]);
}

0 comments on commit 9cc4c16

Please sign in to comment.