wrap typed data for record attributes #70

Merged
0xmuralik merged 9 commits from murali/record-attributes into main 2023-01-09 06:49:12 +00:00
Showing only changes of commit 9e91a70f31 - Show all commits

View File

@ -70,27 +70,27 @@ func WrapTxToTypedData(
return apitypes.TypedData{}, err return apitypes.TypedData{}, err
} }
// if msgTypes["TypePayloadRecord"] != nil { if msgTypes["TypePayloadRecord"] != nil {
// // return apitypes.TypedData{}, fmt.Errorf("Message in msgTypes:%v\n", msg) // return apitypes.TypedData{}, fmt.Errorf("Message in msgTypes:%v\n", msg)
// msgTypes["TypePayloadRecord"] = []apitypes.Type{ msgTypes["TypePayloadRecord"] = []apitypes.Type{
// {Name: "id", Type: "string"}, {Name: "id", Type: "string"},
// {Name: "bond_id", Type: "string"}, {Name: "bond_id", Type: "string"},
// {Name: "create_time", Type: "string"}, {Name: "create_time", Type: "string"},
// {Name: "expiry_time", Type: "string"}, {Name: "expiry_time", Type: "string"},
// {Name: "deleted", Type: "bool"}, {Name: "deleted", Type: "bool"},
// {Name: "attributes", Type: "TypePayloadRecordAttributes"}, {Name: "attributes", Type: "TypePayloadRecordAttributes"},
// } }
// } }
// if msgTypes["TypePayloadRecordAttributes"] != nil { if msgTypes["TypePayloadRecordAttributes"] != nil {
// msgTypes["TypePayloadRecordAttributes"] = []apitypes.Type{ msgTypes["TypePayloadRecordAttributes"] = []apitypes.Type{
// {Name: "url", Type: "string"}, {Name: "url", Type: "string"},
// {Name: "repo_registration_record_cid", Type: "string"}, {Name: "repo_registration_record_cid", Type: "string"},
// {Name: "build_artifact_cid", Type: "string"}, {Name: "build_artifact_cid", Type: "string"},
// {Name: "tls_cert_cid", Type: "string"}, {Name: "tls_cert_cid", Type: "string"},
// {Name: "type", Type: "string"}, {Name: "type", Type: "string"},
// } }
// delete(msgTypes, "TypePayloadRecordAttributesValue") delete(msgTypes, "TypePayloadRecordAttributesValue")
// } }
if feeDelegation != nil { if feeDelegation != nil {
feeInfo, ok := txData["fee"].(map[string]interface{}) feeInfo, ok := txData["fee"].(map[string]interface{})