I am trying to read the data on an pda account like so
let pdaData = awaitprogram.account.PdaAccount.fetch(pdaAccount);
But I am getting this error
TypeError: Cannot read properties of undefined (reading 'fetch')
at /home/jimii/Documents/crew/testProject/instructions/init.ts:106:60
at Generator.next (<anonymous>)
at fulfilled (/home/jimii/Documents/crew/testProject/instructions/init.ts:28:58)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Is this a node error? I am on v18.16.0
program.account.PdaAccount
is undefined. Maybe you meantprogram.account.pdaAccount.fetch()
? With a lowercasep
.