nits
This commit is contained in:
parent
165c633575
commit
e1d4547c5b
2 changed files with 5 additions and 2 deletions
|
@ -39,7 +39,7 @@ func (h *BalanceStorageHelper) AccountBalance(
|
||||||
block *types.BlockIdentifier,
|
block *types.BlockIdentifier,
|
||||||
) (*types.Amount, error) {
|
) (*types.Amount, error) {
|
||||||
return &types.Amount{
|
return &types.Amount{
|
||||||
Value: "0",
|
Value: zeroValue,
|
||||||
Currency: currency,
|
Currency: currency,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,9 @@ const (
|
||||||
// this is the estimated memory overhead for each
|
// this is the estimated memory overhead for each
|
||||||
// block fetched by the indexer.
|
// block fetched by the indexer.
|
||||||
sizeMultiplier = 15
|
sizeMultiplier = 15
|
||||||
|
|
||||||
|
// zeroValue is 0 as a string
|
||||||
|
zeroValue = "0"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -804,7 +807,7 @@ func (i *Indexer) GetBalance(
|
||||||
)
|
)
|
||||||
if errors.Is(err, storage.ErrAccountMissing) {
|
if errors.Is(err, storage.ErrAccountMissing) {
|
||||||
return &types.Amount{
|
return &types.Amount{
|
||||||
Value: "0",
|
Value: zeroValue,
|
||||||
Currency: currency,
|
Currency: currency,
|
||||||
}, blockResponse.Block.BlockIdentifier, nil
|
}, blockResponse.Block.BlockIdentifier, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue