Fix error message informing about missing Ethereum xpub support #314
This commit is contained in:
parent
f7bbffa4c9
commit
e4c6d23389
@ -682,6 +682,9 @@ func (s *PublicServer) explorerXpub(w http.ResponseWriter, r *http.Request) (tpl
|
||||
// do not allow txsOnPage and details to be changed by query params
|
||||
address, err := s.api.GetXpubAddress(xpub, page, txsOnPage, api.AccountDetailsTxHistoryLight, filter, gap)
|
||||
if err != nil {
|
||||
if err == api.ErrUnsupportedXpub {
|
||||
err = api.NewAPIError("XPUB functionality is not supported", true)
|
||||
}
|
||||
return errorTpl, nil, err
|
||||
}
|
||||
data := s.newTemplateData()
|
||||
@ -992,6 +995,9 @@ func (s *PublicServer) apiXpub(r *http.Request, apiVersion int) (interface{}, er
|
||||
if err == nil && apiVersion == apiV1 {
|
||||
return s.api.AddressToV1(address), nil
|
||||
}
|
||||
if err == api.ErrUnsupportedXpub {
|
||||
err = api.NewAPIError("XPUB functionality is not supported", true)
|
||||
}
|
||||
return address, err
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user