fix warmupInfo read function based on the actual StakingAbi

Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
Uncle Fatso 2026-03-22 20:36:11 +03:00
parent 8d23d55ae2
commit c66b4d182b
Signed by: f4ts0
GPG Key ID: 565F4F2860226EBB
2 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
{
"name": "ghost-dao-interface",
"private": true,
"version": "0.6.5",
"version": "0.6.6",
"type": "module",
"scripts": {
"dev": "vite",

View File

@ -69,16 +69,16 @@ export const useWarmupInfo = (chainId, address) => {
const { data: info, refetch } = useReadContract({
abi: StakingAbi,
address: STAKING_ADDRESSES[chainId],
functionName: "getWarmupInfo",
functionName: "warmupInfo",
args: [address],
scopeKey: `getWarmupInfo-${address}-${chainId}`,
scopeKey: `warmupInfo-${address}-${chainId}`,
chainId: chainId,
});
const warmupInfo = {
deposit: info ? new DecimalBigNumber(info.deposit, 9) : new DecimalBigNumber(0n, 9),
shares: info ? info.shares : 0n,
expiry: info ? Number(info.expiry) : 0,
deposit: info ? new DecimalBigNumber(info.at(0), 9) : new DecimalBigNumber(0n, 9),
shares: info ? info.at(1) : 0n,
expiry: info ? Number(info.at(2)) : 0,
}
return { warmupInfo, refetch }