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