diff --git a/dac/pkg/collection_point.go b/dac/pkg/collection_point.go index e6fcb3e..14ac122 100644 --- a/dac/pkg/collection_point.go +++ b/dac/pkg/collection_point.go @@ -3,7 +3,6 @@ package dac import ( "bytes" "context" - "encoding/base64" "encoding/json" "fmt" "github.com/cerebellum-network/cere-ddc-sdk-go/core/pkg/crypto" @@ -25,7 +24,7 @@ type ( } Fulfillment struct { - SessionId []byte `json:"sessionId"` + SessionId string `json:"sessionId"` RequestId string `json:"requestId"` Cid string `json:"cid"` OpCode uint8 `json:"opCode"` @@ -81,7 +80,7 @@ func (d dacCollectionPoint) SaveFulfillment(fulfillment Fulfillment) error { } func SignFulfillment(fulfillment *Fulfillment, scheme crypto.Scheme) error { - signature, err := scheme.Sign([]byte(fulfillment.Cid + base64.StdEncoding.EncodeToString(fulfillment.SessionId) + fulfillment.RequestId + strconv.FormatUint(fulfillment.FulfilledTimestamp, 10))) + signature, err := scheme.Sign([]byte(fulfillment.Cid + fulfillment.SessionId + fulfillment.RequestId + strconv.FormatUint(fulfillment.FulfilledTimestamp, 10))) if err != nil { return err }