Skip to content

Commit

Permalink
fix get archive entity from indexer with 0x prefix
Browse files Browse the repository at this point in the history
Signed-off-by: p4u <[email protected]>
  • Loading branch information
p4u committed Nov 28, 2023
1 parent 48c1e06 commit e2a18b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (a *API) accountHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) er
// If the account does not exist in state, try to retrieve it from the indexer.
// This is a fallback for the case where the account is not in state but it is in the process archive.
if acc == nil {
indexerEntities := a.indexer.EntityList(1, 0, ctx.URLParam("address"))
indexerEntities := a.indexer.EntityList(1, 0, hex.EncodeToString(addr.Bytes()))
if len(indexerEntities) == 0 {
return ErrAccountNotFound.With(addr.Hex())
}
Expand Down

0 comments on commit e2a18b4

Please sign in to comment.