anchor
anchor copied to clipboard
invalid account discriminator on chrome
very probably related to https://github.com/coral-xyz/anchor/issues/2619
i'm using program.account.xyz.fetch(pdaAddress) but i have the error wrong account discriminator
i'm using anchor 0.29 , and also tried with 0.28.1-beta.2, problem persist. if i run the exact same code on ubuntu ts script, i have no problem, it runs perfectly.
Anything about this ?
We use a different package for sha256
so it should be fine on 0.29
. I haven't seen anybody else run into this problem after we fixed it in https://github.com/coral-xyz/anchor/pull/2580.
TS package no longer calculates the discriminator since the new IDL spec requires discriminator
field. For this reason, casing or browser issues should not result in invalid discriminators anymore.
Fixed by https://github.com/coral-xyz/anchor/pull/2824.