Hi, I'm trying to integrate your lib and on devnet I found an account (2pgFT78qkk47HWDLmPnZvjmVnC22pV9Rhe5TWtCSAfUM) where the getStakeActivation call keeps failing. Could you please look into it?
error:
/workplace/solana-rpc-get-stake-activation/web3js-1.0/dist/src/index.js:162
voterPubkey: parsedData.value.data.parsed.info.stake.delegation.voterPubkey,
^
TypeError: Cannot read properties of null (reading 'delegation')
at getStakeAccount (/workplace/solana-rpc-get-stake-activation/web3js-1.0/dist/src/index.js:162:62)
at /workplace/solana-rpc-get-stake-activation/web3js-1.0/dist/src/index.js:180:29
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 1)
at async getStakeActivation (/workplace/solana-rpc-get-stake-activation/web3js-1.0/dist/src/index.js:173:77)
Node.js v20.11.0
code to reproduce the issue:
import { getStakeActivation } from '../dist/src';
import { PublicKey } from '@solana/web3.js';
import { Connection } from '@solana/web3.js';
const connection = new Connection('https://api.devnet.solana.com');
let stake = new PublicKey('2pgFT78qkk47HWDLmPnZvjmVnC22pV9Rhe5TWtCSAfUM');
let status = await getStakeActivation(connection, stake); // throws
Hi, I'm trying to integrate your lib and on devnet I found an account (
2pgFT78qkk47HWDLmPnZvjmVnC22pV9Rhe5TWtCSAfUM
) where thegetStakeActivation
call keeps failing. Could you please look into it?error:
code to reproduce the issue: