anchor icon indicating copy to clipboard operation
anchor copied to clipboard

invalid account discriminator on chrome

Open effeaucarre opened this issue 1 year ago • 1 comments

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 ?

effeaucarre avatar Jan 24 '24 21:01 effeaucarre

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.

acheroncrypto avatar Jan 24 '24 21:01 acheroncrypto

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.

acheroncrypto avatar Mar 10 '24 18:03 acheroncrypto