File tree 1 file changed +5
-1
lines changed
compression/cnft-burn/tests
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import { ValidDepthSizePair } from "@solana/spl-account-compression";
32
32
// local import of the connection wrapper, to help with using the ReadApi
33
33
import { WrapperConnection } from "./ReadApi/WrapperConnection" ;
34
34
import { RPC_PATH } from "./cnft-burn" ;
35
+ import * as anchor from "@coral-xyz/anchor" ;
35
36
36
37
// define some reusable balance values for tracking
37
38
let initBalance : number , balance : number ;
@@ -41,7 +42,10 @@ export async function createAndMint() {
41
42
//////////////////////////////////////////////////////////////////////////////
42
43
43
44
// 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 ;
45
49
46
50
console . log ( "Payer address:" , payer . publicKey . toBase58 ( ) ) ;
47
51
You can’t perform that action at this time.
0 commit comments