Skip to content

Commit

Permalink
testing a fix from cosmos#6749
Browse files Browse the repository at this point in the history
  • Loading branch information
josephjaniga committed Oct 26, 2020
1 parent 7cd0cab commit 88981a8
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions x/auth/types/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package types

import (
"bytes"
"encoding/json"
"errors"
"fmt"
"strings"
Expand Down Expand Up @@ -259,32 +258,6 @@ func (ma ModuleAccount) MarshalYAML() (interface{}, error) {
return string(bs), nil
}

// MarshalJSON returns the JSON representation of a ModuleAccount.
func (ma ModuleAccount) MarshalJSON() ([]byte, error) {
return json.Marshal(moduleAccountPretty{
Address: ma.Address,
PubKey: "",
AccountNumber: ma.AccountNumber,
Sequence: ma.Sequence,
Name: ma.Name,
Permissions: ma.Permissions,
})
}

// UnmarshalJSON unmarshals raw JSON bytes into a ModuleAccount.
func (ma *ModuleAccount) UnmarshalJSON(bz []byte) error {
var alias moduleAccountPretty
if err := json.Unmarshal(bz, &alias); err != nil {
return err
}

ma.BaseAccount = NewBaseAccount(alias.Address, nil, alias.AccountNumber, alias.Sequence)
ma.Name = alias.Name
ma.Permissions = alias.Permissions

return nil
}

// AccountI is an interface used to store coins at a given address within state.
// It presumes a notion of sequence numbers for replay protection,
// a notion of account numbers for replay protection for previously pruned accounts,
Expand Down

0 comments on commit 88981a8

Please sign in to comment.