From fd56c3043b3f063321f897f4078f583197e65903 Mon Sep 17 00:00:00 2001 From: Dmitry <61683409+0xDmitry@users.noreply.github.com> Date: Wed, 14 Jun 2023 22:37:23 +0300 Subject: [PATCH 1/7] Fix toast message overflow (#1044) --- src/components/toast/ToastComponent.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/toast/ToastComponent.tsx b/src/components/toast/ToastComponent.tsx index c02e4318..402250a1 100644 --- a/src/components/toast/ToastComponent.tsx +++ b/src/components/toast/ToastComponent.tsx @@ -57,6 +57,7 @@ const Text = styled.p` color: ${({ theme: { colors } }) => colors.textColorLight}; font-size: 0.8rem; margin: 5px 0; + overflow-wrap: anywhere; ` export const ToastComponent = ({ From 69ee23147eb479bb5a9bf4941c312ff2f5d0ea26 Mon Sep 17 00:00:00 2001 From: Dmitry <61683409+0xDmitry@users.noreply.github.com> Date: Wed, 14 Jun 2023 22:37:37 +0300 Subject: [PATCH 2/7] Small layout fixes (#1043) --- src/components/pools/PoolMain.tsx | 2 ++ src/components/pools/common/Create.tsx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/components/pools/PoolMain.tsx b/src/components/pools/PoolMain.tsx index 0ce8d02e..d22a841b 100644 --- a/src/components/pools/PoolMain.tsx +++ b/src/components/pools/PoolMain.tsx @@ -75,6 +75,8 @@ const CardWithTitle = styled(BaseCardWithTitle)` @media (min-width: ${({ theme }) => theme.themeBreakPoints.desktopStart}) { order: 0; } + + padding-bottom: 20px; ` const ActionsWrapper = styled.div` diff --git a/src/components/pools/common/Create.tsx b/src/components/pools/common/Create.tsx index 89e783b5..1b9be557 100644 --- a/src/components/pools/common/Create.tsx +++ b/src/components/pools/common/Create.tsx @@ -8,6 +8,8 @@ export const WrapperGrid = styled.div` display: grid; grid-template-columns: 30px 1fr 30px; } + + padding: 0px 20px 20px 20px; ` export const StepContents = styled.div` From 65c1ff8ef4b974876cf9585e2e0151ee3d3cbc64 Mon Sep 17 00:00:00 2001 From: 0xDmitry Date: Thu, 15 Jun 2023 19:09:56 -0300 Subject: [PATCH 3/7] Fix transaction error toast --- src/hooks/contracts/useTransaction.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/contracts/useTransaction.tsx b/src/hooks/contracts/useTransaction.tsx index d96116c9..f78259d0 100644 --- a/src/hooks/contracts/useTransaction.tsx +++ b/src/hooks/contracts/useTransaction.tsx @@ -52,7 +52,7 @@ export default function useTransaction< toast.dismiss() const error = new TransactionError( - e.data?.message || e.message || 'Unable to decode revert reason', + e.reason || 'Unable to decode revert reason', e.data?.code || e.code, e.data, ) @@ -79,7 +79,7 @@ export default function useTransaction< toast.dismiss() const error = new TransactionError( - e.data?.message || e.message || 'Unable to decode revert reason', + e.reason || 'Unable to decode revert reason', e.data?.code || e.code, e.data, ) From db50bfa2cd54f41a3b082d3a8837980f8a329a7e Mon Sep 17 00:00:00 2001 From: 0xDmitry Date: Thu, 15 Jun 2023 19:14:41 -0300 Subject: [PATCH 4/7] Fix --- src/hooks/contracts/useTransaction.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/contracts/useTransaction.tsx b/src/hooks/contracts/useTransaction.tsx index f78259d0..ed6fb311 100644 --- a/src/hooks/contracts/useTransaction.tsx +++ b/src/hooks/contracts/useTransaction.tsx @@ -52,7 +52,7 @@ export default function useTransaction< toast.dismiss() const error = new TransactionError( - e.reason || 'Unable to decode revert reason', + e.reason || e.data?.message || e.message || 'Unable to decode revert reason', e.data?.code || e.code, e.data, ) @@ -79,7 +79,7 @@ export default function useTransaction< toast.dismiss() const error = new TransactionError( - e.reason || 'Unable to decode revert reason', + e.reason || e.data?.message || e.message || 'Unable to decode revert reason', e.data?.code || e.code, e.data, ) From f747b58274b60043d28808bc59031351a93f70ec Mon Sep 17 00:00:00 2001 From: 0xcdb Date: Fri, 16 Jun 2023 10:05:08 +1000 Subject: [PATCH 5/7] Update useTransaction.tsx --- src/hooks/contracts/useTransaction.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hooks/contracts/useTransaction.tsx b/src/hooks/contracts/useTransaction.tsx index ed6fb311..264adcc1 100644 --- a/src/hooks/contracts/useTransaction.tsx +++ b/src/hooks/contracts/useTransaction.tsx @@ -52,7 +52,11 @@ export default function useTransaction< toast.dismiss() const error = new TransactionError( - e.reason || e.data?.message || e.message || 'Unable to decode revert reason', + e.error?.message || + e.reason || + e.data?.message || + e.message || + 'Unable to decode revert reason', e.data?.code || e.code, e.data, ) From d743e10cd1ca54d94f23e8c030f011d2f3eaa860 Mon Sep 17 00:00:00 2001 From: 0xcdb Date: Fri, 16 Jun 2023 10:09:52 +1000 Subject: [PATCH 6/7] Update useTransaction.tsx --- src/hooks/contracts/useTransaction.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hooks/contracts/useTransaction.tsx b/src/hooks/contracts/useTransaction.tsx index 264adcc1..d374c0ea 100644 --- a/src/hooks/contracts/useTransaction.tsx +++ b/src/hooks/contracts/useTransaction.tsx @@ -83,7 +83,11 @@ export default function useTransaction< toast.dismiss() const error = new TransactionError( - e.reason || e.data?.message || e.message || 'Unable to decode revert reason', + e.error?.message || + e.reason || + e.data?.message || + e.message || + 'Unable to decode revert reason', e.data?.code || e.code, e.data, ) From 37b5cc493e5cdfb96f114cd69f7da10667a4b829 Mon Sep 17 00:00:00 2001 From: "saeta.eth" Date: Fri, 16 Jun 2023 16:35:29 -0300 Subject: [PATCH 7/7] temp fix due uniswap v2 subgraph issues (#1048) --- src/utils/stake/getUniswapStakingRewards.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/utils/stake/getUniswapStakingRewards.ts b/src/utils/stake/getUniswapStakingRewards.ts index 1044c8aa..e730e422 100644 --- a/src/utils/stake/getUniswapStakingRewards.ts +++ b/src/utils/stake/getUniswapStakingRewards.ts @@ -70,9 +70,11 @@ export const getUniswapStakingRewards = async ({ const aelinRate = rates.aelin.usd const ethRate = rates.ethereum.usd + /* const uniswapData: UniswapResponse = await getUniswapPoolAmount() const aelinInPool = uniswapData.pair.reserve0 const ethInPool = uniswapData.pair.reserve1 + const uniV2TotalSupplyInWei = new Wei(BigNumber.from(uniV2TotalSupply), BASE_DECIMALS) const totalStakedBalanceInWei = new Wei(BigNumber.from(totalStakedBalance), BASE_DECIMALS) @@ -85,6 +87,7 @@ export const getUniswapStakingRewards = async ({ const uniV2ValueInContract = totalStakedBalanceInWei.toNumber() * uniV2Price const rewardsValuePerYear = rewardForDurationInWei.toNumber() * yearProRata * aelinRate + */ return { decimals: decimals || BASE_DECIMALS, @@ -92,9 +95,10 @@ export const getUniswapStakingRewards = async ({ userRewards: userRewards || ZERO_BN, userStake: userStake || ZERO_BN, tokenBalance: tokenBalance || ZERO_BN, - ethInPool, - aelinInPool, - APY: (100 * rewardsValuePerYear) / uniV2ValueInContract, + // Temp fix til uniswap v2 subgraph work + ethInPool: '0', + aelinInPool: '0', + APY: 0, // (100 * rewardsValuePerYear) / uniV2ValueInContract, } } catch (error) { console.error('error: ', error)