-
Notifications
You must be signed in to change notification settings - Fork 138
Description
Is your feature request related to a problem? Please describe.
If I try to pay an invoice in sat using an asset, I currently have no idea how many assets will be sent, so I don't know if I want to make the payment or not.
Describe the solution you'd like
Add an RPC that will read an invoice and make an RFQ and see what the exchange rate is with the channel peer and let the user know how many assets that is equivalent to.
Actually there should be two RFQ queries that should be made. First we should query for the sats amount as if we are only paying our direct channel peer. Next, a second RFQ query should be made for the total amount to send, including routing fees to the final destination. We should then present the difference between the two as the routing fees that must be paid in the asset units. This way the user can see if they have a high or low exchange rate and also high or low routing fees.
Describe alternatives you've considered
Not any good alternatives.
Additional context
This also helps with troubleshooting in test networks, in addition to real world uses where a user wants to make sure they aren't getting ripped off with their exchange rate before sending. Also, if the asset is not very divisible and routing fees are low, do we have to round up the asset a considerable amount to pay routing fees? I have no idea right now because I can't see the exchange rate before sending.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status