From 84a12e0c79508f13f1e051e0cf0f99338ce49481 Mon Sep 17 00:00:00 2001 From: Iaroslav Gryshaiev Date: Wed, 8 Jan 2025 13:53:01 +0100 Subject: [PATCH] fix(deployment): validate max deposit amount correctly closes #603 --- .dockerignore | 1 + .gitignore | 1 + .../src/components/deployments/DeploymentDepositModal.tsx | 2 +- package-lock.json | 4 ++-- packages/docker/.env.sandbox.docker-compose-dev | 3 +++ 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index 68d7baa79..3de15f360 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,6 +4,7 @@ **/.git **/.env.local +**/.env.local.* **/.env.test **/.env.*.local **/.env.*.test diff --git a/.gitignore b/.gitignore index fb6d78170..13eefbbe9 100644 --- a/.gitignore +++ b/.gitignore @@ -71,6 +71,7 @@ apps/provider-proxy/.env apps/stats-web/.env .env.*.local .env.local +.env.local.* .env.test # IDE files diff --git a/apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx b/apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx index b9418e9b1..66e9a6001 100644 --- a/apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx +++ b/apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx @@ -192,7 +192,7 @@ export const DeploymentDepositModal: React.FunctionComponent depositData?.balance) { + } else if (depositData && amount > depositData?.balance) { setError(`You can't deposit more than you currently have in your balance. Current balance is: ${depositData?.balance} ${depositData?.label}.`); return; } diff --git a/package-lock.json b/package-lock.json index df6a2ff00..fd22a59a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,7 @@ }, "apps/api": { "name": "@akashnetwork/console-api", - "version": "2.44.0", + "version": "2.44.4", "license": "Apache-2.0", "dependencies": { "@akashnetwork/akash-api": "^1.3.0", @@ -227,7 +227,7 @@ }, "apps/deploy-web": { "name": "@akashnetwork/console-web", - "version": "2.27.10", + "version": "2.28.1", "license": "Apache-2.0", "dependencies": { "@akashnetwork/akash-api": "^1.3.0", diff --git a/packages/docker/.env.sandbox.docker-compose-dev b/packages/docker/.env.sandbox.docker-compose-dev index dc22ab376..584e4ed1f 100644 --- a/packages/docker/.env.sandbox.docker-compose-dev +++ b/packages/docker/.env.sandbox.docker-compose-dev @@ -4,6 +4,9 @@ UserDatabaseCS=postgres://postgres:password@db:5432/console-users Network=sandbox POSTGRES_DB_URI: postgres://postgres:password@db:5432/console-users +# API +GITHUB_TOKEN=${GITHUB_TOKEN} + # Deploy Web API_BASE_URL: http://api:3000 BASE_API_MAINNET_URL: http://api:3000