From 961f0f737afc8c50735e2c19d32f389fbe4db20f Mon Sep 17 00:00:00 2001 From: 0xmuralik Date: Mon, 26 Dec 2022 10:59:36 +0530 Subject: [PATCH] patch setRecord in WrapTxToTypedData --- ethereum/eip712/eip712.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ethereum/eip712/eip712.go b/ethereum/eip712/eip712.go index c7f67384..f25b259c 100644 --- a/ethereum/eip712/eip712.go +++ b/ethereum/eip712/eip712.go @@ -70,6 +70,28 @@ func WrapTxToTypedData( return apitypes.TypedData{}, err } + // if msgTypes["TypePayloadRecord"] != nil { + // // return apitypes.TypedData{}, fmt.Errorf("Message in msgTypes:%v\n", msg) + // msgTypes["TypePayloadRecord"] = []apitypes.Type{ + // {Name: "id", Type: "string"}, + // {Name: "bond_id", Type: "string"}, + // {Name: "create_time", Type: "string"}, + // {Name: "expiry_time", Type: "string"}, + // {Name: "deleted", Type: "bool"}, + // {Name: "attributes", Type: "TypePayloadRecordAttributes"}, + // } + // } + // if msgTypes["TypePayloadRecordAttributes"] != nil { + // msgTypes["TypePayloadRecordAttributes"] = []apitypes.Type{ + // {Name: "url", Type: "string"}, + // {Name: "repo_registration_record_cid", Type: "string"}, + // {Name: "build_artifact_cid", Type: "string"}, + // {Name: "tls_cert_cid", Type: "string"}, + // {Name: "type", Type: "string"}, + // } + // delete(msgTypes, "TypePayloadRecordAttributesValue") + // } + if feeDelegation != nil { feeInfo, ok := txData["fee"].(map[string]interface{}) if !ok {