Skip to content

Commit

Permalink
fix: event receive attributes (#809)
Browse files Browse the repository at this point in the history
* fix: EventReceive for Msg/CreateBatch

* cleanup Makefile

* bump golangci-lint action

(cherry picked from commit 57ee993)

# Conflicts:
#	Makefile
  • Loading branch information
robert-zaremba authored and mergify-bot committed Feb 25, 2022
1 parent 0dddffd commit 67728b2
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 18 deletions.
46 changes: 30 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,24 +123,24 @@ build-regen-all: go.sum
$(if $(shell docker inspect -f '{{ .Id }}' tendermint/xrnnode 2>/dev/null),$(info found image tendermint/xrnnode),docker pull tendermint/xrnnode:latest)
docker rm latest-build || true
docker run --volume=$(CURDIR):/sources:ro \
--env TARGET_OS='darwin linux windows' \
--env APP=regen \
--env VERSION=$(VERSION) \
--env COMMIT=$(COMMIT) \
--env LEDGER_ENABLED=$(LEDGER_ENABLED) \
--name latest-build tendermint/xrnnode:latest
--env TARGET_OS='darwin linux windows' \
--env APP=regen \
--env VERSION=$(VERSION) \
--env COMMIT=$(COMMIT) \
--env LEDGER_ENABLED=$(LEDGER_ENABLED) \
--name latest-build tendermint/xrnnode:latest
docker cp -a latest-build:/home/builder/artifacts/ $(CURDIR)/

build-regen-linux: go.sum $(BUILDDIR)/
$(if $(shell docker inspect -f '{{ .Id }}' tendermint/xrnnode 2>/dev/null),$(info found image tendermint/xrnnode),docker pull tendermint/xrnnode:latest)
docker rm latest-build || true
docker run --volume=$(CURDIR):/sources:ro \
--env TARGET_OS='linux' \
--env APP=regen \
--env VERSION=$(VERSION) \
--env COMMIT=$(COMMIT) \
--env LEDGER_ENABLED=false \
--name latest-build tendermint/xrnnode:latest
--env TARGET_OS='linux' \
--env APP=regen \
--env VERSION=$(VERSION) \
--env COMMIT=$(COMMIT) \
--env LEDGER_ENABLED=false \
--name latest-build tendermint/xrnnode:latest
docker cp -a latest-build:/home/builder/artifacts/ $(CURDIR)/
cp artifacts/regen-*-linux-amd64 $(BUILDDIR)/regen

Expand All @@ -164,9 +164,9 @@ $(MOCKS_DIR):
distclean: clean tools-clean
clean:
rm -rf \
$(BUILDDIR)/ \
artifacts/ \
tmp-swagger-gen/
$(BUILDDIR)/ \
artifacts/ \
tmp-swagger-gen/

.PHONY: distclean clean

Expand All @@ -179,6 +179,9 @@ go.sum: go.mod
go mod verify
go mod tidy

tidy:
./scripts/go-mod-tidy-all.sh

###############################################################################
### Documentation ###
###############################################################################
Expand All @@ -187,7 +190,7 @@ proto-swagger-gen:
@echo "Generating Protobuf Swagger"
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGenSwagger}$$"; then docker start -a $(containerProtoGenSwagger); else docker run --name $(containerProtoGenSwagger) -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \
sh ./scripts/protoc-swagger-gen.sh; fi

update-swagger-docs: statik
$(BINDIR)/statik -src=client/docs/swagger-ui -dest=client/docs -f -m
@if [ -n "$(git status --porcelain)" ]; then \
Expand Down Expand Up @@ -417,3 +420,14 @@ localnet-stop:


include sims.mk
<<<<<<< HEAD
=======

mocks:
mkdir -p x/ecocredit/server/basket/mocks
go install github.com/golang/mock/mockgen@latest
mockgen -source=x/ecocredit/server/basket/keeper.go -package mocks -destination x/ecocredit/server/basket/mocks/keeper.go
mockgen -source=x/ecocredit/expected_keepers.go -package mocks -destination x/ecocredit/mocks/expected_keepers.go
.PHONY: mocks

>>>>>>> 57ee993 (fix: event receive attributes (#809))
4 changes: 2 additions & 2 deletions x/ecocredit/server/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ func (s serverImpl) CreateBatch(goCtx context.Context, req *ecocredit.MsgCreateB
err = ctx.EventManager().EmitTypedEvent(&ecocredit.EventReceive{
Recipient: recipient,
BatchDenom: string(batchDenom),
RetiredAmount: tradable.String(),
TradableAmount: retired.String(),
RetiredAmount: retired.String(),
TradableAmount: tradable.String(),
})
if err != nil {
return nil, err
Expand Down

0 comments on commit 67728b2

Please sign in to comment.