Skip to content

Commit

Permalink
fixed the keypair
Browse files Browse the repository at this point in the history
  • Loading branch information
0xPratik committed Jan 16, 2024
1 parent fa8c577 commit c969975
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compression/cnft-burn/tests/createAndMint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { ValidDepthSizePair } from "@solana/spl-account-compression";
// local import of the connection wrapper, to help with using the ReadApi
import { WrapperConnection } from "./ReadApi/WrapperConnection";
import { RPC_PATH } from "./cnft-burn";
import * as anchor from "@coral-xyz/anchor";

// define some reusable balance values for tracking
let initBalance: number, balance: number;
Expand All @@ -41,7 +42,10 @@ export async function createAndMint() {
//////////////////////////////////////////////////////////////////////////////

// load it locally from the filesystem when available
const payer = loadKeypairFromFile("~/.config/solana/id.json");
anchor.setProvider(anchor.AnchorProvider.env());
const provider = anchor.AnchorProvider.env();
const payerWallet = provider.wallet as anchor.Wallet;
const payer = payerWallet.payer;

console.log("Payer address:", payer.publicKey.toBase58());

Expand Down

0 comments on commit c969975

Please sign in to comment.