Finschia / finschia-sdk

A framework for building blockchains based Finschia Mainnet that is forked from cosmos-sdk
Apache License 2.0
63 stars 30 forks source link

fix: reject NFT coins on FT APIs #1294

Closed 0Tech closed 4 months ago

0Tech commented 4 months ago

Description

This patch renames validateCoins() into validateFTCoins() and update its logic to reject valid NFT coins.

Motivation and context

validateCoins() are only used on FT APIs, but does not reject NFT coins. This patch addresses the problem.

Checklist:

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.42%. Comparing base (e86b980) to head (2aacdd0).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1294/graphs/tree.svg?width=650&height=150&src=pr&token=m16qfzIPO7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia)](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1294?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) ```diff @@ Coverage Diff @@ ## main #1294 +/- ## ======================================= Coverage 70.42% 70.42% ======================================= Files 643 643 Lines 54702 54702 ======================================= Hits 38526 38526 Misses 14006 14006 Partials 2170 2170 ``` | [Files](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1294?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) | Coverage Δ | | |---|---|---| | [x/collection/msgs.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1294?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9jb2xsZWN0aW9uL21zZ3MuZ28=) | `98.31% <100.00%> (ø)` | |