Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/FaucetButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button, SvgIcon, Typography } from '@mui/material';
import { useProtocolDataContext } from 'src/hooks/useProtocolDataContext';

import { DarkTooltip } from './infoTooltips/DarkTooltip';
import { Link, ROUTES } from './primitives/Link';
import { Link } from './primitives/Link';

export const FaucetButton = () => {
const { currentNetworkConfig } = useProtocolDataContext();
Expand All @@ -25,7 +25,7 @@ export const FaucetButton = () => {
</SvgIcon>
}
component={Link}
href={ROUTES.faucet}
href={"https://faucet.etherlink.com"}
variant="outlined"
size="small"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ export const SupplyAssetsListItem = ({
isActive,
isFreezed,
detailsAddress,
showSwap,
hideSupply,
}: DashboardReserve) => {
const { currentMarket } = useProtocolDataContext();
const { openSupply, openPSMSwap } = useModalContext();
const { openSupply } = useModalContext();

// Hide the asset to prevent it from being supplied if supply cap has been reached
const { supplyCap: supplyCapUsage } = useAssetCaps();
Expand Down Expand Up @@ -85,12 +84,12 @@ export const SupplyAssetsListItem = ({
<Trans>Deposit</Trans>
</Button>
)}
{showSwap && (
{/* {showSwap && (
<Button variant="contained" onClick={() => openPSMSwap(underlyingAsset)}>
<Trans>Swap</Trans>
</Button>
)}
{!(showSwap && !hideSupply) && (
)} */}
{!hideSupply && (
<Button
variant="outlined"
component={Link}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ export const SupplyAssetsListMobileItem = ({
isFreezed,
underlyingAsset,
detailsAddress,
showSwap,
hideSupply,
}: DashboardReserve) => {
const { currentMarket } = useProtocolDataContext();
const { dsr } = useAppDataContext();
const { openSupply, openPSMSwap } = useModalContext();
const { openSupply, } = useModalContext();

// Hide the asset to prevent it from being supplied if supply cap has been reached
const { supplyCap: supplyCapUsage } = useAssetCaps();
Expand Down Expand Up @@ -125,12 +124,12 @@ export const SupplyAssetsListMobileItem = ({
<Trans>Deposit</Trans>
</Button>
)}
{showSwap && (
{/* {showSwap && (
<Button variant="contained" onClick={() => openPSMSwap(underlyingAsset)} fullWidth>
<Trans>Swap</Trans>
</Button>
)}
{!(showSwap && !hideSupply) && (
)} */}
{!hideSupply && (
<Button
variant="outlined"
component={Link}
Expand Down
46 changes: 23 additions & 23 deletions src/store/root.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { V3FaucetService } from '@aave/contract-helpers';
// import { V3FaucetService } from '@aave/contract-helpers';
import { enableMapSet } from 'immer';
import { CustomMarket } from 'src/ui-config/marketsConfig';
import { ENABLE_TESTNET, STAGING_ENV } from 'src/utils/marketsAndNetworksConfig';
Expand Down Expand Up @@ -61,37 +61,37 @@ if (typeof document !== 'undefined') {

export const useStakeDataSubscription = createSingletonSubscriber(() => {
return useRootStore.getState().refetchStakeData();
}, 60000);
}, 30000);

export const useWalletBalancesSubscription = createSingletonSubscriber(() => {
return useRootStore.getState().refetchWalletBalances();
}, 60000);
}, 30000);

export const usePoolDataSubscription = createSingletonSubscriber(() => {
return useRootStore.getState().refreshPoolData();
}, 60000);
}, 30000);

export const usePoolDataV3Subscription = createSingletonSubscriber(() => {
return useRootStore.getState().refreshPoolV3Data();
}, 60000);
}, 30000);

export const usePoolDataV2Subscription = createSingletonSubscriber(() => {
return useRootStore.getState().refreshPoolV2Data();
}, 60000);
}, 30000);

export const useIncentiveDataSubscription = createSingletonSubscriber(() => {
return useRootStore.getState().refreshIncentiveData();
}, 60000);
}, 30000);

export const useGovernanceDataSubscription = createSingletonSubscriber(() => {
return useRootStore.getState().refreshGovernanceData();
}, 60000);
}, 30000);

let latest: V3FaucetService;
// let latest: V3FaucetService;
useRootStore.subscribe(
(state) => state.currentMarketData,
async (selected) => {
const { setIsFaucetPermissioned: setFaucetPermissioned, jsonRpcProvider } =
const { setIsFaucetPermissioned: setFaucetPermissioned } =
useRootStore.getState();
if (ENABLE_TESTNET || STAGING_ENV) {
if (!selected.v3) {
Expand All @@ -102,19 +102,19 @@ useRootStore.subscribe(
// If there are multiple calls in flight, we only want to use the result from the latest one.
// Use the instance of the service to check if it's the latest one since it is recreated
// everytime this subscription fires.
const service = new V3FaucetService(jsonRpcProvider(), selected.addresses.FAUCET);
latest = service;
service
.isPermissioned()
.then((isPermissioned) => {
if (latest === service) {
setFaucetPermissioned(isPermissioned);
}
})
.catch((e) => {
console.error('error checking faucet permission', e);
setFaucetPermissioned(false);
});
// const service = new V3FaucetService(jsonRpcProvider(), selected.addresses.FAUCET);
// latest = service;
// service
// .isPermissioned()
// .then((isPermissioned) => {
// if (latest === service) {
// setFaucetPermissioned(isPermissioned);
// }
// })
// .catch((e) => {
// console.error('error checking faucet permission', e);
// setFaucetPermissioned(false);
// });
} else {
setFaucetPermissioned(false);
}
Expand Down
17 changes: 9 additions & 8 deletions src/ui-config/marketsConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@ export const marketsData: {
faucet: false,
},
addresses: {
LENDING_POOL_ADDRESS_PROVIDER: '0x5e580E0FF1981E7c916D6D9a036A8596E35fCE31'.toLowerCase(),
LENDING_POOL: '0x837286C1d05735448F7d1942144eE98602206773',
WALLET_BALANCE_PROVIDER: '0xAE0f454b171dA3C0e3B8a75c92A449964f90f7fd',
UI_POOL_DATA_PROVIDER: '0xA69C04756c604b63514cBF13466eCE70a5BF755b',
UI_INCENTIVE_DATA_PROVIDER: '0xdfe6cC78B0A1ed393246B9151c83036AD3e165b8',
WETH_GATEWAY: '0x2ae2308F17667980582c6580556317EBdb61cc68',
LENDING_POOL_ADDRESS_PROVIDER: '0x171A93836687ceE2892c7185B03391187a3f5a55'.toLowerCase(),
LENDING_POOL: '0x9a9fA5B9F1b98585235D040cb30BfFd3734A5d9b',
WALLET_BALANCE_PROVIDER: '0x6cAec669dB4C5f548A147B50c01f85696F71Ecbb',
UI_POOL_DATA_PROVIDER: '0x93E1497Bf67e89C9a7bdB6128cc98533B8627637',
UI_INCENTIVE_DATA_PROVIDER: '0xdf56fB6a781413D6Bd8309C7a630A4d57bC74c44',
WETH_GATEWAY: '0xb92A8614C5463948D75401910f84D7E8bA076140',
COLLECTOR: '0x250fB04547404729D22Eb8f9C498Da13E9980f2D',
},
faucetUrl: 'https://faucet.plend.finance/receiveFaucetTokens',
faucetUrl: 'https://faucet.etherlink.com',
},
} as const;
} as const;
4 changes: 2 additions & 2 deletions src/ui-config/networksConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ export const networkConfigs: Record<string, BaseNetworkConfig> = {
[ChainId.etherlink_testnet]: {
name: 'Etherlink Testnet',
publicJsonRPCUrl: [
'https://etherlink-rollup-testnet-archive.zeeve.net/Rdj3r1npGPHxcDcQvOT/rpc',
'https://node.ghostnet.etherlink.com',
'https://etherlink-ghostnet-6lcp5r.zeeve.net/rpc',
],
baseUniswapAdapter: '0x0',
baseAssetSymbol: 'XTZ',
wrappedBaseAssetSymbol: 'WXTZ',
baseAssetDecimals: 18,
explorerLink: 'https://testnet-explorer.etherlink.com',
explorerLink: 'https://testnet.explorer.etherlink.com',
isTestnet: true,
networkLogoPath: '/icons/networks/etherlink.svg',
},
Expand Down