Skip to content

Commit

Permalink
chore: remove callstatic when call read func from contract
Browse files Browse the repository at this point in the history
  • Loading branch information
tienkane committed Feb 18, 2025
1 parent d863d44 commit 3b0a05b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pages/Earns/PositionDetail/LeftSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const LeftSection = ({ position }: { position: ParsedPosition }) => {

const handleFetchUnclaimedFee = useCallback(async () => {
if (!contract) return
const owner = await contract.callStatic.ownerOf(position.id)
const owner = await contract.ownerOf(position.id)
const maxUnit = '0x' + (2n ** 128n - 1n).toString(16)
const results = await contract.callStatic.collect(
{
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Earns/UserPositions/TableContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default function TableContent({
const token0Address = position.pool.tokenAmounts[0]?.token.address
const token1Address = position.pool.tokenAmounts[1]?.token.address

const owner = await contract.callStatic.ownerOf(position.id)
const owner = await contract.ownerOf(position.id)

const results = await contract.callStatic.collect(
{
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Earns/components/ClaimFeeModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default function ClaimFeeModal({
const calldatas = []

try {
const owner = await contract.callStatic.ownerOf(position.id)
const owner = await contract.ownerOf(position.id)

const involvesETH = isToken0Native || isToken1Native
const collectParams = {
Expand Down

0 comments on commit 3b0a05b

Please sign in to comment.