File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
code/staking/create-stake-account Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 8
8
sendAndConfirmTransaction ,
9
9
Lockup ,
10
10
} from "@solana/web3.js" ;
11
+ import { getStakeActivation } from '@anza-xyz/solana-rpc-get-stake-activation' ;
11
12
12
13
( async ( ) => {
13
14
// Setup our connection and wallet
@@ -56,6 +57,7 @@ import {
56
57
console . log ( `Stake account balance: ${ stakeBalance / LAMPORTS_PER_SOL } SOL` ) ;
57
58
58
59
// Verify the status of our stake account. This will start as inactive and will take some time to activate.
59
- let stakeStatus = await connection . getStakeActivation ( stakeAccount . publicKey ) ;
60
- console . log ( `Stake account status: ${ stakeStatus . state } ` ) ;
60
+ let stakeStatus = await getStakeActivation ( connection , stakeAccount . publicKey ) ;
61
+
62
+ console . log ( `Stake account status: ${ stakeStatus . status } ` ) ;
61
63
} ) ( ) ;
You can’t perform that action at this time.
0 commit comments