Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
c0f58ae8
Unverified
Commit
c0f58ae8
authored
May 10, 2021
by
Noah Zinsmeister
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't use a signer for callStatic contract
parent
54dd5476
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
useContract.ts
src/hooks/useContract.ts
+2
-2
useV3PositionFees.ts
src/hooks/useV3PositionFees.ts
+1
-1
No files found.
src/hooks/useContract.ts
View file @
c0f58ae8
...
@@ -160,10 +160,10 @@ export function useSocksController(): Unisocks | null {
...
@@ -160,10 +160,10 @@ export function useSocksController(): Unisocks | null {
)
as
Unisocks
|
null
)
as
Unisocks
|
null
}
}
export
function
useV3NFTPositionManagerContract
():
NonfungiblePositionManager
|
null
{
export
function
useV3NFTPositionManagerContract
(
withSignerIfPossible
?:
boolean
):
NonfungiblePositionManager
|
null
{
const
{
chainId
}
=
useActiveWeb3React
()
const
{
chainId
}
=
useActiveWeb3React
()
const
address
=
chainId
?
NONFUNGIBLE_POSITION_MANAGER_ADDRESSES
[
chainId
]
:
undefined
const
address
=
chainId
?
NONFUNGIBLE_POSITION_MANAGER_ADDRESSES
[
chainId
]
:
undefined
return
useContract
(
address
,
NFTPositionManagerABI
)
as
NonfungiblePositionManager
|
null
return
useContract
(
address
,
NFTPositionManagerABI
,
withSignerIfPossible
)
as
NonfungiblePositionManager
|
null
}
}
export
function
useV3Factory
():
UniswapV3Factory
|
null
{
export
function
useV3Factory
():
UniswapV3Factory
|
null
{
...
...
src/hooks/useV3PositionFees.ts
View file @
c0f58ae8
...
@@ -14,7 +14,7 @@ export function useV3PositionFees(
...
@@ -14,7 +14,7 @@ export function useV3PositionFees(
pool
?:
Pool
,
pool
?:
Pool
,
positionDetails
?:
PositionDetails
positionDetails
?:
PositionDetails
):
[
TokenAmount
,
TokenAmount
]
|
[
undefined
,
undefined
]
{
):
[
TokenAmount
,
TokenAmount
]
|
[
undefined
,
undefined
]
{
const
positionManager
=
useV3NFTPositionManagerContract
()
const
positionManager
=
useV3NFTPositionManagerContract
(
false
)
const
owner
=
useSingleCallResult
(
positionDetails
?.
tokenId
?
positionManager
:
null
,
'
ownerOf
'
,
[
const
owner
=
useSingleCallResult
(
positionDetails
?.
tokenId
?
positionManager
:
null
,
'
ownerOf
'
,
[
positionDetails
?.
tokenId
,
positionDetails
?.
tokenId
,
]).
result
?.[
0
]
]).
result
?.[
0
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment