From cb98c0cb77c0eb7ab196846637762f4dba891e88 Mon Sep 17 00:00:00 2001 From: Matias Poblete <86752543+MattPoblete@users.noreply.github.com> Date: Tue, 19 Nov 2024 09:09:50 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9BFix=20amount=20handling=20in=20AddN?= =?UTF-8?q?ewStrategyButton=20and=20update=20initial=20deposit=20display?= =?UTF-8?q?=20in=20DeployVault?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/dapp/src/components/DeployVault/AddNewStrategyButton.tsx | 4 ++++ apps/dapp/src/components/DeployVault/DeployVault.tsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/dapp/src/components/DeployVault/AddNewStrategyButton.tsx b/apps/dapp/src/components/DeployVault/AddNewStrategyButton.tsx index feef64df..313f43ce 100644 --- a/apps/dapp/src/components/DeployVault/AddNewStrategyButton.tsx +++ b/apps/dapp/src/components/DeployVault/AddNewStrategyButton.tsx @@ -121,7 +121,11 @@ function AddNewStrategyButton() { symbol: selectedAsset.symbol } if (strategyExists(selectedAsset.strategies[0]!)) { + if (amountInput.enabled && amountInput.amount! > 0) { await dispatch(setAmountByAddress({ address: selectedAsset.address, amount: amountInput.amount })) + } else if (amountInput.enabled == false || amountInput.amount! == 0) { + await dispatch(setAmountByAddress({ address: selectedAsset.address, amount: 0 })) + } } await dispatch(pushAsset(newAsset)) if (amountInput.enabled && amountInput.amount! > 0) { diff --git a/apps/dapp/src/components/DeployVault/DeployVault.tsx b/apps/dapp/src/components/DeployVault/DeployVault.tsx index 987f13aa..7432b96d 100644 --- a/apps/dapp/src/components/DeployVault/DeployVault.tsx +++ b/apps/dapp/src/components/DeployVault/DeployVault.tsx @@ -103,7 +103,7 @@ export const DeployVault = () => { Strategy Address: {shortenAddress(strategy.address)} - {amounts[j] &&