From e1cde71ff58246368eda0df6af83d5c43453f6b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Levente=20T=C3=B3th?= Date: Mon, 25 Sep 2023 13:43:07 +0200 Subject: [PATCH] refactor: remove 0x prefix from address --- .../redistribution/inclusionproof.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkg/storageincentives/redistribution/inclusionproof.go b/pkg/storageincentives/redistribution/inclusionproof.go index 8b4f50c219f..335302dd84d 100644 --- a/pkg/storageincentives/redistribution/inclusionproof.go +++ b/pkg/storageincentives/redistribution/inclusionproof.go @@ -10,7 +10,6 @@ import ( "encoding/binary" "encoding/hex" - "github.com/ethereum/go-ethereum/common" "github.com/ethersphere/bee/pkg/bmt" "github.com/ethersphere/bee/pkg/soc" "github.com/ethersphere/bee/pkg/storer" @@ -50,10 +49,10 @@ type PostageProof struct { // SOCProof structure must exactly match // corresponding structure (of the same name) in Redistribution.sol smart contract. type SOCProof struct { - Signer common.Address `json:"signer"` - Signature string `json:"signature"` - Identifier string `json:"identifier"` - ChunkAddr string `json:"chunkAddr"` + Signer string `json:"signer"` + Signature string `json:"signature"` + Identifier string `json:"identifier"` + ChunkAddr string `json:"chunkAddr"` } // Transforms arguments to ChunkInclusionProof object @@ -97,7 +96,7 @@ func makeSOCProof(sampleItem storer.SampleItem) ([]SOCProof, error) { } return []SOCProof{{ - Signer: common.Address(socCh.OwnerAddress()), + Signer: hex.EncodeToString(socCh.OwnerAddress()), Signature: hex.EncodeToString(socCh.Signature()), Identifier: hex.EncodeToString(socCh.ID()), ChunkAddr: hex.EncodeToString(socCh.WrappedChunk().Address().Bytes()),