Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
upgrade horizonclient to patched version to fix load offers issues (c…
Browse files Browse the repository at this point in the history
…loses #369) (#373)

* Revert "Upgrade horizonclient to v2 to fix horizon v1 API changes (closes #360) (#362)"

This reverts commit ba19842.

* 2 - update glide.yaml and glide.lock file to use v2.0 of stellar/go repo for the horizonclient dependency

* 3 - use forked version of stellar/go at nikhilsaraf/go branch "horizonclient-v2.0.0/1_export_offerBase"

* 4 - upgrade to second patched version of horizonclient (fee stats fix)
  • Loading branch information
nikhilsaraf authored Feb 16, 2020
1 parent f6d31c2 commit c0a4e3a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 17 deletions.
11 changes: 5 additions & 6 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import:
- package: github.com/spf13/pflag
version: v1.0.0
- package: github.com/stellar/go
version: release-horizonclient-v2.1.0
repo: [email protected]:nikhilsaraf/go.git
vcs: git
version: horizonclient-v2.0.0/2_max_fee_stats
subpackages:
- build
- clients/horizonclient
Expand Down
20 changes: 11 additions & 9 deletions plugins/batchedExchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,15 +341,17 @@ func (b BatchedExchange) OpenOrders2Offers(orders []model.OpenOrder, baseAsset h
lmt = &lastModTime
}
offers = append(offers, hProtocol.Offer{
ID: ID,
Seller: tradingAccount,
Selling: sellingAsset,
Buying: buyingAsset,
Amount: amount,
PriceR: price,
Price: priceString,
LastModifiedLedger: 0, // TODO fix?
LastModifiedTime: lmt,
ID: ID,
OfferBase: hProtocol.OfferBase{
Seller: tradingAccount,
Selling: sellingAsset,
Buying: buyingAsset,
Amount: amount,
PriceR: price,
Price: priceString,
LastModifiedLedger: 0, // TODO fix?
LastModifiedTime: lmt,
},
})
}
return offers, nil
Expand Down
2 changes: 1 addition & 1 deletion plugins/sdexExtensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func getFeeFromStats(horizonClient horizonclient.ClientInterface, capacityTrigge
return maxOpFeeStroops, nil
}

func getMaxFee(fs *hProtocol.FeeStats, percentile uint8) (int64, error) {
func getMaxFee(fs *hProtocol.FeeStats, percentile uint8) (int, error) {
switch percentile {
case 10:
return fs.MaxFee.P10, nil
Expand Down

0 comments on commit c0a4e3a

Please sign in to comment.