Skip to content

Commit

Permalink
make GetBalance return the sum of native & sgt balance
Browse files Browse the repository at this point in the history
  • Loading branch information
blockchaindevsh committed Dec 29, 2024
1 parent 45d1acb commit 67d6f52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,8 @@ func (api *BlockChainAPI) GetBalance(ctx context.Context, address common.Address
if state == nil || err != nil {
return nil, err
}
b := state.GetBalance(address).ToBig()
return (*hexutil.Big)(b), state.Error()
nativeBalance, sgtBalance := core.GetGasBalancesInBig(state, api.b.ChainConfig(), address)
return (*hexutil.Big)(new(big.Int).Add(nativeBalance, sgtBalance)), state.Error()
}

// AccountResult structs for GetProof
Expand Down

0 comments on commit 67d6f52

Please sign in to comment.