Skip to content

Commit

Permalink
bugfix: Fixed the from and contract mixed address marshalling for Get…
Browse files Browse the repository at this point in the history
…TransactionReceipt
  • Loading branch information
gameofpointers committed Sep 30, 2024
1 parent 65f2ff3 commit bd5938d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/quaiapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, ha
"blockNumber": hexutil.Uint64(blockNumber),
"transactionHash": hash,
"transactionIndex": hexutil.Uint64(index),
"from": from.MixedcaseAddress(),
"from": from.Hex(),
"to": tx.To().MixedcaseAddress(),
"gasUsed": hexutil.Uint64(receipt.GasUsed),
"cumulativeGasUsed": hexutil.Uint64(receipt.CumulativeGasUsed),
Expand Down Expand Up @@ -1481,7 +1481,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, ha
}
// If the ContractAddress is 20 0x0 bytes, assume it is not a contract creation
if !receipt.ContractAddress.Equal(common.Zero) && !receipt.ContractAddress.Equal(common.Address{}) {
fields["contractAddress"] = receipt.ContractAddress.MixedcaseAddress()
fields["contractAddress"] = receipt.ContractAddress.Hex()
}
return fields, nil
}
Expand Down

0 comments on commit bd5938d

Please sign in to comment.