Skip to content

Commit

Permalink
add version to client
Browse files Browse the repository at this point in the history
  • Loading branch information
jgimeno committed Jan 13, 2021
1 parent d375113 commit a50b92e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 35 deletions.
3 changes: 1 addition & 2 deletions server/rosetta/client_offline.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ func (c *Client) OperationStatuses() []*types.OperationStatus {
}

func (c *Client) Version() string {
const version = "cosmos-sdk:v0.40.0-rc5/tendermint:0.34.0"
return version
return c.version
}

func (c *Client) SupportedOperations() []string {
Expand Down
10 changes: 8 additions & 2 deletions server/rosetta/client_online.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"strconv"
"time"

"github.com/cosmos/cosmos-sdk/version"

abcitypes "github.com/tendermint/tendermint/abci/types"

"github.com/tendermint/btcd/btcec"
Expand Down Expand Up @@ -50,6 +52,8 @@ type Client struct {
ir codectypes.InterfaceRegistry

clientCtx client.Context

version string
}

func (c *Client) AccountIdentifierFromPublicKey(pubKey *types.PublicKey) (*types.AccountIdentifier, error) {
Expand All @@ -74,9 +78,11 @@ func (c *Client) AccountIdentifierFromPublicKey(pubKey *types.PublicKey) (*types

// NewClient instantiates a new online servicer
func NewClient(cfg *Config) (*Client, error) {
info := version.NewInfo()
return &Client{
config: cfg,
ir: cfg.InterfaceRegistry,
config: cfg,
ir: cfg.InterfaceRegistry,
version: info.Version,
}, nil
}

Expand Down
31 changes: 0 additions & 31 deletions server/rosetta/main_test.go

This file was deleted.

0 comments on commit a50b92e

Please sign in to comment.