Skip to content

sendrawtransaction doesn't return valid JSON #859

Description

@lukechilds

on success sendrawtransaction return the txid. But it's not formatted as JSON it's literally just the txid:

d4173e42eab51cee52af6f878567d5bbd97b394ec156a4ee62d4ef570b53f725

Which throws an error in our API wrapper library:

SyntaxError: Unexpected token d in JSON at position 0

It should be wrapped in double quotes to be parseable as JSON:

"d4173e42eab51cee52af6f878567d5bbd97b394ec156a4ee62d4ef570b53f725"

But would probably be better of formatted like the rest of the responses, something like this:

{
	success: true,
	txid: "d4173e42eab51cee52af6f878567d5bbd97b394ec156a4ee62d4ef570b53f725"
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions