Skip to content

Commit c969975

Browse files
committed
fixed the keypair
1 parent fa8c577 commit c969975

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compression/cnft-burn/tests/createAndMint.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { ValidDepthSizePair } from "@solana/spl-account-compression";
3232
// local import of the connection wrapper, to help with using the ReadApi
3333
import { WrapperConnection } from "./ReadApi/WrapperConnection";
3434
import { RPC_PATH } from "./cnft-burn";
35+
import * as anchor from "@coral-xyz/anchor";
3536

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

4344
// load it locally from the filesystem when available
44-
const payer = loadKeypairFromFile("~/.config/solana/id.json");
45+
anchor.setProvider(anchor.AnchorProvider.env());
46+
const provider = anchor.AnchorProvider.env();
47+
const payerWallet = provider.wallet as anchor.Wallet;
48+
const payer = payerWallet.payer;
4549

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

0 commit comments

Comments
 (0)