KomodoPlatform / komodo-defi-framework

This is the official Komodo DeFi Framework repository
https://komodoplatform.com/en/docs/komodo-defi-framework/
103 stars 94 forks source link

Set ERC20 token decimals upon coin enable to avoid repetitive decimals request. #80

Closed artemii235 closed 6 years ago

artemii235 commented 6 years ago

Decimals function is called every time whenever balance calculation is required, it results in many useless requests to Ethereum node.

artemii235 commented 6 years ago

https://github.com/artemii235/SuperNET/releases/tag/v1.0.268 - release is published, please test it.

lukechilds commented 6 years ago

I'm not sure how to test this but it doesn't die anymore after losing network connectivity so does that mean this is resolved?

artemii235 commented 6 years ago

Yes, it stores decimals ones and doesn't request it anymore. Also if you try to enable ERC20 without network connectivity and missing decimals in config you should get an error from API (without any crash), please check this case as well.

lukechilds commented 6 years ago

Yeah, it works, no crash 🎉

artemii235 commented 6 years ago

Thanks for testing, closing the issue.