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

Most upvoted comments

@gavinmcdermott I think you’re right and we should accept OPTIONS requests 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.