hackerspace-bootstrap / strichliste

DEPRECATED - strichliste is a tool to replace a tally sheet inside a hackerspace, this module is the api for the strichliste
MIT License
17 stars 12 forks source link

GET /settings should also return transaction boundaries #275

Closed NicoHood closed 6 years ago

NicoHood commented 6 years ago

Currently you can only try to add value to an account, but you do not know if you are allowed to use a transaction limit. For example if the limit is 50 but you want to add 100 you cannot check this before with the API. The frontend then will have problems to detect collisions for possible custom payments.

Especially when implementing money transfer without changing this backend makes it nearly impossible without setting those boundaries to a maximum value. If you want to transfer money from A to B you have to add money to B and remove money from A. If a cannot remove all that money because of the boundary limit, the transaction will fail. You can also not revert, as B is also not allowed to remove such a high value. You will end in blindly guessing the limits and reminging the money on a per dollar/euro basis, which is really dumb.

So the setting API must also report those limits or they should get removed completely. As a general advice it would be best to have a transfer API directly in strichliste backend.

schinken commented 6 years ago

Strichliste 2 does that :)