From 479fabf474cf6fc9ec683009c13b0842a7fb0582 Mon Sep 17 00:00:00 2001 From: "K.K." Date: Mon, 1 Sep 2025 08:58:02 +0100 Subject: [PATCH 1/6] feat: add updated contracts on testnet --- src/abis/umbrellaBatchHelper.ts | 50 ++-- src/abis/umbrellaDataAggregationHelper.ts | 268 +++++++++++----------- src/constants/markets.ts | 6 +- 3 files changed, 171 insertions(+), 153 deletions(-) diff --git a/src/abis/umbrellaBatchHelper.ts b/src/abis/umbrellaBatchHelper.ts index f642aa8..8ab1cd8 100644 --- a/src/abis/umbrellaBatchHelper.ts +++ b/src/abis/umbrellaBatchHelper.ts @@ -1,33 +1,26 @@ export const UMBRELLA_BATCH_HELPER_ABI = [ { inputs: [ - { internalType: "address", name: "rewardsController", type: "address" }, - { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "rewardsController_", type: "address" }, + { internalType: "address", name: "owner_", type: "address" }, ], stateMutability: "nonpayable", type: "constructor", }, - { - inputs: [{ internalType: "address", name: "target", type: "address" }], - name: "AddressEmptyCode", - type: "error", - }, + { inputs: [{ internalType: "address", name: "target", type: "address" }], name: "AddressEmptyCode", type: "error" }, + { inputs: [], name: "EnforcedPause", type: "error" }, { inputs: [], name: "EthTransferFailed", type: "error" }, + { inputs: [], name: "ExpectedPause", type: "error" }, { inputs: [], name: "FailedCall", type: "error" }, { inputs: [], name: "InvalidEdgeToken", type: "error" }, { inputs: [], name: "NotInitializedStake", type: "error" }, { inputs: [], name: "OnlyRescueGuardian", type: "error" }, - { - inputs: [{ internalType: "address", name: "owner", type: "address" }], - name: "OwnableInvalidOwner", - type: "error", - }, + { inputs: [{ internalType: "address", name: "owner", type: "address" }], name: "OwnableInvalidOwner", type: "error" }, { inputs: [{ internalType: "address", name: "account", type: "address" }], name: "OwnableUnauthorizedAccount", type: "error", }, - { inputs: [], name: "PathFromOnlyStakeTokenCouldBeInitialized", type: "error" }, { inputs: [{ internalType: "address", name: "token", type: "address" }], name: "SafeERC20FailedOperation", @@ -37,7 +30,7 @@ export const UMBRELLA_BATCH_HELPER_ABI = [ { inputs: [], name: "ZeroAmount", type: "error" }, { anonymous: false, - inputs: [{ indexed: false, internalType: "address", name: "stakeToken", type: "address" }], + inputs: [{ indexed: true, internalType: "address", name: "stakeToken", type: "address" }], name: "AssetPathInitialized", type: "event", }, @@ -71,6 +64,18 @@ export const UMBRELLA_BATCH_HELPER_ABI = [ name: "OwnershipTransferred", type: "event", }, + { + anonymous: false, + inputs: [{ indexed: false, internalType: "address", name: "account", type: "address" }], + name: "Paused", + type: "event", + }, + { + anonymous: false, + inputs: [{ indexed: false, internalType: "address", name: "account", type: "address" }], + name: "Unpaused", + type: "event", + }, { inputs: [], name: "REWARDS_CONTROLLER", @@ -187,6 +192,14 @@ export const UMBRELLA_BATCH_HELPER_ABI = [ stateMutability: "view", type: "function", }, + { inputs: [], name: "pause", outputs: [], stateMutability: "nonpayable", type: "function" }, + { + inputs: [], + name: "paused", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -226,13 +239,7 @@ export const UMBRELLA_BATCH_HELPER_ABI = [ stateMutability: "nonpayable", type: "function", }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, + { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "address", name: "newOwner", type: "address" }], name: "transferOwnership", @@ -240,6 +247,7 @@ export const UMBRELLA_BATCH_HELPER_ABI = [ stateMutability: "nonpayable", type: "function", }, + { inputs: [], name: "unpause", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [], name: "whoCanRescue", diff --git a/src/abis/umbrellaDataAggregationHelper.ts b/src/abis/umbrellaDataAggregationHelper.ts index 90b4419..5928841 100644 --- a/src/abis/umbrellaDataAggregationHelper.ts +++ b/src/abis/umbrellaDataAggregationHelper.ts @@ -1,12 +1,88 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ + { + inputs: [ + { internalType: "address", name: "rewardsController_", type: "address" }, + { internalType: "address", name: "owner_", type: "address" }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { inputs: [], name: "EthTransferFailed", type: "error" }, + { inputs: [], name: "OnlyRescueGuardian", type: "error" }, + { inputs: [{ internalType: "address", name: "owner", type: "address" }], name: "OwnableInvalidOwner", type: "error" }, + { + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "OwnableUnauthorizedAccount", + type: "error", + }, + { + inputs: [{ internalType: "address", name: "token", type: "address" }], + name: "SafeERC20FailedOperation", + type: "error", + }, + { inputs: [], name: "ZeroAddress", type: "error" }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "caller", type: "address" }, + { indexed: true, internalType: "address", name: "token", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "ERC20Rescued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "caller", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "NativeTokensRescued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "address", name: "previousOwner", type: "address" }, + { indexed: true, internalType: "address", name: "newOwner", type: "address" }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + inputs: [], + name: "REWARDS_CONTROLLER", + outputs: [{ internalType: "contract IRewardsController", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "to", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "emergencyEtherTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "erc20Token", type: "address" }, + { internalType: "address", name: "to", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "emergencyTokenTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { internalType: "contract IUmbrella", name: "umbrella", type: "address" }, - { - internalType: "contract IAaveOracle", - name: "aaveOracle", - type: "address", - }, + { internalType: "contract IAaveOracle", name: "aaveOracle", type: "address" }, { internalType: "address", name: "user", type: "address" }, ], name: "getAllAggregatedData", @@ -26,6 +102,7 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ type: "tuple", }, { internalType: "uint256", name: "totalAssets", type: "uint256" }, + { internalType: "uint256", name: "maxTotalAssets", type: "uint256" }, { internalType: "uint256", name: "targetLiquidity", type: "uint256" }, { internalType: "address", name: "reserve", type: "address" }, { internalType: "bool", name: "isStakeConfigured", type: "bool" }, @@ -43,16 +120,8 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ name: "rewardTokenData", type: "tuple", }, - { - internalType: "uint256", - name: "maxEmissionPerSecond", - type: "uint256", - }, - { - internalType: "uint256", - name: "distributionEnd", - type: "uint256", - }, + { internalType: "uint256", name: "maxEmissionPerSecond", type: "uint256" }, + { internalType: "uint256", name: "distributionEnd", type: "uint256" }, ], internalType: "struct DataAggregationHelper.RewardTokenData[]", name: "rewardsTokenData", @@ -68,11 +137,7 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ { internalType: "address", name: "stakeToken", type: "address" }, { components: [ - { - internalType: "enum DataAggregationHelper.TokenType", - name: "typeOfToken", - type: "uint8", - }, + { internalType: "enum DataAggregationHelper.TokenType", name: "typeOfToken", type: "uint8" }, { components: [ { internalType: "address", name: "token", type: "address" }, @@ -98,19 +163,11 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ { components: [ { internalType: "address", name: "stakeToken", type: "address" }, - { - internalType: "uint256", - name: "stakeUserBalance", - type: "uint256", - }, + { internalType: "uint256", name: "stakeUserBalance", type: "uint256" }, { components: [ { internalType: "address", name: "reward", type: "address" }, - { - internalType: "uint256", - name: "currentReward", - type: "uint256", - }, + { internalType: "uint256", name: "currentReward", type: "uint256" }, ], internalType: "struct DataAggregationHelper.RewardTokenUserData[]", name: "rewardsTokenUserData", @@ -126,11 +183,7 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ { internalType: "address", name: "stakeToken", type: "address" }, { components: [ - { - internalType: "enum DataAggregationHelper.TokenType", - name: "typeOfToken", - type: "uint8", - }, + { internalType: "enum DataAggregationHelper.TokenType", name: "typeOfToken", type: "uint8" }, { internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "userBalance", type: "uint256" }, ], @@ -150,11 +203,7 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ { inputs: [ { internalType: "contract IUmbrella", name: "umbrella", type: "address" }, - { - internalType: "contract IAaveOracle", - name: "aaveOracle", - type: "address", - }, + { internalType: "contract IAaveOracle", name: "aaveOracle", type: "address" }, ], name: "getTokensAggregatedData", outputs: [ @@ -173,6 +222,7 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ type: "tuple", }, { internalType: "uint256", name: "totalAssets", type: "uint256" }, + { internalType: "uint256", name: "maxTotalAssets", type: "uint256" }, { internalType: "uint256", name: "targetLiquidity", type: "uint256" }, { internalType: "address", name: "reserve", type: "address" }, { internalType: "bool", name: "isStakeConfigured", type: "bool" }, @@ -190,16 +240,8 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ name: "rewardTokenData", type: "tuple", }, - { - internalType: "uint256", - name: "maxEmissionPerSecond", - type: "uint256", - }, - { - internalType: "uint256", - name: "distributionEnd", - type: "uint256", - }, + { internalType: "uint256", name: "maxEmissionPerSecond", type: "uint256" }, + { internalType: "uint256", name: "distributionEnd", type: "uint256" }, ], internalType: "struct DataAggregationHelper.RewardTokenData[]", name: "rewardsTokenData", @@ -217,11 +259,7 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ { inputs: [ { internalType: "contract IUmbrella", name: "umbrella", type: "address" }, - { - internalType: "contract IAaveOracle", - name: "aaveOracle", - type: "address", - }, + { internalType: "contract IAaveOracle", name: "aaveOracle", type: "address" }, ], name: "getTokensRouteData", outputs: [ @@ -230,11 +268,7 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ { internalType: "address", name: "stakeToken", type: "address" }, { components: [ - { - internalType: "enum DataAggregationHelper.TokenType", - name: "typeOfToken", - type: "uint8", - }, + { internalType: "enum DataAggregationHelper.TokenType", name: "typeOfToken", type: "uint8" }, { components: [ { internalType: "address", name: "token", type: "address" }, @@ -264,11 +298,7 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ { inputs: [ { internalType: "contract IUmbrella", name: "umbrella", type: "address" }, - { - internalType: "contract IAaveOracle", - name: "aaveOracle", - type: "address", - }, + { internalType: "contract IAaveOracle", name: "aaveOracle", type: "address" }, ], name: "getUmbrellaData", outputs: [ @@ -289,13 +319,10 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ type: "tuple", }, { internalType: "uint256", name: "totalAssets", type: "uint256" }, + { internalType: "uint256", name: "maxTotalAssets", type: "uint256" }, { internalType: "uint256", name: "totalSupply", type: "uint256" }, { internalType: "uint256", name: "cooldown", type: "uint256" }, - { - internalType: "uint256", - name: "unstakeWindow", - type: "uint256", - }, + { internalType: "uint256", name: "unstakeWindow", type: "uint256" }, ], internalType: "struct DataAggregationHelper.StakeTokenConfig", name: "stakeTokenConfig", @@ -303,51 +330,23 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ }, { components: [ - { - internalType: "uint256", - name: "targetLiquidity", - type: "uint256", - }, + { internalType: "uint256", name: "targetLiquidity", type: "uint256" }, { components: [ { components: [ - { - internalType: "address", - name: "token", - type: "address", - }, - { - internalType: "uint256", - name: "price", - type: "uint256", - }, + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "price", type: "uint256" }, { internalType: "string", name: "name", type: "string" }, - { - internalType: "string", - name: "symbol", - type: "string", - }, - { - internalType: "uint8", - name: "decimals", - type: "uint8", - }, + { internalType: "string", name: "symbol", type: "string" }, + { internalType: "uint8", name: "decimals", type: "uint8" }, ], internalType: "struct DataAggregationHelper.TokenData", name: "reward", type: "tuple", }, - { - internalType: "uint256", - name: "maxEmissionPerSecond", - type: "uint256", - }, - { - internalType: "uint256", - name: "distributionEnd", - type: "uint256", - }, + { internalType: "uint256", name: "maxEmissionPerSecond", type: "uint256" }, + { internalType: "uint256", name: "distributionEnd", type: "uint256" }, ], internalType: "struct DataAggregationHelper.RewardConfig[]", name: "rewardConfigs", @@ -361,16 +360,8 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ { components: [ { internalType: "address", name: "reserve", type: "address" }, - { - internalType: "uint256", - name: "deficitOffset", - type: "uint256", - }, - { - internalType: "uint256", - name: "pendingDeficit", - type: "uint256", - }, + { internalType: "uint256", name: "deficitOffset", type: "uint256" }, + { internalType: "uint256", name: "pendingDeficit", type: "uint256" }, ], internalType: "struct DataAggregationHelper.UmbrellaConfig", name: "umbrellaConfig", @@ -395,19 +386,11 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ { components: [ { internalType: "address", name: "stakeToken", type: "address" }, - { - internalType: "uint256", - name: "stakeUserBalance", - type: "uint256", - }, + { internalType: "uint256", name: "stakeUserBalance", type: "uint256" }, { components: [ { internalType: "address", name: "reward", type: "address" }, - { - internalType: "uint256", - name: "currentReward", - type: "uint256", - }, + { internalType: "uint256", name: "currentReward", type: "uint256" }, ], internalType: "struct DataAggregationHelper.RewardTokenUserData[]", name: "rewardsTokenUserData", @@ -434,11 +417,7 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ { internalType: "address", name: "stakeToken", type: "address" }, { components: [ - { - internalType: "enum DataAggregationHelper.TokenType", - name: "typeOfToken", - type: "uint8", - }, + { internalType: "enum DataAggregationHelper.TokenType", name: "typeOfToken", type: "uint8" }, { internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "userBalance", type: "uint256" }, ], @@ -455,4 +434,33 @@ export const UMBRELLA_DATA_AGGREGATION_HELPER_ABI = [ stateMutability: "view", type: "function", }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "maxRescue", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" }, + { + inputs: [{ internalType: "address", name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "whoCanRescue", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, ] as const; diff --git a/src/constants/markets.ts b/src/constants/markets.ts index b3e27b7..ab32c07 100644 --- a/src/constants/markets.ts +++ b/src/constants/markets.ts @@ -28,8 +28,10 @@ export const MARKETS: Market[] = [ oracle: AaveV3BaseSepolia.ORACLE, rewardsController: UmbrellaBaseSepolia.UMBRELLA_REWARDS_CONTROLLER, umbrellaHelper: UmbrellaBaseSepolia.UMBRELLA, - batchHelper: UmbrellaBaseSepolia.UMBRELLA_BATCH_HELPER, - umbrellaDataAggregationHelper: UmbrellaBaseSepolia.DATA_AGGREGATION_HELPER, + // batchHelper: UmbrellaBaseSepolia.UMBRELLA_BATCH_HELPER, + batchHelper: "0x32eb722eF6fC2B5ea50e833Fb538769fF09A6C1c", // New version + // umbrellaDataAggregationHelper: UmbrellaBaseSepolia.DATA_AGGREGATION_HELPER, + umbrellaDataAggregationHelper: "0xDdE9091B6F9003f3b7070Ce7c377Eee09a8e0245", // New version wrapNativeTokenAddress: AaveV3BaseSepolia.ASSETS.WETH.UNDERLYING, } as const, ] From e1257e37867817118fc60d66c7746c50582cc99e Mon Sep 17 00:00:00 2001 From: "K.K." Date: Mon, 1 Sep 2025 09:06:51 +0100 Subject: [PATCH 2/6] feat: add maxTargetLiquidity --- src/hooks/useAllStkTokens.ts | 3 ++- src/types/token.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hooks/useAllStkTokens.ts b/src/hooks/useAllStkTokens.ts index 9011a50..3b842de 100644 --- a/src/hooks/useAllStkTokens.ts +++ b/src/hooks/useAllStkTokens.ts @@ -53,7 +53,7 @@ export const useAllStkTokens = () => { const [aggregatedData, pathData, userAggregatedData, userPathData] = data; return aggregatedData - .map(({ stakeTokenData, rewardsTokenData, totalAssets, targetLiquidity }, index) => { + .map(({ stakeTokenData, rewardsTokenData, totalAssets, targetLiquidity, maxTotalAssets }, index) => { const { stakeUserBalance, rewardsTokenUserData } = userAggregatedData[index] ?? {}; const stkTokenPathData = pathData[index] as StkTokenPathData; const stkTokenUserPathData = userPathData[index] as UserPathData; @@ -121,6 +121,7 @@ export const useAllStkTokens = () => { totalAssets, totalRewardsUSDAmount: rewards.reduce((acc, { usdAmount }) => acc + (usdAmount ?? 0), 0), targetLiquidity, + maxTotalAssets, rewards, reserve: reserve ?? null, stata: diff --git a/src/types/token.ts b/src/types/token.ts index 72ee971..7367412 100644 --- a/src/types/token.ts +++ b/src/types/token.ts @@ -95,6 +95,7 @@ export type StkToken = Token & totalAssets: bigint; totalRewardsUSDAmount: number; targetLiquidity: bigint; + maxTotalAssets: bigint; isUnderlyingStataToken: boolean; rewards: Reward[]; reserve: Reserve | null; From 9c09a6a17eb466c04a540d194a53acec519c911f Mon Sep 17 00:00:00 2001 From: "K.K." Date: Mon, 1 Sep 2025 13:23:57 +0100 Subject: [PATCH 3/6] feat: add to supply cap to summary --- .../StakedSummary/StakedSummary.tsx | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/app/components/StakedSummary/StakedSummary.tsx b/src/app/components/StakedSummary/StakedSummary.tsx index b546dfe..93d4be0 100644 --- a/src/app/components/StakedSummary/StakedSummary.tsx +++ b/src/app/components/StakedSummary/StakedSummary.tsx @@ -42,6 +42,7 @@ export const StakedSummary = memo(({ stkTokens }: StakedSummaryProps) => { decimals, latestAnswerFormatted, targetLiquidity, + maxTotalAssets, underlying, isUnderlyingStataToken, apyData, @@ -49,6 +50,7 @@ export const StakedSummary = memo(({ stkTokens }: StakedSummaryProps) => { const stakedUSD = Number(formatUnits(totalAssets, decimals)) * latestAnswerFormatted; const targetLiquidityUSD = Number(formatUnits(targetLiquidity, decimals)) * latestAnswerFormatted; + const maxTotalAssetsUSD = Number(formatUnits(maxTotalAssets, decimals)) * latestAnswerFormatted; return (
@@ -71,6 +73,10 @@ export const StakedSummary = memo(({ stkTokens }: StakedSummaryProps) => {
Target Liquidity
+
+
Supply Cap
+ +
Current Yield
@@ -102,6 +108,7 @@ export const StakedSummary = memo(({ stkTokens }: StakedSummaryProps) => { underlying, isUnderlyingStataToken, apyData, + maxTotalAssets, } = selectedToken; const rewardColors = ["bg-green-300", "bg-orange-300", "bg-red-300", "bg-pink-300", "bg-yellow-300"]; @@ -110,6 +117,7 @@ export const StakedSummary = memo(({ stkTokens }: StakedSummaryProps) => { const targetLiquidityUSD = Number(formatUnits(targetLiquidity, decimals)) * latestAnswerFormatted; const currentUmbrellaData = umbrellaData?.find((data) => data.stakeTokenConfig.stakeToken.address === address); + const maxTotalAssetsUSD = Number(formatUnits(maxTotalAssets, decimals)) * latestAnswerFormatted; return ( !open && setSelectedToken(null)}> @@ -134,6 +142,10 @@ export const StakedSummary = memo(({ stkTokens }: StakedSummaryProps) => {
Total Staked
+
+
Supply Cap
+ +
@@ -342,12 +354,14 @@ export const StakedSummary = memo(({ stkTokens }: StakedSummaryProps) => { decimals, latestAnswerFormatted, targetLiquidity, + maxTotalAssets, underlying, isUnderlyingStataToken, apyData, }) => { const stakedUSD = Number(formatUnits(totalAssets, decimals)) * latestAnswerFormatted; const targetLiquidityUSD = Number(formatUnits(targetLiquidity, decimals)) * latestAnswerFormatted; + const maxTotalAssetsUSD = Number(formatUnits(maxTotalAssets, decimals)) * latestAnswerFormatted; return ( {
+
+
Supply Cap
+
+ +
+
Current Yield
From 28cb1e0227461ef345e2a5d1cc44c520ff93844c Mon Sep 17 00:00:00 2001 From: "K.K." Date: Mon, 1 Sep 2025 13:30:22 +0100 Subject: [PATCH 4/6] feat: edgecase for extra-large numbers --- src/components/NumberDisplay/NumberDisplay.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/NumberDisplay/NumberDisplay.tsx b/src/components/NumberDisplay/NumberDisplay.tsx index bfabee9..dba0809 100644 --- a/src/components/NumberDisplay/NumberDisplay.tsx +++ b/src/components/NumberDisplay/NumberDisplay.tsx @@ -25,6 +25,11 @@ export const NumberDisplay = ({ prefix = customPrefix ? `${customPrefix}<` : "<"; } + if (value > 1e15) { + displayValue = 1e15; + prefix = customPrefix ? `${customPrefix}>` : ">"; + } + return ( 1e15) { + displayValue = 1e15; + prefix = customPrefix ? `${customPrefix}>` : ">"; + } + return ( Date: Mon, 1 Sep 2025 16:10:34 +0100 Subject: [PATCH 5/6] feat: support immediate withdrawals --- src/app/components/UmbrellaTable/Actions.tsx | 2 +- src/app/withdraw/[address]/page.tsx | 2 +- .../useAllUmbrellaCooldowns/useUmbrellaCooldownStatus.ts | 9 ++++++++- src/types/cooldown.ts | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/app/components/UmbrellaTable/Actions.tsx b/src/app/components/UmbrellaTable/Actions.tsx index d048d66..4a4586e 100644 --- a/src/app/components/UmbrellaTable/Actions.tsx +++ b/src/app/components/UmbrellaTable/Actions.tsx @@ -74,7 +74,7 @@ export const Actions = ({ token }: ActionsProps) => { return (
- {status === "withdraw" && ( + {(status === "withdraw" || status === "immediate-withdraw") && (