skycoin / teller

Skycoin exchange service
15 stars 30 forks source link

Added c2cx config code #227

Closed briancaine closed 6 years ago

briancaine commented 6 years ago

Addresses #224

gz-c commented 6 years ago

I see the build is failing due to

$ go get -t ./...
# github.com/skycoin/teller/src/exchange
src/exchange/passthrough.go:56:17: cannot use *c2cx.Client literal (type *c2cx.Client) as type "github.com/skycoin/teller/vendor/github.com/skycoin/exchange-api/exchange".Client in field value:
    *c2cx.Client does not implement "github.com/skycoin/teller/vendor/github.com/skycoin/exchange-api/exchange".Client (wrong type for Buy method)
        have Buy(string, "github.com/skycoin/exchange-api/vendor/github.com/shopspring/decimal".Decimal, "github.com/skycoin/exchange-api/vendor/github.com/shopspring/decimal".Decimal) (int, error)
        want Buy(string, "github.com/skycoin/teller/vendor/github.com/shopspring/decimal".Decimal, "github.com/skycoin/teller/vendor/github.com/shopspring/decimal".Decimal) (int, error)
src/exchange/passthrough.go:61:10: cannot use "github.com/skycoin/teller/vendor/github.com/skycoin/exchange-api/exchange".NewTracker() (type "github.com/skycoin/teller/vendor/github.com/skycoin/exchange-api/exchange".Orders) as type "github.com/skycoin/exchange-api/exchange".Orders in field value:
    "github.com/skycoin/teller/vendor/github.com/skycoin/exchange-api/exchange".Orders does not implement "github.com/skycoin/exchange-api/exchange".Orders (wrong type for GetOrderInfo method)
        have GetOrderInfo(int) ("github.com/skycoin/teller/vendor/github.com/skycoin/exchange-api/exchange".Order, error)
        want GetOrderInfo(int) ("github.com/skycoin/exchange-api/exchange".Order, error)

Not sure what the best solution is for this.

If vendor/github.com/skycoin/exchange-api/vendor exists, we can try removing it and see if that fixes it.

Otherwise we may need to remove the vendor/ from exchange-api. If we do this, we keep the Gopkg.toml file (and maybe the Gopkg.lock?) but don't commit the vendor/ folder. Then add README instructions for fetching dependencies. Have to check the dep docs for the best practices when not committing vendor/. vendor/ only matters when using the exchange-api cmd/ commands, which isn't important (nobody's using them) so we can require them to sync vendor/ themselves (even add it as part of the Makefile)

gz-c commented 6 years ago

Looks like it already prunes vendor, maybe its the way we run it in travis?

gz-c commented 6 years ago

232 is merged which removes go get -t ./...; it was unnecessary given vendoring (its purpose is to install all dependencies). rebase/merge develop and try again

briancaine commented 6 years ago

Merged and addressed the comment about time.Duration.