Skip to content

Commit

Permalink
Merge pull request #368 from zkLinkProtocol/feat/add-interport
Browse files Browse the repository at this point in the history
add interport
  • Loading branch information
MickWang authored Oct 12, 2024
2 parents 5629351 + f106aa9 commit 73363dd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/ThirdPartyBridge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default function ThridPartyBridge() {
const {
mesonBridgeNovaPoints,
symbiosisBridgeNovaPoints,
interportBridgeNovaPoints,
owltoBridgeNovaPoints,
orbiterBridgeNovaPoints,
} = useNovaPoints();
Expand Down Expand Up @@ -93,11 +94,22 @@ export default function ThridPartyBridge() {
}`,
link: "https://app.symbiosis.finance/swap?chainIn=Ethereum&chainOut=ZkLink&tokenIn=ETH&tokenOut=ETH",
},
{
iconURL: "/img/icon-interport.svg",
name: "Interport",
desc: "Bridge more than $200 USDC to Nova to earn Nova Points.",
tooltip: "",
points: `${interportBridgeNovaPoints} ${
interportBridgeNovaPoints > 1 ? "Nova Points" : "Nova Point"
}`,
link: "https://app.interport.fi/bridge/1/810180/USDT/USDT",
},
];
}, [
mesonBridgeNovaPoints,
orbiterBridgeNovaPoints,
symbiosisBridgeNovaPoints,
interportBridgeNovaPoints
]);

return (
Expand Down
10 changes: 10 additions & 0 deletions src/hooks/useNovaPoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export default () => {
getMesonNovaPointsFunc();
// getOwltoNovaPointsFunc();
getSymbiosisBridgePointsFunc();
getInterportBridgePointsFunc();
getOrbiterBridgePointsFunc();
getMesonisBridgePointsFunc();
getOwltoBridgePointsFunc();
Expand Down Expand Up @@ -313,6 +314,14 @@ export default () => {
setSymbiosisBridgeNovaPoints(Number(data) || 0);
};

const [interportBridgeNovaPoints, setInterportBridgeNovaPoints] = useState(0);
const getInterportBridgePointsFunc = async () => {
if (!address) return;
const { data } = await getBridgePoints("interport");

setInterportBridgeNovaPoints(Number(data) || 0);
};

const [orbiterBridgeNovaPoints, setOrbiterBridgeNovaPoints] = useState(0);
const getOrbiterBridgePointsFunc = async () => {
if (!address) return;
Expand Down Expand Up @@ -353,6 +362,7 @@ export default () => {
owltoNovaPoints,
dAppNovaPoints,
symbiosisBridgeNovaPoints,
interportBridgeNovaPoints,
mesonBridgeNovaPoints,
owltoBridgeNovaPoints,
orbiterBridgeNovaPoints,
Expand Down

0 comments on commit 73363dd

Please sign in to comment.