javascript-sdk icon indicating copy to clipboard operation
javascript-sdk copied to clipboard

Invalid Address

Open Trignobit opened this issue 3 years ago • 0 comments

Hello everyone

I am facing an issue related to javascript_SDK on bnb-chain/javascript-SDK.

I used private key(d45278ad9968e47429c1844c4145788b767082fa36b8a7dc7a3201fa242393b5) to generated the testnet address and got the below address tbnb1uzn7fntldky6tfl86ayhra383xv7thrhaw8key and generated ERC20 address with 0x prefix: 0x962f4bdf209677c009c479d79808db6bf72f255f

It's a valid address according to https://testnet.bscscan.com/ and also working for coin transfer but when I tried to send a coin using testnet address with the javascript-sdk using the below code

bnbClient.chooseNetwork("testnet") bnbClient.setPrivateKey(privKey)

Then it showing error: which is "unable to query the address on the blockchain. try sending it some funds first: tbnb1uzn7fntldky6tfl86ayhra383xv7thrhaw8key".

Can any one help me to understand this? I am using java script sdk for the testnet.

Thanks

Trignobit avatar Aug 10 '22 15:08 Trignobit