nanmu42 / etherscan-api

:guitar: Golang client for Ethereum Etherscan API (and its families like BscScan) / Golang 以太坊 Etherscan API库(也支持同一家族的BscScan)
MIT License
240 stars 107 forks source link

Workaround for missing tokenDecimal for tokentx calls #12

Closed nanmu42 closed 6 years ago

nanmu42 commented 6 years ago

This PR resolves #8 .

Some ERC20 contract does not have valid decimals information in Etherscan. When that happens, TokenName, TokenSymbol are empty strings, and TokenDecimal will be 0, instead of a unmarshaling error.

More information can be found at: #8

codecov[bot] commented 6 years ago

Codecov Report

Merging #12 into master will increase coverage by 0.4%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #12     +/-   ##
=========================================
+ Coverage   78.32%   78.73%   +0.4%     
=========================================
  Files          10       10             
  Lines         263      268      +5     
=========================================
+ Hits          206      211      +5     
  Misses         34       34             
  Partials       23       23
Impacted Files Coverage Δ
account.go 91.78% <ø> (ø) :arrow_up:
client.go 54.43% <100%> (+3.07%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5adb18a...8f0b304. Read the comment docs.