Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: stop wrap twice the response of handling non-plus wasm message in plus handler #35

Merged
merged 5 commits into from
Apr 24, 2023

Conversation

loloicci
Copy link

@loloicci loloicci commented Apr 21, 2023

fixes the bug wrapping twice the response of handling non-plus wasm message in plus handler.

Description

wasmplus's handler returned a response that is wrapped twice (too much) when a non-plus wasm message is given.
This PR

  • stops wrapping the response too much.
  • adds tests handling non-plus wasm messages in wasmplus handler
  • improve how to branch the handling of message

closes: #33
closes: #34
closes: #32

How has this been tested?

Unit-tests are added in this PR.

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly. (not needed)
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml (not needed)

@loloicci loloicci added the bug Something isn't working label Apr 21, 2023
@loloicci loloicci self-assigned this Apr 21, 2023
@loloicci loloicci requested a review from zemyblue April 21, 2023 09:43
Copy link

@dudong2 dudong2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

x/wasmplus/handler.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #35 (9f508b9) into main (514953c) will decrease coverage by 0.01%.
The diff coverage is 77.77%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
- Coverage   60.83%   60.82%   -0.01%     
==========================================
  Files          80       80              
  Lines        9879     9877       -2     
==========================================
- Hits         6010     6008       -2     
  Misses       3553     3553              
  Partials      316      316              
Impacted Files Coverage Δ
app/ante.go 56.09% <ø> (ø)
app/app.go 88.01% <ø> (ø)
app/encoding.go 100.00% <ø> (ø)
app/export.go 12.30% <ø> (ø)
app/test_access.go 0.00% <ø> (ø)
app/test_helpers.go 0.64% <ø> (ø)
appplus/app.go 88.82% <ø> (ø)
appplus/encoding.go 100.00% <ø> (ø)
appplus/export.go 47.69% <ø> (ø)
appplus/genesis.go 100.00% <ø> (ø)
... and 68 more

@loloicci loloicci requested a review from zemyblue April 24, 2023 08:28
@loloicci loloicci merged commit c23a2db into Finschia:main Apr 24, 2023
@loloicci loloicci deleted the fix-plus-handler branch April 24, 2023 08:32
da1suk8 pushed a commit to da1suk8/wasmd that referenced this pull request Apr 24, 2023
loloicci added a commit that referenced this pull request Jun 14, 2023
…#53)

* build: replace line repositories with finschia repositories (#30)

* build: replace line repositories with finschia repositories

* Update x/wasmplus/README.md

Co-authored-by: zemyblue <zemyblue@gmail.com>

* Update x/wasm/ibc_reflect_test.go

Co-authored-by: zemyblue <zemyblue@gmail.com>

* Update .github/dependabot.yml

Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* docs: replace a comment contains line with finschia one

* build: replace line in Dockerfile with finschia

* docs: replace line in README.md with Finschia

* docs: update CHANGELOG

---------

Co-authored-by: zemyblue <zemyblue@gmail.com>
Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* chore: update changelog for release v0.1.3 (#31)

* fix: stop wrap twice the response of handling non-plus wasm message in plus handler (#35)

* fix: stop wrap twice non-plus wasm hander's response

fix #33

* test: add tests handling non-plus wasm messages

* docs: add this PR to CHANGELOG.md

* fix: reflect golangci-lint

* fix: simplify how to handle the message in wasmplus

* chore: update notice (#44)

* chore: update notice

* chore: update changelog

* fix: delete unnecessary test (#43)

* fix: delete unnecessary test

* docs: add CHANGELOG

* feat: add admin-related events (#46)

* add admin-related events in docs
* fix ClearAdmin event
* cherry-pick upstream admin-related events update

* chore: update changelog for release v0.1.4 (#49)

* build: update depending wasmvm to v1.1.1-0.11.2-dynamiclink2 and update tests

---------

Co-authored-by: zemyblue <zemyblue@gmail.com>
Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>
Co-authored-by: Daisuke Iuchi <42408108+da1suk8@users.noreply.github.com>
Co-authored-by: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
5 participants