From 701348c96d52875c2fee5d0d526934923d6dd9e7 Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Mon, 17 Jun 2019 18:43:13 +0200 Subject: [PATCH] Remove hardcoded xpub length #203 --- api/xpub.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/xpub.go b/api/xpub.go index 1027f9b2..5d2014cc 100644 --- a/api/xpub.go +++ b/api/xpub.go @@ -13,7 +13,6 @@ import ( "github.com/juju/errors" ) -const xpubLen = 111 const defaultAddressesGap = 20 const maxAddressesGap = 10000 @@ -271,7 +270,7 @@ func evictXpubCacheItems() { } func (w *Worker) getXpubData(xpub string, page int, txsOnPage int, option AccountDetails, filter *AddressFilter, gap int) (*xpubData, uint32, error) { - if w.chainType != bchain.ChainBitcoinType || len(xpub) != xpubLen { + if w.chainType != bchain.ChainBitcoinType { return nil, 0, ErrUnsupportedXpub } var (