GetTransactionStatusResponse.fromJson constructor
Null safety
GetTransactionStatusResponse.fromJson(- Map<String, dynamic> json
)
Implementation
factory GetTransactionStatusResponse.fromJson(Map<String, dynamic> json) {
GetTransactionStatusResponse response = GetTransactionStatusResponse(json);
if (json['result'] != null) {
if (json['result']['results'] != null) {
response.results = List<TransactionStatusResult>.from(json['result']
['results']
.map((e) => TransactionStatusResult.fromJson(e)));
}
response.id = json['result']['id'];
response.status = json['result']['status'];
response.envelopeXdr = json['result']['envelopeXdr'];
response.resultXdr = json['result']['resultXdr'];
response.resultMetaXdr = json['result']['resultMetaXdr'];
if (json['result']['error'] != null) {
response.resultError =
TransactionStatusError.fromJson(json['result']['error']);
}
} else if (json['error'] != null) {
response.error = SorobanRpcErrorResponse.fromJson(json);
}
return response;
}