RPCModel.fromJson constructor
RPCModel.fromJson(
- Map<String, dynamic> json
)
Implementation
factory RPCModel.fromJson(Map<String, dynamic> json) {
return RPCModel(
id: json['id'],
jsonrpc: json['jsonrpc'],
userOperationResult: (json['result'].runtimeType != String)
? UserOperationResult.fromJson(json['result'])
: null,
userOperationHashResult: (json['result'].runtimeType != String)
? null
: UserOperationHashResult.fromJson(json['result']),
error: json['error'] != null ? RPCError.fromJson(json['error']) : null,
);
}