Closed ghost closed 4 years ago
SubmitTransaction returns embedded double quoted txid. The spec excludes the double quotes. https://github.com/bitcoin-sv-specs/brfc-merchantapi#returns-1
Sample response on successful POST /mapi/tx
{ "payload": "{\"apiVersion\":\"0.1.0\",\"timestamp\":\"2020-06-10T06:00:22.176Z\",\"txid\":\"\\\"3135d9b89f0295a26f726abac282111b8686f1fbd5093c9e40fe96c4cfe05faf\\\"\",\"returnResult\":\"success\",\"resultDescription\":\"\",\"minerId\":null,\"currentHighestBlockHash\":\"000000000000000002fc98b91a5adcbda91b37abf68ec2be4d1caddae2e621ab\",\"currentHighestBlockHeight\":638720,\"txSecondMempoolExpiry\":0}", "signature": null, "publicKey": null, "encoding": "UTF-8", "mimetype": "application/json" }
Notice the nested double quotes around the txid value
txid
txid contains a transaction id without the unnecessary double quotes.
\"txid\":\"3135d9b89f0295a26f726abac282111b8686f1fbd5093c9e40fe96c4cfe05faf\"
txid contains a transaction id with unnecessary double quotes.
\"txid\":\"\\\"3135d9b89f0295a26f726abac282111b8686f1fbd5093c9e40fe96c4cfe05faf\\\"\"
@jadwahab Can you please confirm if this is acceptable? Spec: https://github.com/bitcoin-sv-specs/brfc-merchantapi#returns-1
Thanks JeffChen, Unwriter and Libitx for reporting this issue.
Problem:
SubmitTransaction returns embedded double quoted txid. The spec excludes the double quotes. https://github.com/bitcoin-sv-specs/brfc-merchantapi#returns-1
Sample response on successful POST /mapi/tx
Notice the nested double quotes around the
txid
valueExpected result:
txid contains a transaction id without the unnecessary double quotes.
\"txid\":\"3135d9b89f0295a26f726abac282111b8686f1fbd5093c9e40fe96c4cfe05faf\"
Actual Result:
txid contains a transaction id with unnecessary double quotes.
\"txid\":\"\\\"3135d9b89f0295a26f726abac282111b8686f1fbd5093c9e40fe96c4cfe05faf\\\"\"