addressed tsc build errors to restore successful build process

Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
Uncle Fatso 2025-08-20 20:52:58 +03:00
parent c24edbfe0d
commit f34d53a936
Signed by: f4ts0
GPG Key ID: 565F4F2860226EBB
3 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "ghost-lite",
"version": "0.1.2",
"version": "0.1.3",
"description": "Web application for Ghost and Casper chain.",
"author": "Uncle f4ts0 <f4ts0@ghostchain.io>",
"maintainers": [

View File

@ -34,6 +34,7 @@ import {
useUnbondCalldata,
useUnstableProvider,
RewardPoints,
Unlocking,
} from "../hooks"
import {
@ -208,7 +209,7 @@ export const Nominations = () => {
const eraRewardPoints = useEraRewardPoints({ eraIndex: eraIndex?.index })
const currentValidators = useCurrentValidators({ address: interestingValidator })
const validatorOverview = useValidatorsOverview({ eraIndex: eraIndex?.index, address: interestingValidator })
console.log(ledger)
const tokenDecimals: number = chainSpecV1?.properties?.tokenDecimals ?? 0
const tokenSymbol: string = chainSpecV1?.properties?.tokenSymbol ?? ""
@ -256,7 +257,7 @@ console.log(ledger)
}, [payee])
const readyToWithdraw = useMemo(() => {
return ledger?.unlocking.reduce((acc, item) => {
return ledger?.unlocking.reduce((acc: bigint, item: Unlocking) => {
if ((eraIndex?.index ?? 0) >= item.era) {
return item.value
}
@ -265,7 +266,7 @@ console.log(ledger)
}, [ledger, eraIndex])
const waitingForWithdraw = useMemo(() => {
return ledger?.unlocking.reduce((acc, item) => {
return ledger?.unlocking.reduce((acc: bigint, item: Unlocking) => {
if ((eraIndex?.index ?? 0) < item.era) {
return item.value
}
@ -274,7 +275,7 @@ console.log(ledger)
}, [ledger, eraIndex])
const latestWithdrawEra = useMemo(() => {
return Math.max(ledger?.unlocking.map(el => el.era - (eraIndex?.index ?? 0)) ?? [])
return Math.max(ledger?.unlocking.map((el: Unlocking) => el.era - (eraIndex?.index ?? 0)) ?? [])
}, [eraIndex, ledger])
useEffect(() => {

View File

@ -6,7 +6,7 @@ import { distinct, filter, map, mergeMap } from "rxjs"
import { useUnstableProvider } from "./useUnstableProvider"
import { useMetadata } from "./useMetadata"
type Unlocking = {
export type Unlocking = {
value: bigint
era: number
}