diff --git a/src/constants/index.ts b/src/constants/index.ts
index 765b02aa..8ccd5de4 100644
--- a/src/constants/index.ts
+++ b/src/constants/index.ts
@@ -17,7 +17,7 @@ export const STRK_PRICE_API_URL = 'https://api.binance.com/api/v3/ticker/price?s
export const getApiUrl = () => {
if (isTestnetEnvironment()) {
- return 'https://api.goerli.jediswap.xyz/graphql'
+ return 'https://api.jediswap.xyz/graphql'
}
return 'https://api.jediswap.xyz/graphql'
}
diff --git a/src/pages/Rewards/index.tsx b/src/pages/Rewards/index.tsx
index b6d49f2c..611f6ddc 100644
--- a/src/pages/Rewards/index.tsx
+++ b/src/pages/Rewards/index.tsx
@@ -363,7 +363,9 @@ const pairs = [
export default function Rewards() {
const [pairsData, setPairsData] = useState([])
+ const [pairsLoading, setPairsLoading] = useState(false)
useEffect(() => {
+ setPairsLoading(true)
const pairIds = pairs.map(pair => pair.poolAddress)
async function getPairsData() {
@@ -404,6 +406,7 @@ export default function Rewards() {
})
setPairsData(sortedRewardsPositions)
+ setPairsLoading(false)
}
if (!pairsData.length) {
@@ -542,7 +545,7 @@ export default function Rewards() {
margin
/> */}
- {pair.token0.symbol}-{pair.token1.symbol}
+ {pair?.token0?.symbol}-{pair?.token1?.symbol}
Total APR:
@@ -561,6 +564,8 @@ export default function Rewards() {
)
}
+ console.log(pairsData, 'pairsData')
+
return (
Earn STRK incentives by providing liquidity to these pools:
- {pairsData.map(pair => (
-
- ))}
+ {pairsData.length ? pairsData.map(pair => ) : 'Loading'}