fix empty transaction list

This commit is contained in:
fuwa
2019-07-23 18:32:53 +00:00
parent 1ce8cd5884
commit 4298f701eb
+14 -9
View File
@@ -200,14 +200,19 @@ Future<List<dynamic>> getTransactionPoolSimple() async {
} else {
final responseBody = json.decode(response.body);
var result = responseBody['transactions'];
result.forEach
(
(tx) {
tx.remove('tx_blob');
tx.remove('tx_json');
tx.remove('last_failed_id_hash');
}
);
return result;
if (result == null) {
return [];
}
else {
result.forEach
(
(tx) {
tx.remove('tx_blob');
tx.remove('tx_json');
tx.remove('last_failed_id_hash');
}
);
return result;
}
}
}