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

Upgrade to use stellar/go@horizonclient-v8.0.0 #748

Merged
merged 8 commits into from
Nov 5, 2021
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
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ commands:

jobs:
# test performs all package tests from Kelp
test_1_13:
test_1_17:
docker:
- image: circleci/golang:1.13
- image: circleci/golang:1.17
- image: franzsee/ccxt-rest:v0.0.4
command: ["node", "/usr/local/bin/ccxt-rest"]
- image: circleci/postgres:12.1-alpine-ram
Expand All @@ -109,9 +109,9 @@ jobs:
- test_kelp

# test runs all the strategies as integration tests, one after the other so there's no interference
test_1_13__integration:
test_1_17__integration:
docker:
- image: circleci/golang:1.13
- image: circleci/golang:1.17
steps:
# limit to only the key strategies because of rate limit issues, remaining strategies: sell, pendulum
# don't list sell_twap strategy for now because it requires a db to be enabled in sample_trader.cfg
Expand All @@ -130,5 +130,5 @@ workflows:
version: 2
build-and-test:
jobs:
- test_1_13
- test_1_13__integration
- test_1_17
- test_1_17__integration
10 changes: 4 additions & 6 deletions api/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"fmt"
"math"

"github.com/stellar/go/build"
hProtocol "github.com/stellar/go/protocols/horizon"
"github.com/stellar/go/txnbuild"
"github.com/stellar/go/xdr"
"github.com/stellar/kelp/model"
"github.com/stellar/kelp/stellargohorizonclientv300/build"
)

// ExchangeAPIKey specifies API credentials for an exchange
Expand Down Expand Up @@ -253,8 +253,8 @@ func ConvertOperation2TM(ops []txnbuild.Operation) []build.TransactionMutator {
},
build.OfferID(mso.OfferID),
)
if mso.SourceAccount != nil {
mob.Mutate(build.SourceAccount{AddressOrSeed: mso.SourceAccount.GetAccountID()})
if mso.SourceAccount != "" {
mob.Mutate(build.SourceAccount{AddressOrSeed: mso.SourceAccount})
}
} else {
panic(fmt.Sprintf("could not convert txnbuild.Operation to build.TransactionMutator: %v\n", o))
Expand Down Expand Up @@ -303,9 +303,7 @@ func convertMOB2MSO(mob build.ManageOfferBuilder) *txnbuild.ManageSellOffer {
Price: fmt.Sprintf("%.7f", float64(mob.MO.Price.N)/float64(mob.MO.Price.D)),
}
if mob.O.SourceAccount != nil {
mso.SourceAccount = &txnbuild.SimpleAccount{
AccountID: mob.O.SourceAccount.Address(),
}
mso.SourceAccount = mob.O.SourceAccount.Address()
}

if mob.MO.Buying.Type == xdr.AssetTypeAssetTypeNative {
Expand Down
2 changes: 1 addition & 1 deletion api/strategy.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package api

import (
"github.com/stellar/go/build"
"github.com/stellar/kelp/stellargohorizonclientv300/build"
hProtocol "github.com/stellar/go/protocols/horizon"
"github.com/stellar/kelp/model"
)
Expand Down
22 changes: 7 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ module github.com/stellar/kelp
go 1.13

require (
cloud.google.com/go v0.84.0 // indirect
github.com/Beldur/kraken-go-api-client v0.0.0-20180126083054-8d8ccfe4cc60
github.com/BurntSushi/toml v0.3.1
github.com/PagerDuty/go-pagerduty v0.0.0-20180821050606-635c5ce27149
github.com/adshao/go-binance/v2 v2.3.0
github.com/akavel/rsrc v0.9.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
github.com/asticode/go-astilectron v0.8.1-0.20190411111508-8e68f812e8a2 // indirect
github.com/asticode/go-astilectron-bootstrap v0.0.0-20190816065004-25b857285999 // indirect
github.com/asticode/go-astilectron v0.8.1-0.20190411111508-8e68f812e8a2
github.com/asticode/go-astilectron-bootstrap v0.0.0-20190816065004-25b857285999
github.com/asticode/go-astilectron-bundler v0.0.0-20190426172205-155c2a10bbb1 // indirect
github.com/asticode/go-astilog v1.1.0
github.com/asticode/go-astitools v1.2.1-0.20190929114647-d157a994ecbd // indirect
Expand All @@ -31,6 +29,7 @@ require (
github.com/gorilla/websocket v1.4.3-0.20210424162022-e8629af678b7 // indirect
github.com/hashicorp/hcl v1.0.1-0.20200422214639-569ae818ccb3 // indirect
github.com/julienschmidt/httprouter v1.3.1-0.20200114094804-8c9f31f047a3 // indirect
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
github.com/kr/session v0.1.1-0.20191204081249-b3d751351733 // indirect
github.com/lechengfan/googleauth v0.1.1-0.20181105235754-7595ba02fbce
github.com/lib/pq v1.2.0
Expand All @@ -39,30 +38,23 @@ require (
github.com/mattn/go-isatty v0.0.13-0.20200128103942-cb30d6282491 // indirect
github.com/mitchellh/mapstructure v1.1.2
github.com/nikhilsaraf/go-tools v0.0.0-20190326212736-a26df67722de
github.com/onsi/ginkgo v1.7.0
github.com/onsi/gomega v1.4.3
github.com/openlyinc/pointy v1.1.2
github.com/pelletier/go-toml v1.9.0 // indirect
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4
github.com/pkg/errors v0.9.1
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rs/cors v1.6.0
github.com/sam-kamerer/go-plister v1.2.1-0.20200203020647-924bd04c389c // indirect
github.com/segmentio/go-loggly v0.5.1-0.20180728234623-7a70408c3650 // indirect
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd
github.com/sirupsen/logrus v1.4.1 // indirect
github.com/spf13/afero v1.2.3-0.20200421135842-c17d29330031 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v0.0.1
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.6.3-0.20200421151844-c42a305a4bd2 // indirect
github.com/stellar/go v0.0.0-20200428193902-20797e3e2f1a
github.com/stellar/go-xdr v0.0.0-20201028102745-f80a23dac78a // indirect
github.com/stretchr/objx v0.3.0 // indirect
github.com/stretchr/testify v1.6.1
github.com/stellar/go v0.0.0-20211007183021-ea18bbab9344
github.com/stretchr/testify v1.7.0
github.com/subosito/gotenv v1.2.1-0.20190917103637-de67a6614a4d // indirect
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
gopkg.in/ini.v1 v1.55.0 // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
)
Loading