-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: store nonfngable manager against position
- Loading branch information
1 parent
1aefb1a
commit 4d69dff
Showing
6 changed files
with
29 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/core/src/positions/fetchLiquidityPositions/getManager.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { NONFUNGIBLE_POSITION_MANAGER, Network } from '@nftx/constants'; | ||
import { getChainConstant } from '@nftx/utils'; | ||
|
||
const getManager = (network: number, timestampOpened: string) => { | ||
const lastTimeOldContractUsed = 1704206700; | ||
const timestamp = Number(timestampOpened); | ||
// If older than this, it's the old contract | ||
if (timestamp <= lastTimeOldContractUsed && network === Network.Sepolia) { | ||
return '0x55bdc76262b1e6e791d0636a0bc61cee23cdfa87'; | ||
} | ||
return getChainConstant(NONFUNGIBLE_POSITION_MANAGER, network); | ||
}; | ||
|
||
export default getManager; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters