-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Value Criteria For Payment Method #1871
Add Value Criteria For Payment Method #1871
Conversation
dad6566
to
6cb7110
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only small nits from my end and glad to be getting rid of that extra method on the payment method handler implementations!
currencyPairsToFetch.Add(new CurrencyPair(network.CryptoCode, storeBlob.OnChainMinValue.Currency)); | ||
foreach (var paymentMethodCriteria in store.GetPaymentMethodCriteria(_NetworkProvider, storeBlob)) | ||
{ | ||
if (paymentMethodCriteria.Value != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to put in foreach with a .Where
LGTM, @pavlenex you can test? |
To me, this looks a bit odd way to solve this UX-wise. But I am not nacking it since I can't think of a different way to present this. Maybe @dstrukt has an idea on how this can be solved in a better way |
@pavlenex will take a look today |
Few clarifications, but will use the mocks for reference:
Option B might solve our problem at the moment, but thinking ahead, option A could address a few potential solutions as well, but might not be needed at this time.
Explicitly some of the sections need better descriptors, and even in this mock they could be pushed a bit more, but overall, this is an initiative I'd like to push across the entire product. Feedback, need for clarification, etc.. welcome as always! |
@Kukks and I chatted about the feature in MM. I had a few misunderstandings..made some changes. An idea proposed by Kukks that gives the user the ability to select greater/less than.. The wording for the label could use a second pair of eyes, but I think it's clear enough. Apologize for any delay in release. |
IMO ^ is a perfect solution and quite clear. Good idea @dstrukt and @Kukks. @xpayserver could you please make the change according to the proposal so that it's clearer on what's going on? |
2b6f7a8
to
a125ade
Compare
I upgrade lightning max/bitcoin min to support better control in store. Now can have setting only enable specific payment method only if value high/low I think make code simple more too and backward compatible
a125ade
to
e276443
Compare
tACK with a minor cosmetic change. Just to have everyone on board here's a PR preview with e276443 Looks great @xpayserver. I've tested it and here are a few minor notes (some of them may not be related to this PR, but perhaps are good to discuss them so we can improve stuff in the future). I just suggest we change Unrelated to this PR, but an interesting edge-case.
|
thinking merging that for next release.
This should not happen. It should say no payment method available. |
} | ||
if (amount > limitValueCrypto && !criteria.Above) | ||
{ | ||
logs.Write($"{logPrefix} invoice amount above accepted value for payment method", InvoiceEventData.EventSeverity.Error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not be errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the diff, this was an error before
@NicolasDorier Should I create a separate issue for this? |
no leave it here |
@pavlenex I think your "loops" came from your weird PC. Can you replicate again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok to me
} | ||
if (amount > limitValueCrypto && !criteria.Above) | ||
{ | ||
logs.Write($"{logPrefix} invoice amount above accepted value for payment method", InvoiceEventData.EventSeverity.Error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the diff, this was an error before
I upgrade lightning max/bitcoin min to support better control in store. Now can have setting only enable specific payment method only if value high/low I think make code simple more too and backward compatible with old feature