OpenBazaar / multiwallet

API based multi-cryptocurrency wallet
MIT License
75 stars 41 forks source link

Filter addresses returned that start with ltc1 #97

Closed cpacia closed 5 years ago

cpacia commented 5 years ago

Updates the litecoin get address functions to keep generating addresses until it gets one that does not start with ltc1. This is needed because the decode function interprets addresses starting with ltc1 as segwit addresses where these addresses are not.

I tried writing a test for this but to mock this scenario requires about 10 minutes of brute forcing to get an address which does start with ltc1. Probably too long to run every time.

cpacia commented 5 years ago

Good point. I can use a random xpriv and just do like 10 keys. We may eventually hit the test case if it runs enough.