fix: parse slot0 response as array — viem v2 compat (#2) #3
1 changed files with 3 additions and 1 deletions
|
|
@ -556,7 +556,9 @@ async function loadLiquidityStats({ notify = false }: { notify?: boolean } = {})
|
||||||
});
|
});
|
||||||
|
|
||||||
let currentTick: number | null = null;
|
let currentTick: number | null = null;
|
||||||
if (isRecord(slot0Response) && typeof slot0Response.tick === 'number') {
|
if (Array.isArray(slot0Response) && typeof slot0Response[1] === 'number') {
|
||||||
|
currentTick = slot0Response[1];
|
||||||
|
} else if (isRecord(slot0Response) && typeof slot0Response.tick === 'number') {
|
||||||
currentTick = slot0Response.tick;
|
currentTick = slot0Response.tick;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue