Skip to content

Commit

Permalink
chore: update loading states
Browse files Browse the repository at this point in the history
  • Loading branch information
martines3000 committed Jan 13, 2025
1 parent a79a204 commit 1a9f30c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export const MarketCollateralsTable = ({
}: { marketName: string }) => {
const { data: collateralConfigurations } =
useCollateralConfigurations(marketName);
const { data: marketConfiguration } = useMarketConfiguration(marketName);

const collaterals = useMemo(() => {
if (!collateralConfigurations) return [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function MarketOverview({
}: MarketOverviewProps) {
const { data: totalReserves } = useTotalReserves(baseAsset);

const { data: aprData, isPending: isAprPending } = useApr();
const { data: aprData, isPending: isAprPending } = useApr(baseAsset);

const { data: collateralConfigurations } =
useCollateralConfigurations(baseAsset);
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/components/MarketsView/MarketTableRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const MarketTableRow = ({
const { data: marketConfiguration } = useMarketConfiguration();

const { data: utilization } = useUtilization(marketName);
const { data: aprData, isPending: isAprPending } = useApr();
const { data: aprData, isPending: isAprPending } = useApr(marketName);

const {
data: collateralConfigurations,
Expand Down Expand Up @@ -119,7 +119,7 @@ export const MarketTableRow = ({
);
}, [totalCollateral, priceData]);

return isPendingCollateralConfigurations ? (
return isPendingCollateralConfigurations || isAprPending ? (
SkeletonRow
) : (
<TableRow
Expand Down
16 changes: 8 additions & 8 deletions apps/frontend/src/configs/envs/testnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,29 @@ export function createTestnetConfig() {
const rewards: Rewards = {
USDC: [
{
poolSize: 2000000,
poolSize: 200,
assetId:
'0x1d5d97005e41cae2187a895fd8eab0506111e0e2f3331cd3912c15c24e3c1d82',
'0x3aced3c270121c9d85e00fb14f079ecc666b733b12a0d15df1c2ecae26c1167a',
supplyRewardPercentage: 0.5,
borrowRewardPercentage: 0.5,
startDate: '2025-01-07T00:00:00Z',
endDate: '2025-01-14T00:00:00Z',
durationInDays: 7,
},
{
poolSize: 4000000,
poolSize: 400,
assetId:
'0x1d5d97005e41cae2187a895fd8eab0506111e0e2f3331cd3912c15c24e3c1d82',
'0x3aced3c270121c9d85e00fb14f079ecc666b733b12a0d15df1c2ecae26c1167a',
supplyRewardPercentage: 0.5,
borrowRewardPercentage: 0.5,
startDate: '2025-01-14T00:00:00Z',
endDate: '2025-01-21T00:00:00Z',
durationInDays: 7,
},
{
poolSize: 8000000,
poolSize: 800,
assetId:
'0x1d5d97005e41cae2187a895fd8eab0506111e0e2f3331cd3912c15c24e3c1d82',
'0x3aced3c270121c9d85e00fb14f079ecc666b733b12a0d15df1c2ecae26c1167a',
supplyRewardPercentage: 0.5,
borrowRewardPercentage: 0.5,
startDate: '2025-01-21T00:00:00Z',
Expand All @@ -67,9 +67,9 @@ const rewards: Rewards = {
],
USDT: [
{
poolSize: 2000000,
poolSize: 200,
assetId:
'0x1d5d97005e41cae2187a895fd8eab0506111e0e2f3331cd3912c15c24e3c1d82',
'0xc264acd28eaf6f33e0e13360a37741dc91221aaa8817e1b4e462d61bb08c5835',
supplyRewardPercentage: 0.5,
borrowRewardPercentage: 0.5,
startDate: '2025-01-11T00:00:00Z',
Expand Down

0 comments on commit 1a9f30c

Please sign in to comment.