From 677b6a0a280e88fd281ce56a0ab00039ebe066a9 Mon Sep 17 00:00:00 2001 From: Matias Poblete <86752543+MattPoblete@users.noreply.github.com> Date: Thu, 14 Nov 2024 17:00:45 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=F0=9F=8F=BC=E2=80=8D=E2=99=82?= =?UTF-8?q?=EF=B8=8FFix=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/dapp/src/components/DeployVault/DeployVault.tsx | 1 - apps/dapp/src/components/DeployVault/Slider.tsx | 2 +- apps/dapp/src/store/lib/features/vaultStore.ts | 6 +++--- apps/dapp/src/store/lib/features/walletStore.ts | 2 +- apps/dapp/src/store/lib/types.ts | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/dapp/src/components/DeployVault/DeployVault.tsx b/apps/dapp/src/components/DeployVault/DeployVault.tsx index efdf0517..987f13aa 100644 --- a/apps/dapp/src/components/DeployVault/DeployVault.tsx +++ b/apps/dapp/src/components/DeployVault/DeployVault.tsx @@ -23,7 +23,6 @@ export const DeployVault = () => { //const strategies: Strategy[] = []//useAppSelector(state => state.newVault.strategies) const assets: Asset[] = useAppSelector(state => state.newVault.assets) const amounts: number[] = useAppSelector(state => state.newVault.amounts) - const totalValues = useAppSelector(state => state.newVault.totalValues) const vaultName = useAppSelector(state => state.newVault.name) const vaultSymbol = useAppSelector(state => state.newVault.symbol) const [openConfirm, setOpenConfirm] = useState(false) diff --git a/apps/dapp/src/components/DeployVault/Slider.tsx b/apps/dapp/src/components/DeployVault/Slider.tsx index f03c5b5b..f3866a28 100644 --- a/apps/dapp/src/components/DeployVault/Slider.tsx +++ b/apps/dapp/src/components/DeployVault/Slider.tsx @@ -22,7 +22,7 @@ function ItemSlider({ share: number, name?: string, }) { - const totalShares = useAppSelector(state => state.newVault.totalValues) + const totalShares = 100//useAppSelector(state => state.newVault.totalValues) const [inputValue, setInputValue] = React.useState(share) const setVal = (val: number) => { const total = totalShares! - share + val diff --git a/apps/dapp/src/store/lib/features/vaultStore.ts b/apps/dapp/src/store/lib/features/vaultStore.ts index bcdb2291..c09fb6f8 100644 --- a/apps/dapp/src/store/lib/features/vaultStore.ts +++ b/apps/dapp/src/store/lib/features/vaultStore.ts @@ -13,7 +13,7 @@ const initialState: NewVaultState = { vaultShare: 0, assets: [], amounts: [], - totalValues: 0, + TVL: 0, } //Filtrar Strategies por network y retornar array de Strategies @@ -94,7 +94,7 @@ export const newVaultSlice = createSlice({ state.emergencyManager = action.payload.emergencyManager; state.feeReceiver = action.payload.feeReceiver; state.assets = action.payload.assets; - state.totalValues = action.payload.totalValues; + state.TVL = action.payload.TVL; }), resetNewVault: ((state) => { state = initialState; @@ -120,6 +120,6 @@ export const { // Other code such as selectors can use the imported `RootState` type export const selectAsset = (state: RootState) => state.newVault.assets -export const selectTotalValues = (state: RootState) => state.newVault.totalValues +export const selectTotalValues = (state: RootState) => state.newVault.TVL export default newVaultSlice.reducer \ No newline at end of file diff --git a/apps/dapp/src/store/lib/features/walletStore.ts b/apps/dapp/src/store/lib/features/walletStore.ts index ef8e9a06..f03bd9be 100644 --- a/apps/dapp/src/store/lib/features/walletStore.ts +++ b/apps/dapp/src/store/lib/features/walletStore.ts @@ -91,7 +91,7 @@ export const walletSlice = createSlice({ setVaultTVL: (state, action: PayloadAction) => { state.vaults.createdVaults.forEach(vault => { if (vault.address === state.vaults.selectedVault?.address) { - vault.totalValues = action.payload + vault.TVL = action.payload } }) }, diff --git a/apps/dapp/src/store/lib/types.ts b/apps/dapp/src/store/lib/types.ts index f8fa8648..e6d9a5f9 100644 --- a/apps/dapp/src/store/lib/types.ts +++ b/apps/dapp/src/store/lib/types.ts @@ -16,7 +16,7 @@ export interface NewVaultState { symbol: string; assets: Asset[]; amounts: number[]; - totalValues?: number; + TVL?: number; } export interface Strategy {