I have this test wallet:
% solana account 9AYXoP3b22KHRhVuvjZbynpjNd2SXKFLoC1jrPMkyFkS
Public Key: 9AYXoP3b22KHRhVuvjZbynpjNd2SXKFLoC1jrPMkyFkS
Balance: 12.98943736 SOL
Owner: (removed by me)
Executable: false
Rent Epoch: 248
And I have this javascript snippet:
const SOURCE_TOKEN_ACCOUNT = new PublicKey('9AYXoP3b22KHRhVuvjZbynpjNd2SXKFLoC1jrPMkyFkS');
const sourceInfo = await connection.getParsedAccountInfo(
SOURCE_TOKEN_ACCOUNT,
);
console.log('tok ', sourceInfo);
When I run, I get this output:
tok { context: { slot: 191644 }, value: null }
I would like to note that I'm trying to get this to function with multiple accounts. They all have the same slot value.
I want to know why value would be coming back null.
I have nothing to go on with why this would be happening. I just want some value to show up. Since I don't know what is supposed to show up when this works, I don't know what value is should be, short of showing some sort of SOL. All I know is, I'm getting the following error:
TypeError: Cannot read properties of null (reading 'data')