diff --git a/src/mappings/PoolStakers.ts b/src/mappings/PoolStakers.ts index e0ea7e7..a07043d 100644 --- a/src/mappings/PoolStakers.ts +++ b/src/mappings/PoolStakers.ts @@ -26,7 +26,12 @@ function derivePoolStash(poolId: number): string { buf[11] = (poolId >> 16) & 0xff; buf[12] = (poolId >> 24) & 0xff; // Remaining bytes are already 0 (padding) - return api.registry.createType("AccountId", buf).toString(); + // Convert to hex string - createType doesn't accept Uint8Array directly + let hex = "0x"; + for (let i = 0; i < 32; i++) { + hex += buf[i].toString(16).padStart(2, "0"); + } + return api.registry.createType("AccountId", hex).toString(); } /**