File tree Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,21 @@ type MempoolResponse struct {
3838
3939// Applied - 
4040type  Applied  struct  {
41- 	Hash       string     `json:"hash"` 
42- 	Branch     string     `json:"branch"` 
43- 	Signature  string     `json:"signature"` 
44- 	Contents   []Content  `json:"contents"` 
41+ 	Hash       string              `json:"hash"` 
42+ 	Branch     string              `json:"branch"` 
43+ 	Signature  string              `json:"signature"` 
44+ 	Contents   []Content           `json:"contents"` 
45+ 	Raw        stdJSON.RawMessage  `json:"raw"` 
46+ }
47+ 
48+ // UnmarshalJSON - 
49+ func  (a  * Applied ) UnmarshalJSON (data  []byte ) error  {
50+ 	type  buf  Applied 
51+ 	if  err  :=  json .Unmarshal (data , (* buf )(a )); err  !=  nil  {
52+ 		return  err 
53+ 	}
54+ 	a .Raw  =  data 
55+ 	return  nil 
4556}
4657
4758// Failed - 
@@ -52,6 +63,7 @@ type Failed struct {
5263	Contents   []Content           `json:"contents"` 
5364	Signature  string              `json:"signature"` 
5465	Error      stdJSON.RawMessage  `json:"error,omitempty"` 
66+ 	Raw        stdJSON.RawMessage  `json:"raw"` 
5567}
5668
5769// UnmarshalJSON - 
@@ -67,7 +79,11 @@ func (f *Failed) UnmarshalJSON(data []byte) error {
6779		return  err 
6880	}
6981	type  buf  Failed 
70- 	return  json .Unmarshal (body [1 ], (* buf )(f ))
82+ 	if  err  :=  json .Unmarshal (body [1 ], (* buf )(f )); err  !=  nil  {
83+ 		return  err 
84+ 	}
85+ 	f .Raw  =  data 
86+ 	return  nil 
7187}
7288
7389// Contents - 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments