chore: Fix linting errors and update shared libs for mobile build

This commit is contained in:
2026-01-19 03:35:33 +03:00
parent 83f55bcf03
commit 6bc9d68e84
13 changed files with 144 additions and 66 deletions
+5 -2
View File
@@ -218,11 +218,14 @@ export async function getStakingScoreFromPallet(
return 0;
}
const ledgerData = ledger.unwrap().toJSON() as any;
const ledgerCodec = ledger.unwrap() as { toJSON: () => unknown };
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const ledgerData = ledgerCodec.toJSON() as any;
const stakedAmount = Number(ledgerData.total || 0) / 1e12; // Convert to HEZ
// Get duration
const startBlock = Number(scoreResult.unwrap().toString());
const scoreCodec = scoreResult.unwrap() as { toString: () => string };
const startBlock = Number(scoreCodec.toString());
const currentBlock = Number((await api.query.system.number()).toString());
const durationInBlocks = currentBlock - startBlock;