Skip to content

Commit

Permalink
Added details on spending tx when spending
Browse files Browse the repository at this point in the history
  • Loading branch information
Kexkey committed Mar 18, 2020
1 parent fdf65ba commit 9d4c703
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
11 changes: 10 additions & 1 deletion doc/API.v0.md
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,16 @@ Proxy response:
```json
{
"status": "accepted",
"hash": "af867c86000da76df7ddb1054b273ca9e034e8c89d049b5b2795f9f590f67648"
"hash": "af867c86000da76df7ddb1054b273ca9e034e8c89d049b5b2795f9f590f67648",
"details":
{
"firstseen": 1584568841,
"amount": 0.00233,
"size": 222,
"vsize": 141,
"replaceable": 0,
"fee": 0.00000141
}
}
```

Expand Down
2 changes: 2 additions & 0 deletions doc/openapi/v0/cyphernode-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,8 @@ paths:
type: "string"
hash:
$ref: '#/components/schemas/TypeHashString'
details:
type: "object"
'403':
$ref: '#/components/schemas/ApiResponseNotAllowed'
'405':
Expand Down
2 changes: 1 addition & 1 deletion proxy_docker/app/script/walletoperations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spend() {
trace_rc $?

data="{\"status\":\"accepted\""
data="${data},\"hash\":\"${txid}\"}"
data="${data},\"hash\":\"${txid}\",\"details\":{\"firstseen\":${tx_ts_firstseen},\"amount\":${amount},\"size\":${tx_size},\"vsize\":${tx_vsize},\"replaceable\":${tx_replaceable},\"fee\":${fees}}}"

# Delete the temp file containing the raw tx (see above)
rm spend-rawtx-${txid}.blob
Expand Down

0 comments on commit 9d4c703

Please sign in to comment.