* Support pluginable rate providers
This PR allows plugins to provide custom rate providers, that can be contextual to a store. For example, if you use the upcoming fiat offramp plugin, or the Blink plugin, you'll probably want to configure the fetch the rates from them since they are determining the actual fiat rrate to you. However, they require API keys. This PR enables these scenarios, even much more advanced ones, but for example:
* Install fiat offramp plugin
* Configure it
* You can now use the fiat offramp rate provider (no additional config steps beyond selecting the rate source from the select, or maybe the plugin would automatically set it for you once configured)
* Apply suggestions from code review
* Simplify
* Do not use BackgroundFetcherRateProvider for contextual rate prov
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Prevent an NRE in LNURL
In addition to f05a7f9f14. Fixes#4904.
* Revert "Prevent an NRE in LNURL"
This reverts commit 0b241d61ab.
* Fix NRE
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Update price display
As proposed by @dstrukt in #4364.
* Update format
* Unify price display across the app
* Add DisplayFormatter
* Replace DisplayFormatCurrency method
* Use symbol currency format for invoice
* Unify currency formats on backend pages
* Revert recent changes
* Do not show exchange rate and fiat order amount for crypto denominations
* Fix test and add test cases
* Make LNURL enabled when only method
This fixes the scenario where LNURL for standard invoices are disabled, but the POS Print view only shows LNURL, so the QR code would always error out. The fix is to bypass the setting when lnurl is the only enabled payment method on the invoice
* Make sure not to affect other flows
* fix
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
* mark items to abstract
wip
wip
wip
wip
wip
wip
wip
cleanup
parse other types
compile and fix tests
fix bug
fix warnings
fix rebase error
reduce payment method handler passings
more cleanup
switch tests to Fast mode
fix obsolete warning
remove argument requirement
rebase fixes
remove overcomplicated code
better parsing
remove dependency on environement
remove async
* fixes and simplification
* simplify
* clean up even more
* replace nuglify dependency
* remove extra space
* Fix tests
* fix booboo
* missing setter
* change url resolver
* reduce payment method handlers
* wrap payment method handlers in a custom type
* fix tests
* make invoice controller UI selectlist population cleaner
* make store controller use payment handler dictionary
* fix ln flag
* fix store controller test
* remove null checks on payment handlers
* remove unused imports
* BitcoinSpecificBtcPayNetwork - abstract BTCPayNetwork
* some type fixes
* fix tests
* simplify fetching handler in invoice controller
* rename network base and bitcoin classes
* abstract serializer to network level
* fix serializer when network not provided
* fix serializer when network not provided
* fix serializer when network not provided
* Abstract more payment type specific logic to handlers
* fix merge issue
* small fixes
* make use of repository instead of direct context usage
* reduce redundant code
* sanity check
* test fixes
* BitcoinSpecificBtcPayNetwork - abstract BTCPayNetwork
* some type fixes
* fix tests
* simplify fetching handler in invoice controller
* rename network base and bitcoin classes
* abstract serializer to network level
* fix serializer when network not provided
* fix serializer when network not provided
* fix serializer when network not provided
* try fixes for isolating pull request