Skip to content

Commit

Permalink
add error message for negative balance
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigohpalmeirim committed Sep 29, 2024
1 parent 8af2d08 commit ab09465
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/components/Bike.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
addErrorMessage('Não tem uma subscrição ativa');
return false;
}
if (($accountInfo?.balance ?? 0) < 0) {
addErrorMessage('Não é possível desbloquear bicicletas se o seu saldo for negativo');
return false;
}
if ($appSettings.distanceLock) {
if ($currentPos == null) {
addErrorMessage('Não foi possível determinar a sua posição');
Expand Down

0 comments on commit ab09465

Please sign in to comment.