Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

address validation of bech32 address fails #3

Closed
willyfromtheblock opened this issue Mar 21, 2021 · 5 comments
Closed

address validation of bech32 address fails #3

willyfromtheblock opened this issue Mar 21, 2021 · 5 comments

Comments

@willyfromtheblock
Copy link
Collaborator

willyfromtheblock commented Mar 21, 2021

message:"tpc1qeh9ylqyhfdvkw0kclk7mul6p245a7zsamwcnkx has no matching Script"
bech32 addresses will be marked as invalid in the UI since Address.validateAddress will return false

@saeveritt
Copy link

The issue is here,
https://github.com/haarts/bech32/blob/master/lib/src/segwit.dart#L101

It is the bech32 dependency being used.

@saeveritt
Copy link

hotfix:
https://github.com/saeveritt/bech32

I've verified that this hotfix works. It requires a change in dependencies for bitcoin_flutter. Currently pointing it to my own repository but would prefer we perhaps publish an updated package on pub.dev

Steps to test:

  • clear pub-cache and delete pubspec.lock
  • modify bech32 dependency to the following
  bech32: 
    git:
      url: https://github.com/saeveritt/bech32.git

@peerchemist
Copy link

Can we merge in this bech32 lib into the bitcoin_flutter and make it support all encoded networks?

@haarts
Copy link

haarts commented May 22, 2021

Or I could investigate and make the bech32 lib better. ;)

@willyfromtheblock
Copy link
Collaborator Author

https://blockbook.peercoin.net/tx/08e0f2ed4866a13fc072044f53403c198bb5ffc6c27960a25dd4e56c7769e34d

can confirm @saeveritt's hack works

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants