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: sort coins in ConvertWasmCoinsToSdkCoins #1117

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

apollo-sturdy
Copy link
Contributor

When sending e.g. BankMsg::Send from a contract, it appears that currently the coins in amount parameter need to be sorted. This is inconvenient as contracts need to add additional logic to sort coins before sending them. This PR simply sorts them instead in wasmd when converting them into SDK Coins.

@sonarcloud
Copy link

sonarcloud bot commented Dec 2, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov
Copy link

codecov bot commented Dec 2, 2022

Codecov Report

Merging #1117 (f7be3ba) into main (a589fe9) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1117      +/-   ##
==========================================
- Coverage   59.95%   59.92%   -0.03%     
==========================================
  Files          54       54              
  Lines        7406     7407       +1     
==========================================
- Hits         4440     4439       -1     
- Misses       2641     2642       +1     
- Partials      325      326       +1     
Impacted Files Coverage Δ
x/wasm/keeper/handler_plugin_encoders.go 80.97% <100.00%> (+0.08%) ⬆️
x/wasm/keeper/keeper.go 87.40% <0.00%> (-0.32%) ⬇️

Copy link
Contributor

@alpe alpe left a comment

Choose a reason for hiding this comment

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

Very useful. Thanks! 🥇

@alpe alpe merged commit ef12d4b into CosmWasm:main Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants