Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

fix(server/accounts): return 'insufficient_balance' if not enough balance#214

Merged
thelindat merged 2 commits intooverextended:mainfrom
RIOT1K:main
Nov 24, 2024
Merged

fix(server/accounts): return 'insufficient_balance' if not enough balance#214
thelindat merged 2 commits intooverextended:mainfrom
RIOT1K:main

Conversation

@RIOT1K
Copy link
Contributor

@RIOT1K RIOT1K commented Nov 15, 2024

Return no_balance instead of something_went_wrong in UpdateBalance when the account doesn’t have enough balance.

@Alexr03
Copy link
Contributor

Alexr03 commented Nov 16, 2024

May I suggest changing this to insufficient_balance to keep it similar with the DepositMoney error msg

if (amount > money) return { success: false, message: 'insufficient_funds' };

@RIOT1K
Copy link
Contributor Author

RIOT1K commented Nov 16, 2024

Good point. I just changed it to insufficient_balance.

@RIOT1K RIOT1K changed the title fix(server/accounts): return 'no_balance' if not enough balance fix(server/accounts): return 'insufficient_balance' if not enough balance Nov 16, 2024
@thelindat thelindat merged commit 18e8062 into overextended:main Nov 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants