jatchili / minimalist-ripple-client

minimalist ripple client
https://jatchili.github.io/minimalist-ripple-client/
GNU General Public License v2.0
143 stars 54 forks source link

Use trust_line 'limit_peer' instead of 'limit' when finding paths #21

Open movitto opened 6 years ago

movitto commented 6 years ago

Greetings! Thanks for the awesome client, I've been using it for both production as development purposes. As I start playing around with non-XRP currencies I ran into what I think is a bug. Specifically while extending trust lines works 100%, attempting to send a non-XRP currency from an issuer to another account is currently failing and the 'find paths' steps. Specifically no paths are being found and I am unable to proceed with the transaction.

Investigating the code, I see on line #1273 of index.html you are checking and only proceeding if 'limit' != 0. I believe this should check if 'limit_peer' != 0 as that amount indicates the amount of trust the receiver grants to the issuer of the funds. When I change that check to 'limit_peer' the path finding succeeds and I am able to send funds from the issuer to the destination.

Thank you for your time.