addressed tsc build errors to restore successful build process
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
parent
c24edbfe0d
commit
f34d53a936
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ghost-lite",
|
"name": "ghost-lite",
|
||||||
"version": "0.1.2",
|
"version": "0.1.3",
|
||||||
"description": "Web application for Ghost and Casper chain.",
|
"description": "Web application for Ghost and Casper chain.",
|
||||||
"author": "Uncle f4ts0 <f4ts0@ghostchain.io>",
|
"author": "Uncle f4ts0 <f4ts0@ghostchain.io>",
|
||||||
"maintainers": [
|
"maintainers": [
|
||||||
|
@ -34,6 +34,7 @@ import {
|
|||||||
useUnbondCalldata,
|
useUnbondCalldata,
|
||||||
useUnstableProvider,
|
useUnstableProvider,
|
||||||
RewardPoints,
|
RewardPoints,
|
||||||
|
Unlocking,
|
||||||
} from "../hooks"
|
} from "../hooks"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -208,7 +209,7 @@ export const Nominations = () => {
|
|||||||
const eraRewardPoints = useEraRewardPoints({ eraIndex: eraIndex?.index })
|
const eraRewardPoints = useEraRewardPoints({ eraIndex: eraIndex?.index })
|
||||||
const currentValidators = useCurrentValidators({ address: interestingValidator })
|
const currentValidators = useCurrentValidators({ address: interestingValidator })
|
||||||
const validatorOverview = useValidatorsOverview({ eraIndex: eraIndex?.index, address: interestingValidator })
|
const validatorOverview = useValidatorsOverview({ eraIndex: eraIndex?.index, address: interestingValidator })
|
||||||
console.log(ledger)
|
|
||||||
const tokenDecimals: number = chainSpecV1?.properties?.tokenDecimals ?? 0
|
const tokenDecimals: number = chainSpecV1?.properties?.tokenDecimals ?? 0
|
||||||
const tokenSymbol: string = chainSpecV1?.properties?.tokenSymbol ?? ""
|
const tokenSymbol: string = chainSpecV1?.properties?.tokenSymbol ?? ""
|
||||||
|
|
||||||
@ -256,7 +257,7 @@ console.log(ledger)
|
|||||||
}, [payee])
|
}, [payee])
|
||||||
|
|
||||||
const readyToWithdraw = useMemo(() => {
|
const readyToWithdraw = useMemo(() => {
|
||||||
return ledger?.unlocking.reduce((acc, item) => {
|
return ledger?.unlocking.reduce((acc: bigint, item: Unlocking) => {
|
||||||
if ((eraIndex?.index ?? 0) >= item.era) {
|
if ((eraIndex?.index ?? 0) >= item.era) {
|
||||||
return item.value
|
return item.value
|
||||||
}
|
}
|
||||||
@ -265,7 +266,7 @@ console.log(ledger)
|
|||||||
}, [ledger, eraIndex])
|
}, [ledger, eraIndex])
|
||||||
|
|
||||||
const waitingForWithdraw = useMemo(() => {
|
const waitingForWithdraw = useMemo(() => {
|
||||||
return ledger?.unlocking.reduce((acc, item) => {
|
return ledger?.unlocking.reduce((acc: bigint, item: Unlocking) => {
|
||||||
if ((eraIndex?.index ?? 0) < item.era) {
|
if ((eraIndex?.index ?? 0) < item.era) {
|
||||||
return item.value
|
return item.value
|
||||||
}
|
}
|
||||||
@ -274,7 +275,7 @@ console.log(ledger)
|
|||||||
}, [ledger, eraIndex])
|
}, [ledger, eraIndex])
|
||||||
|
|
||||||
const latestWithdrawEra = useMemo(() => {
|
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])
|
}, [eraIndex, ledger])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -6,7 +6,7 @@ import { distinct, filter, map, mergeMap } from "rxjs"
|
|||||||
import { useUnstableProvider } from "./useUnstableProvider"
|
import { useUnstableProvider } from "./useUnstableProvider"
|
||||||
import { useMetadata } from "./useMetadata"
|
import { useMetadata } from "./useMetadata"
|
||||||
|
|
||||||
type Unlocking = {
|
export type Unlocking = {
|
||||||
value: bigint
|
value: bigint
|
||||||
era: number
|
era: number
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user