ergoplatform / ergo-appkit

Appkit: A Library for Java/Scala/Kotlin Development of Ergo Applications
MIT License
38 stars 27 forks source link

BoxOperations: property to restrict the amount of input boxes #193

Closed MrStahlfelge closed 2 years ago

MrStahlfelge commented 2 years ago

Recently several miners with small payout boxes expressed problems in the support channels sending ERG caused by too many input boxes.

This expresses in the typical error indications:

Too avoid all of these errors caused by too many needed input boxes, and to give a helpful error message to the users with a hint how many ERG and/or tokens can be sent with a certain set input boxes restriction, this adds an optional input box selection restriction to BoxOperations. When the amount of selected (not loaded) input boxes is exceeded, an exception is thrown that can be used to give the user helpful hints.

If the restriction is not set, the behaviour does not change.