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

protocols/horizon: Marshall int64 MaxFee and FeeCharged fields as JSON strings #2555

Merged
merged 1 commit into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions protocols/horizon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,23 +436,17 @@ type Transaction struct {
// When TransactionSuccess is removed from the SDKs we can remove this HAL link
Transaction hal.Link `json:"transaction"`
} `json:"_links"`
ID string `json:"id"`
PT string `json:"paging_token"`
Successful bool `json:"successful"`
Hash string `json:"hash"`
Ledger int32 `json:"ledger"`
LedgerCloseTime time.Time `json:"created_at"`
Account string `json:"source_account"`
AccountSequence string `json:"source_account_sequence"`
FeeAccount string `json:"fee_account"`
// Action needed in release: horizon-v1.3.0
// set json tag to `json:"fee_charged,string"` so max_fee can be marshalled
// as a string in the JSON response
FeeCharged int64 `json:"fee_charged"`
// Action needed in release: horizon-v1.3.0
// set json tag to `json:"max_fee,string"` so max_fee can be marshalled
// as a string in the JSON response
MaxFee int64 `json:"max_fee"`
ID string `json:"id"`
PT string `json:"paging_token"`
Successful bool `json:"successful"`
Hash string `json:"hash"`
Ledger int32 `json:"ledger"`
LedgerCloseTime time.Time `json:"created_at"`
Account string `json:"source_account"`
AccountSequence string `json:"source_account_sequence"`
FeeAccount string `json:"fee_account"`
FeeCharged int64 `json:"fee_charged,string"`
MaxFee int64 `json:"max_fee,string"`
OperationCount int32 `json:"operation_count"`
EnvelopeXdr string `json:"envelope_xdr"`
ResultXdr string `json:"result_xdr"`
Expand Down
3 changes: 2 additions & 1 deletion services/horizon/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
All notable changes to this project will be documented in this
file. This project adheres to [Semantic Versioning](http://semver.org/).

## unreleased
## v1.3.0

* Add `last_modified_time` to account responses. `last_modified_time` is the
closing time of the most recent ledger in which the account was modified.
* Fix a memory leak in the code responsible for streaming [#2548](https://github.com/stellar/go/pull/2548).
* Horizon encodes `fee_charged` and `max_fee` as strings when serializing transaction responses to JSON [#2555](https://github.com/stellar/go/pull/2555).

## v1.2.1

Expand Down