go-bitsong icon indicating copy to clipboard operation
go-bitsong copied to clipboard

Uniform implementations

Open giorgionocera opened this issue 3 years ago • 3 comments

In the nft module, it happens that sometimes we have (as is normal) part of a similar code. For example, it happens for the GetAllCollections method https://github.com/bitsongofficial/go-bitsong/blob/84691c819214a1f9b9dd844ea2b49b7ccc8ece1b/x/nft/keeper/collection.go#L42-L55 and the GetAllLastMetadataIds method https://github.com/bitsongofficial/go-bitsong/blob/84691c819214a1f9b9dd844ea2b49b7ccc8ece1b/x/nft/keeper/metadata.go#L9-L22

Even if they share a big part of the code they present some differences in the implementation. This is a very low-priority issue, but it could be useful to uniform the implementations.

giorgionocera avatar Sep 30 '22 17:09 giorgionocera

Okay

ryusmo avatar Sep 30 '22 17:09 ryusmo

Similarly, we could refactor a bit for GetLastMetadataId method.

giorgionocera avatar Sep 30 '22 18:09 giorgionocera

The same could be done between GetAllMetadata WRT GetAllCollections.

giorgionocera avatar Sep 30 '22 18:09 giorgionocera