-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Uniswap import button to advanced page (#854)
* Adding import option to advanced page * Updating empty uniswap position state * Switching to simpler empty states
- Loading branch information
1 parent
1c80634
commit 91831c2
Showing
3 changed files
with
141 additions
and
37 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
25 changes: 25 additions & 0 deletions
25
earn/src/components/advanced/modal/ImportUniswapNFTModal.tsx
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,25 @@ | ||
import { SendTransactionResult } from '@wagmi/core'; | ||
import Modal from 'shared/lib/components/common/Modal'; | ||
|
||
import { BorrowerNftBorrower } from '../../../data/BorrowerNft'; | ||
import { UniswapNFTPosition, UniswapPosition } from '../../../data/Uniswap'; | ||
import { AddUniswapNFTAsCollateralTab } from './tab/AddUniswapNFTAsCollateralTab'; | ||
|
||
export type ImportUniswapNFTModalProps = { | ||
isOpen: boolean; | ||
borrower: BorrowerNftBorrower; | ||
existingUniswapPositions: readonly UniswapPosition[]; | ||
uniswapNFTPositions: Map<number, UniswapNFTPosition>; | ||
defaultUniswapNFTPosition: [number, UniswapNFTPosition]; | ||
setIsOpen: (open: boolean) => void; | ||
setPendingTxn: (pendingTxn: SendTransactionResult | null) => void; | ||
}; | ||
|
||
export default function ImportUniswapNFTModal(props: ImportUniswapNFTModalProps) { | ||
const { isOpen, setIsOpen } = props; | ||
return ( | ||
<Modal isOpen={isOpen} title='Import Uniswap NFT Position' setIsOpen={setIsOpen} maxHeight='650px' maxWidth='500px'> | ||
<AddUniswapNFTAsCollateralTab {...props} /> | ||
</Modal> | ||
); | ||
} |
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