Stub missing UnmarshalJSON methods
This commit is contained in:
		@@ -197,6 +197,13 @@ type NewTxArgs struct {
 | 
				
			|||||||
// 	Hash string
 | 
					// 	Hash string
 | 
				
			||||||
// }
 | 
					// }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (obj *NewTxArgs) UnmarshalJSON(b []byte) (err error) {
 | 
				
			||||||
 | 
						if err = json.Unmarshal(b, obj); err == nil {
 | 
				
			||||||
 | 
							return
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return NewErrorResponse(ErrorDecodeArgs)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (a *NewTxArgs) requirements() error {
 | 
					func (a *NewTxArgs) requirements() error {
 | 
				
			||||||
	if a.Recipient == "" {
 | 
						if a.Recipient == "" {
 | 
				
			||||||
		return NewErrorResponse("Transact requires a 'recipient' address as argument")
 | 
							return NewErrorResponse("Transact requires a 'recipient' address as argument")
 | 
				
			||||||
@@ -233,6 +240,15 @@ type PushTxArgs struct {
 | 
				
			|||||||
	Tx string `json:"tx"`
 | 
						Tx string `json:"tx"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (obj *PushTxArgs) UnmarshalJSON(b []byte) (err error) {
 | 
				
			||||||
 | 
						arg0 := ""
 | 
				
			||||||
 | 
						if err = json.Unmarshal(b, arg0); err == nil {
 | 
				
			||||||
 | 
							obj.Tx = arg0
 | 
				
			||||||
 | 
							return
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return NewErrorResponse(ErrorDecodeArgs)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (a *PushTxArgs) requirementsPushTx() error {
 | 
					func (a *PushTxArgs) requirementsPushTx() error {
 | 
				
			||||||
	if a.Tx == "" {
 | 
						if a.Tx == "" {
 | 
				
			||||||
		return NewErrorResponse("PushTx requires a 'tx' as argument")
 | 
							return NewErrorResponse("PushTx requires a 'tx' as argument")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user