Change header of notification in btp websocket
@@ -19,7 +19,7 @@ type BTPRequest struct {
}
type BTPNotification struct {
- Header common.HexBytes `json:"header"`
+ Header string `json:"header"`
Proof string `json:"proof,omitempty"`
}
@@ -98,7 +98,7 @@ loop:
btpBlock, proof, err := cs.GetBTPBlockHeaderAndProof(blk, br.NetworkId.Value, flag)
if err == nil {
- br.bn.Header = btpBlock.HeaderBytes()
+ br.bn.Header = base64.StdEncoding.EncodeToString(btpBlock.HeaderBytes())
if flag == module.FlagBTPBlockHeader|module.FlagBTPBlockProof {
br.bn.Proof = base64.StdEncoding.EncodeToString(proof)
}
