Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendrawtransaction doesn't return valid JSON #859

Open
lukechilds opened this issue May 21, 2018 · 4 comments
Open

sendrawtransaction doesn't return valid JSON #859

lukechilds opened this issue May 21, 2018 · 4 comments

Comments

@lukechilds
Copy link
Contributor

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"
}
@lukechilds
Copy link
Contributor Author

@jl777 we're trying to get a release out to the KMD community today, if there's any way you can get this fixed today that would be really helpful.

@jl777
Copy link
Owner

jl777 commented May 21, 2018

ok, i will do it right away, but you would need to add a "needjson":1 as it is the way it is for compatibility with how bitcoin does it. but if there is a needjson:1, I will wrap it in json like above

@jl777
Copy link
Owner

jl777 commented May 21, 2018

pushed needjson:1 support to dev branch

@lukechilds
Copy link
Contributor Author

Thanks!

DeckerSU pushed a commit to DeckerSU/SuperNET that referenced this issue Nov 5, 2022
…777#883)

* WIP.

* WIP.

* WIP.

* WIP and fix clippy.

* Refactor and fix clippy.

* WIP. Adding the UTXO fee to spend other payment to trade_preimage.

* WIP. Refactor tests.

* Finalize trade_preimage changes and refactor tests.

* Add paid_from_trading_vol to SavedTradeFee and refactor.

* Fix WASM tests compilation.

* Add separate TotalTradeFee struct for total_fees.

* Set QTUM/QRC20 mature_confirmations to 2000.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants