Skip to content

Commit

Permalink
👷🏼‍♂️Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPoblete committed Nov 14, 2024
1 parent 406cd58 commit 677b6a0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion apps/dapp/src/components/DeployVault/DeployVault.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean>(false)
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/src/components/DeployVault/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<number | string>(share)
const setVal = (val: number) => {
const total = totalShares! - share + val
Expand Down
6 changes: 3 additions & 3 deletions apps/dapp/src/store/lib/features/vaultStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const initialState: NewVaultState = {
vaultShare: 0,
assets: [],
amounts: [],
totalValues: 0,
TVL: 0,
}

//Filtrar Strategies por network y retornar array de Strategies
Expand Down Expand Up @@ -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;
Expand All @@ -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
2 changes: 1 addition & 1 deletion apps/dapp/src/store/lib/features/walletStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const walletSlice = createSlice({
setVaultTVL: (state, action: PayloadAction<number>) => {
state.vaults.createdVaults.forEach(vault => {
if (vault.address === state.vaults.selectedVault?.address) {
vault.totalValues = action.payload
vault.TVL = action.payload
}
})
},
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/src/store/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface NewVaultState {
symbol: string;
assets: Asset[];
amounts: number[];
totalValues?: number;
TVL?: number;
}

export interface Strategy {
Expand Down

0 comments on commit 677b6a0

Please sign in to comment.