Skip to content

Commit

Permalink
fix: a malformed case statement elided recipient vpurse updates
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed May 7, 2021
1 parent 2d3f5fb commit 5f4664d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions golang/cosmos/x/vpurse/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package vpurse

import (
"encoding/json"
"fmt"

"github.com/gorilla/mux"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
Expand Down Expand Up @@ -144,10 +145,11 @@ func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.V
for _, attr := range event.Attributes {
// fmt.Println("have transfer attr", string(attr.GetKey()), string(attr.GetValue()))
switch string(attr.GetKey()) {
case "recipient":
case "sender":
case "recipient", "sender":
address := string(attr.GetValue())
ensureBalanceIsPresent(address)
if err := ensureBalanceIsPresent(address); err != nil {
fmt.Println("Cannot ensure vpurse balance for", address, err)
}
}
}
}
Expand Down

0 comments on commit 5f4664d

Please sign in to comment.