Skip to content

Commit

Permalink
chore: deprecate mumbai (#2037)
Browse files Browse the repository at this point in the history
  • Loading branch information
foodaka authored Apr 23, 2024
1 parent 05f6d52 commit c0dc49f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 67 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"dependencies": {
"@aave/contract-helpers": "1.28.0",
"@aave/math-utils": "1.28.0",
"@bgd-labs/aave-address-book": "^2.24.1",
"@bgd-labs/aave-address-book": "^2.26.1",
"@emotion/cache": "11.10.3",
"@emotion/react": "11.10.4",
"@emotion/server": "latest",
Expand Down
1 change: 1 addition & 0 deletions src/hooks/pool/useUserPoolReservesIncentives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const useUserPoolsReservesIncentivesHumanized = <T = UserReservesIncentiv
queries: marketsData.map((marketData) => ({
queryKey: queryKeysFactory.userPoolReservesIncentiveDataHumanized(user, marketData),
queryFn: () => uiIncentivesService.getUserReservesIncentivesData(marketData, user),

enabled: !!user,
refetchInterval: POLLING_INTERVAL,
...opts,
Expand Down
1 change: 1 addition & 0 deletions src/services/UIIncentivesService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export class UiIncentivesService {
});
}
async getUserReservesIncentivesData(marketData: MarketDataType, user: string) {
if (!marketData.enabledFeatures?.incentives) return [];
const uiIncentiveDataProvider = this.getUiIncentiveDataProvider(marketData);
return uiIncentiveDataProvider.getUserReservesIncentivesDataHumanized({
user,
Expand Down
46 changes: 1 addition & 45 deletions src/ui-config/marketsConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
AaveV2Ethereum,
AaveV2EthereumAMM,
AaveV2Fuji,
AaveV2Mumbai,
AaveV2Polygon,
AaveV3Arbitrum,
AaveV3ArbitrumSepolia,
Expand All @@ -19,7 +18,6 @@ import {
AaveV3Gnosis,
AaveV3Harmony,
AaveV3Metis,
AaveV3Mumbai,
AaveV3Optimism,
AaveV3OptimismSepolia,
AaveV3Polygon,
Expand Down Expand Up @@ -86,7 +84,6 @@ export type MarketDataType = {
export enum CustomMarket {
// v3 test networks, all v3.0.1
proto_arbitrum_sepolia_v3 = 'proto_arbitrum_sepolia_v3',
proto_mumbai_v3 = 'proto_mumbai_v3',
proto_fantom_testnet_v3 = 'proto_fantom_testnet_v3',
proto_fuji_v3 = 'proto_fuji_v3',
proto_optimism_sepolia_v3 = 'proto_optimism_sepolia_v3',
Expand All @@ -111,7 +108,6 @@ export enum CustomMarket {
proto_avalanche = 'proto_avalanche',
proto_fuji = 'proto_fuji',
proto_polygon = 'proto_polygon',
proto_mumbai = 'proto_mumbai',
amm_mainnet = 'amm_mainnet',
// external
// permissioned_market = 'permissioned_market',
Expand Down Expand Up @@ -558,8 +554,7 @@ export const marketsData: {
LENDING_POOL: AaveV3Harmony.POOL,
WETH_GATEWAY: AaveV3Harmony.WETH_GATEWAY,
WALLET_BALANCE_PROVIDER: AaveV3Harmony.WALLET_BALANCE_PROVIDER,
UI_POOL_DATA_PROVIDER: '0xeC6118C69af50660231108059ab98CD0cF9a6eA1',
// UI_POOL_DATA_PROVIDER: AaveV3Harmony.UI_POOL_DATA_PROVIDER,
UI_POOL_DATA_PROVIDER: AaveV3Harmony.UI_POOL_DATA_PROVIDER,
UI_INCENTIVE_DATA_PROVIDER: AaveV3Harmony.UI_INCENTIVE_DATA_PROVIDER,
COLLECTOR: AaveV3Harmony.COLLECTOR,
},
Expand Down Expand Up @@ -625,45 +620,6 @@ export const marketsData: {
marketName: 'polygon',
},
},
[CustomMarket.proto_mumbai_v3]: {
marketTitle: 'Polygon Mumbai',
market: CustomMarket.proto_mumbai_v3,
chainId: ChainId.mumbai,
enabledFeatures: {
incentives: true,
faucet: true,
},
// subgraphUrl: 'https://api.thegraph.com/subgraphs/name/aave/protocol-v3-mumbai', needs re-deployment
addresses: {
LENDING_POOL_ADDRESS_PROVIDER: AaveV3Mumbai.POOL_ADDRESSES_PROVIDER,
LENDING_POOL: AaveV3Mumbai.POOL,
WETH_GATEWAY: AaveV3Mumbai.WETH_GATEWAY,
FAUCET: AaveV3Mumbai.FAUCET,
WALLET_BALANCE_PROVIDER: AaveV3Mumbai.WALLET_BALANCE_PROVIDER,
UI_POOL_DATA_PROVIDER: AaveV3Mumbai.UI_POOL_DATA_PROVIDER,
UI_INCENTIVE_DATA_PROVIDER: AaveV3Mumbai.UI_INCENTIVE_DATA_PROVIDER,
},
v3: true,
},
[CustomMarket.proto_mumbai]: {
marketTitle: 'Polygon Mumbai',
market: CustomMarket.proto_mumbai,
chainId: ChainId.mumbai,
enabledFeatures: {
incentives: true,
faucet: true,
},
subgraphUrl: 'https://api.thegraph.com/subgraphs/name/aave/aave-v2-polygon-mumbai',
addresses: {
LENDING_POOL_ADDRESS_PROVIDER: AaveV2Mumbai.POOL_ADDRESSES_PROVIDER,
LENDING_POOL: AaveV2Mumbai.POOL,
WETH_GATEWAY: AaveV2Mumbai.WETH_GATEWAY,
FAUCET: AaveV2Mumbai.FAUCET,
WALLET_BALANCE_PROVIDER: AaveV2Mumbai.WALLET_BALANCE_PROVIDER,
UI_POOL_DATA_PROVIDER: AaveV2Mumbai.UI_POOL_DATA_PROVIDER,
UI_INCENTIVE_DATA_PROVIDER: AaveV2Mumbai.UI_INCENTIVE_DATA_PROVIDER,
},
},
[CustomMarket.proto_fuji]: {
marketTitle: 'Avalanche Fuji',
market: CustomMarket.proto_fuji,
Expand Down
17 changes: 0 additions & 17 deletions src/ui-config/networksConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,23 +139,6 @@ export const networkConfigs: Record<string, BaseNetworkConfig> = {
},
ratesHistoryApiUrl,
},
[ChainId.mumbai]: {
name: 'Mumbai',
publicJsonRPCUrl: [
'https://rpc.ankr.com/polygon_mumbai',
'https://rpc-mumbai.maticvigil.com',
'https://polygon-testnet.public.blastapi.io',
'https://polygon-mumbai.g.alchemy.com/v2/demo',
],
publicJsonRPCWSUrl: 'wss://polygon-mumbai.g.alchemy.com/v2/demo',
// protocolDataUrl: 'https://api.thegraph.com/subgraphs/name/aave/aave-v2-polygon-mumbai',
baseAssetSymbol: 'MATIC',
wrappedBaseAssetSymbol: 'WMATIC',
baseAssetDecimals: 18,
explorerLink: 'https://explorer-mumbai.maticvigil.com',
isTestnet: true,
networkLogoPath: '/icons/networks/polygon.svg',
},
[ChainId.fuji]: {
name: 'Avalanche Fuji',
publicJsonRPCUrl: [
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1317,10 +1317,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@bgd-labs/aave-address-book@^2.24.1":
version "2.24.2"
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-2.24.2.tgz#9e5c4b72db54bc4bf931dd69a7680fd5cdaa2966"
integrity sha512-2lz2R9OfXOq1aRqt1cMO/RbExgOHq4ueItvEVDI7bVl/iRxk8EDq5JonUZl0EUhjC+Xr+NgfehIOP6h3Qs1CIw==
"@bgd-labs/aave-address-book@^2.26.1":
version "2.26.1"
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-2.26.1.tgz#f1238a1a0826c26a2dd4090c59755e9d1079457a"
integrity sha512-HkFgIZvZu8Kry+lXh+LuNcCHKf7sQQXjrxGHsh5AJgtdaOpiY76fFQUnZKIe3VaF84hABujB6QfKhNEaQxQIPw==

"@coinbase/[email protected]", "@coinbase/wallet-sdk@^3.0.4":
version "3.1.0"
Expand Down

3 comments on commit c0dc49f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit was deployed on ipfs

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit was deployed on ipfs

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit was deployed on ipfs

Please sign in to comment.