tronprotocol / tronweb

Javascript API Library for interacting with the TRON Network
MIT License
413 stars 271 forks source link

check address by method isAddress return false #441

Closed tonamson closed 8 months ago

tonamson commented 10 months ago

I use TronWeb version 5.3.1, and I checked that the address validation method isAddress always returns false when I input any address.

start940315 commented 9 months ago

What address did you input? The function will return false when your address starts with 0x.

tonamson commented 9 months ago

What address did you input? The function will return false when your address starts with 0x.

TREwjaDa9xhXHqYdPjbQecUUYu7jPokeEP

i use this address

start940315 commented 9 months ago

As I have tested, the result returned is True. So maybe you need to check if your code went into error somewhere else.

tonamson commented 9 months ago

As I have tested, the result returned is True. So maybe you need to check if your code went into error somewhere else.

i use nuxt and import TronWeb version 5.3.1 can you checkit?

start940315 commented 9 months ago

Can you just post your code here? Remember to remove privateKey.

tonamson commented 5 months ago

I try in nuxt tronweb version is 5.3.2 image

And it return

image

Address: TREwjaDa9xhXHqYdPjbQecUUYu7jPokeEP

tonamson commented 5 months ago

I found solution

cp node_modules/tronweb/dist/TronWeb.js ./js/tronweb.js