wonism / coin-address-validator

MIT License
6 stars 5 forks source link

Litecoin testnet address not validating #2

Open fedetaladriz opened 2 years ago

fedetaladriz commented 2 years ago

Hello @wonism ! Thanks for this great package!

Because of my project, I've been testing the validator with several crypto addresses: BTC, ETH, USDC, LTC and BCH with networkType prod and tesnet.

The only one that i had problems with was LTC in the testnet. I tried validating correct LTC testnet address and the validator keeps returning false. Do u have any ideas why this is happening?

Example with this address:

coinAddressValidator.validate('Qh4heUtdB62TVjnBq5qitbCSuK7aSWqqyB', 'LTC', 'testnet'); // false
coinAddressValidator.validate('Qh4heUtdB62TVjnBq5qitbCSuK7aSWqqyB', 'LTC', 'both'); // false

Thanks!

wonism commented 2 years ago

Sorry for late. I will look into this as soon as possible.

wonism commented 2 years ago

@fedetaladriz , Is Qh4heUtdB62TVjnBq5qitbCSuK7aSWqqyB a really valid LTC address? I did validate it with other several ways. But every validator saids it is invalid. Would you check this again?

fedetaladriz commented 2 years ago

Hi @wonism 👋 Sorry for the delay! Well, I copied it from a testnet explorer, so I assume that is correct. I tried with addresses from another explorers and I had the same problem. Do you have example testnet LTC addresses that the validator works with (returns true)?