Skip to content

Commit

Permalink
fix: prefix the GetMailbox Has check
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed May 25, 2019
1 parent 6ef3ff9 commit ebd61e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/swingset/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ func NewKeeper(coinKeeper bank.Keeper, storeKey sdk.StoreKey, cdc *codec.Codec)
// Gets the entire mailbox struct for a peer
func (k Keeper) GetMailbox(ctx sdk.Context, peer string) Mailbox {
store := ctx.KVStore(k.storeKey)
if !store.Has([]byte(peer)) {
path := "data:mailbox." + peer
if !store.Has([]byte(path)) {
return NewMailbox()
}
path := "data:mailbox." + peer
bz := store.Get([]byte(path))
var mailbox Mailbox
k.cdc.MustUnmarshalBinaryBare(bz, &mailbox)
Expand Down

0 comments on commit ebd61e4

Please sign in to comment.