Skip to content

Commit

Permalink
refactor(useWstethBySteth): as bigint
Browse files Browse the repository at this point in the history
  • Loading branch information
solidovic committed Nov 25, 2024
1 parent 93d4c9c commit 3ebf479
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modules/web3/hooks/use-wstETH-by-stETH.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ export const useWstethBySteth = (steth?: bigint | null) => {
enabled: steth != null && !!(isL2 ? l2.wsteth : wrap),
staleTime: Infinity,
queryFn: () => {
if (steth == null) return undefined;

return isL2
? l2.steth.convertToShares(steth)
: wrap.convertStethToWsteth(steth);
? l2.steth.convertToShares(steth as bigint)
: wrap.convertStethToWsteth(steth as bigint);
},
});
};

0 comments on commit 3ebf479

Please sign in to comment.