Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix isValidBtcAddress function #577

Merged
merged 1 commit into from
Jul 24, 2023
Merged

Commits on Jul 24, 2023

  1. Fix isValidBtcAddress function

    Pass correct value to the `validate` function from
    `bitcoin-address-validation` package. The `toBcoinNetwork` function from
    `tbtc-v2.ts` lib returns the network as string expected by the `bcoin`
    lib(meaning `main` or `testnet`). The `bitcoin-address-validation`
    package expects `mainnet` or `testnet` that match the enumerated
    `BitcoinNetwork` values from `tbtc-v2.ts` lib. Here we call `valuesOf`
    on the `BitcoinNetwork` enum to get the expected network as string by
    the `bitcoin-address-validation` package.
    r-czajkowski committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    86b6375 View commit details
    Browse the repository at this point in the history