lbry-desktop/ui/component/commentCreate
infinite-persistence 0e0e2359f2
CommentCreate: handle minimum tips
To avoid calling `setting.Get` excessively, we'll do the following:

(a) Call `setting.Get` once per encountered channel, and stash it.

(b) Before sending **each** comment **with a tip**, call `setting.Get` again to get the latest `min_tip`. Report any over- or under-paid values in the confirmation widget before user hits Send.

(c) For regular comments (no tips), just send as normal based on stashed data from `a`.
    - If `min_tip` was `0` but creator later changed to non-zero, Commentron would trigger an error anyway, and the app can get the latest `min_tip` amount to inform the user.
    - If `min_tip` was not `0` but creator later changed to `0`, the app would be incorrectly forcing the user to pay based on the old amount from `a`.  But when he hits `b`, he now knows he has overpaid, and can still cancel.
2021-08-09 20:57:36 +08:00
..
index.js Commentron: incorporate 'setting.Get' into 'doFetchCreatorSettings' 2021-08-09 20:57:23 +08:00
view.jsx CommentCreate: handle minimum tips 2021-08-09 20:57:36 +08:00