From 686ed060c5d8f67d4675e9881b2d2ac61736fae3 Mon Sep 17 00:00:00 2001 From: soulBit Date: Tue, 18 Jul 2023 11:35:38 +0100 Subject: [PATCH] SOV-2777: new team vesting type (#2563) feat: add team vestings --- src/app/components/UserAssets/Vesting/types.ts | 1 + .../components/UserAssets/Vesting/useListOfUserVestings.ts | 7 ++++--- src/locales/en/translation.json | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/components/UserAssets/Vesting/types.ts b/src/app/components/UserAssets/Vesting/types.ts index 6e415b4a82..478923c4f0 100644 --- a/src/app/components/UserAssets/Vesting/types.ts +++ b/src/app/components/UserAssets/Vesting/types.ts @@ -20,6 +20,7 @@ export type VestGroup = | 'team' | 'reward' | 'fouryear' + | 'teamFouryear' | 'fish' | 'fishAirdrop'; diff --git a/src/app/components/UserAssets/Vesting/useListOfUserVestings.ts b/src/app/components/UserAssets/Vesting/useListOfUserVestings.ts index 3fec150538..f31ed06656 100644 --- a/src/app/components/UserAssets/Vesting/useListOfUserVestings.ts +++ b/src/app/components/UserAssets/Vesting/useListOfUserVestings.ts @@ -58,9 +58,10 @@ export function useListOfUserVestings(asset?: Asset) { address.map( async (item, index): Promise => { // 'type' can be 0 or 1, 0 - Team Vesting, 1 - Vesting, fish, fishAirdrop - // 'typeCreation' can be 1-4 representing Vesting Registry 1-4 + // 'typeCreation' can be 1-5 representing Vesting Registry 1-5 const label = { '0 1': 'team', + '0 5': 'teamFouryear', '1 1': 'genesis', '1 2': 'origin', '1 3': 'reward', @@ -74,14 +75,14 @@ export function useListOfUserVestings(asset?: Asset) { ? Asset.FISH : Asset.SOV; - const regystryType = + const registryType = typeCreation[index] === 'vestingRegistryFISH' ? 'FISH_staking' : 'staking'; return { asset: assetType, - staking: regystryType, + staking: registryType, type: label, typeCreation: typeCreation[index], vestingContract: address[index], diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 3abbf476ba..13e14cc463 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -865,6 +865,7 @@ "origin": "Origin SOV", "team": "Team SOV", "fouryear": "Four-Year Vested SOV", + "teamFouryear": "Team Vesting", "reward": "Reward SOV", "fish": "Origins FISH", "fishAirdrop": "Airdrop FISH"