Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnya97 committed Jul 9, 2018
1 parent 50ed0fa commit 7ac220b
Show file tree
Hide file tree
Showing 106 changed files with 979 additions and 833 deletions.
2 changes: 1 addition & 1 deletion baseapp/baseapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ type msgCounter2 struct {
// Implements Msg
func (msg msgCounter2) Type() string { return typeMsgCounter2 }
func (msg msgCounter2) GetSignBytes() []byte { return nil }
func (msg msgCounter2) GetSigners() []sdk.Address { return nil }
func (msg msgCounter2) GetSigners() []sdk.AccAddress { return nil }
func (msg msgCounter2) ValidateBasic() sdk.Error {
if msg.Counter >= 0 {
return nil
Expand Down
4 changes: 2 additions & 2 deletions client/context/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (ctx CoreContext) queryStore(key cmn.HexBytes, storeName, endPath string) (
}

// Get the from address from the name flag
func (ctx CoreContext) GetFromAddress() (from sdk.Address, err error) {
func (ctx CoreContext) GetFromAddress() (from sdk.AccAddress, err error) {

keybase, err := keys.GetKeyBase()
if err != nil {
Expand All @@ -126,7 +126,7 @@ func (ctx CoreContext) GetFromAddress() (from sdk.Address, err error) {
return nil, errors.Errorf("no key for: %s", name)
}

return sdk.Address(info.GetPubKey().Address()), nil
return sdk.AccAddress(info.GetPubKey().Address()), nil
}

// sign and build the transaction from the msg
Expand Down
6 changes: 3 additions & 3 deletions client/keys/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ type NewKeyBody struct {

// new key response REST body
type NewKeyResponse struct {
Address sdk.Address `json:"address"`
Mnemonic string `json:"mnemonic"`
Address sdk.AccAddress `json:"address"`
Mnemonic string `json:"mnemonic"`
}

// add new key REST handler
Expand Down Expand Up @@ -215,7 +215,7 @@ func AddNewKeyRequestHandler(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(err.Error()))
return
}
address := sdk.Address(info.GetPubKey().Address().Bytes())
address := sdk.AccAddress(info.GetPubKey().Address().Bytes())
bz, err := json.Marshal(NewKeyResponse{
Address: address,
Mnemonic: mnemonic,
Expand Down
12 changes: 6 additions & 6 deletions client/keys/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ func SetKeyBase(kb keys.Keybase) {

// used for outputting keys.Info over REST
type KeyOutput struct {
Name string `json:"name"`
Type string `json:"type"`
Address sdk.Address `json:"address"`
PubKey string `json:"pub_key"`
Seed string `json:"seed,omitempty"`
Name string `json:"name"`
Type string `json:"type"`
Address sdk.AccAddress `json:"address"`
PubKey string `json:"pub_key"`
Seed string `json:"seed,omitempty"`
}

// create a list of KeyOutput in bech32 format
Expand All @@ -70,7 +70,7 @@ func Bech32KeysOutput(infos []keys.Info) ([]KeyOutput, error) {

// create a KeyOutput in bech32 format
func Bech32KeyOutput(info keys.Info) (KeyOutput, error) {
account := sdk.Address(info.GetPubKey().Address().Bytes())
account := sdk.AccAddress(info.GetPubKey().Address().Bytes())
bechPubKey, err := sdk.Bech32ifyAccPub(info.GetPubKey())
if err != nil {
return KeyOutput{}, err
Expand Down
Loading

0 comments on commit 7ac220b

Please sign in to comment.