spark-wallet
spark-wallet copied to clipboard
WebWallet: 'route' should be an array, not '["571512x1642x0"'
Trying to send along a specific route, and maybe I'm not doing it right, but the error code suggests that it's not processing array's correctly when it gets to the rpc.
What I'm sending:
sendpay ["571512x1642x0", "570234x1091x0", "553206x1828x1"] f2e05f77f25523843465a851e5e0199c98e3f52d4d89ec03fd6baf5448d1e7fd testing1432 1000 lnbc1pwtyeyypp57ts97alj253cgdr94pg7tcqenjvw8afdfky7cqladwh4gjx3ul7sdpc235hqurfdcsxx7trwfuhqarjyq58g6tswp5kutndv55jsaf3x56nyvffcqzpgxqyz5vqermynd32c4wp2p0u54v8nvxpy5rhchlv20eadf7vps29tep6ahkjg37hj4ge0vvkaf9ufpk7lakcjz0nwr8e307vwwxe49rszxvd9rqqp8khgg
What the RPC command looks like when copied as a curl command:
...
--data-binary '{"method":"sendpay","params":["[\"571512x1642x0\"",",","570234x1091x0",",","553206x1828x1","]","f2e05f77f25523843465a851e5e0199c98e3f52d4d89ec03fd6baf5448d1e7fd","testing1432","1000","lnbc1pwtyeyypp57ts97alj253cgdr94pg7tcqenjvw8afdfky7cqladwh4gjx3ul7sdpc235hqurfdcsxx7trwfuhqarjyq58g6tswp5kutndv55jsaf3x56nyvffcqzpgxqyz5vqermynd32c4wp2p0u54v8nvxpy5rhchlv20eadf7vps29tep6ahkjg37hj4ge0vvkaf9ufpk7lakcjz0nwr8e307vwwxe49rszxvd9rqqp8khgg"]}'
...
The error code I get in spark:
'route' should be an array, not '["571512x1642x0"'
I've tried with single quotes, breaking with \
with single and double quotes, and having it as one single string, with/without breaks/single/double quotes, but no luck. Is there a right way to do this?
The RPC command parser is a bit limited and does not currently allow passing complex arguments like arrays/objects. I'll look into improving it.