api
api copied to clipboard
`Unable to decode storage society.candidates` when there's a vouch in the candidates list
-
I'm submitting a ...
- [x] Bug report
- [ ] Feature request
- [ ] Support request
- [ ] Other
-
What is the current behavior and expected behavior?
Similarly to #5766, society.candidates is failing after the pallet was updated to V2. It works normally most of the time, but breaks if there's a candidate in the list that was accepted through vouching.
The error can be reproduced in simple steps:
- Use chopsticks and add a candidate with vouch to the storage;
- Connect PolkadotJS apps to chopsticks;
- Call society.candidates in the chain state UI.
2024-02-21 05:27:51 RPC-CORE: queryStorageAt(keys: Vec<StorageKey>, at?: BlockHash): Vec<StorageChangeSet>:: Unable to decode storage society.candidates: entry 7:: createType(PalletSocietyCandidacy):: decodeU8aStruct: failed at 0xd83d00000000000000000000… on kind (index 2/5): {"_enum":{"Deposit":"u128","Vouch":"(AccountId32,u128)"}}:: Unable to create Enum via index 216, in Deposit, Vouch
Environment
-
Version: v10.11.2 (latest)
-
Environment:
- [x] Node.js
- [x] Browser
- [ ] Other (limited support for other environments)
-
Language:
- [ ] JavaScript
- [x] TypeScript (5.3.3)
- [ ] Other