From bb6923d9d832739982ce660b1c53cd61382ccf4d Mon Sep 17 00:00:00 2001 From: hthieu1110 Date: Thu, 4 Jul 2024 00:17:34 +0700 Subject: [PATCH 1/2] fix: fix multiplier + allow bridge view for polygon --- packages/hooks/riotGame/useSquadStakingConfig.ts | 5 +++-- packages/networks/polygon/index.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/hooks/riotGame/useSquadStakingConfig.ts b/packages/hooks/riotGame/useSquadStakingConfig.ts index 9f673fbcd5..d71d0d7d95 100644 --- a/packages/hooks/riotGame/useSquadStakingConfig.ts +++ b/packages/hooks/riotGame/useSquadStakingConfig.ts @@ -30,13 +30,14 @@ const getEthereumSquadStakingConfig = async (networkId: string | undefined) => { const owner = await ethereumClient.owner(); const squadCountLimit = await ethereumClient.maxSquadCount(); - // TODO: Hardcode several values because it will not be changed and it take too much requests to get them + // NOTE: the current contract does not allow to retrieve the array of multiplier but individual value + // so we hardcode several values because it will not be changed and it take too much requests to get them const squadConfig: SquadConfig = { owner, cooldownPeriod: cooldownPeriod.toNumber(), squadCountLimit: squadCountLimit.toNumber(), // Hardcode - bonusMultiplier: [100, 101, 102, 103, 104, 105], + bonusMultiplier: [100, 105, 125, 131, 139, 161], maxSquadSize: 6, minSquadSize: 1, }; diff --git a/packages/networks/polygon/index.ts b/packages/networks/polygon/index.ts index a46392776f..c819458864 100644 --- a/packages/networks/polygon/index.ts +++ b/packages/networks/polygon/index.ts @@ -6,7 +6,7 @@ export const polygonNetwork: EthereumNetworkInfo = { kind: NetworkKind.Ethereum, displayName: "Polygon", icon: "polygon.svg", - features: [NetworkFeature.RiotP2E], + features: [NetworkFeature.RiotP2E, NetworkFeature.NFTBridge], currencies: polygonCurrencies, idPrefix: "polygon", endpoint: "https://polygon-rpc.com", From f17eabf5a91fa1f70a203170efcc64d5c9d9cb79 Mon Sep 17 00:00:00 2001 From: hthieu1110 Date: Thu, 4 Jul 2024 00:21:32 +0700 Subject: [PATCH 2/2] fix: remove nftbridge for polygon because we dont allow to bridge from polygon for now --- packages/networks/polygon/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/networks/polygon/index.ts b/packages/networks/polygon/index.ts index c819458864..a46392776f 100644 --- a/packages/networks/polygon/index.ts +++ b/packages/networks/polygon/index.ts @@ -6,7 +6,7 @@ export const polygonNetwork: EthereumNetworkInfo = { kind: NetworkKind.Ethereum, displayName: "Polygon", icon: "polygon.svg", - features: [NetworkFeature.RiotP2E, NetworkFeature.NFTBridge], + features: [NetworkFeature.RiotP2E], currencies: polygonCurrencies, idPrefix: "polygon", endpoint: "https://polygon-rpc.com",