grin: Send API route fails unexpectedly (issue_send_tx)
Calling the issue_send_tx endpoint with a valid body fails unexpectedly.
The url:
http://localhost:13420/v1/wallet/owner/issue_send_tx
The error:
Generic error: Invalid request body }
Sep 13 17:31:44.603 ERRO Request Error: Error { inner:
The rust controller expects:
api.issue_send_tx(
args.amount,
args.minimum_confirmations,
&args.dest,
args.max_outputs,
args.num_change_outputs,
args.selection_strategy_is_use_all,
)
the browser/client sends this in the body:
{
amount: 1,
minimum_confirmations: 0,
dest: 'http://127.0.0.1:13415',
max_outputs: 500,
selection_strategy_is_use_all: true,
num_change_outputs: 1
}
Notes:
I reproduced the error on both the client I’m working on, and the grin-web-wallet.
Thanks for your help on this.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (13 by maintainers)
Commits related to this issue
- Improve API errors Address ##1525 in particular and improve error messages in general. Instead of `Request Error: Error { inner:` a client would get: `Generic error: Invalid request body: missing fie... — committed to cyclefortytwo/grin by hashmap 6 years ago
- Improve API errors (#1543) Address ##1525 in particular and improve error messages in general. Instead of `Request Error: Error { inner:` a client would get: `Generic error: Invalid request body: m... — committed to mimblewimble/grin by hashmap 6 years ago
@gavinmcdermott I think you’re right and we should accept
OPTIONSrequests without requiring authentication. Let me see how we can fix that.@gavinmcdermott I started to take a look. However it does not seems to be a trivial change. I’ll give it another try this week.
I will be working on my wallet again this weekend. I’ll update you @gavinmcdermott if I run into the issue again and if I find a more permanent fix.