trustwallet / wallet-core

Cross-platform, cross-blockchain wallet library.
https://developer.trustwallet.com/wallet-core
Apache License 2.0
2.69k stars 1.52k forks source link

Not support BTC Taproot address or SegWit address? #3821

Open Sunshineyg00 opened 2 months ago

Sunshineyg00 commented 2 months ago

Describe the bug When using TWBitcoinAddressIsValidString to verify a correct BTC Taproot address or a SegWit address, the return result is NO, which should be right.

To Reproduce Steps to reproduce the behavior:

  1. use the latest version TrustWalletCore (4.0.40)
  2. try to verify a BTC Taproot address and a SegWit address: NSLog(@"--== btc: %d", TWBitcoinAddressIsValidString(TWStringCreateWithUTF8Bytes(@"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq".UTF8String))); NSLog(@"--== btc: %d", TWBitcoinAddressIsValidString(TWStringCreateWithUTF8Bytes(@"bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297".UTF8String)));
  3. the results are both "NO"

Expected behavior The results are both "YES" as these are valid addresses.

satoshiotomakan commented 2 months ago

Hi @Sunshineyg00, we're already working on this, thank you for noticing

Sunshineyg00 commented 2 months ago

Hi @Sunshineyg00, we're already working on this, thank you for noticing

Thank you for your reply and your tremendous effort!