fix empty transaction list

pull/2/head
fuwa 5 years ago
parent 1ce8cd5884
commit 4298f701eb

@ -200,14 +200,19 @@ Future<List<dynamic>> getTransactionPoolSimple() async {
} else { } else {
final responseBody = json.decode(response.body); final responseBody = json.decode(response.body);
var result = responseBody['transactions']; var result = responseBody['transactions'];
result.forEach if (result == null) {
( return [];
(tx) { }
tx.remove('tx_blob'); else {
tx.remove('tx_json'); result.forEach
tx.remove('last_failed_id_hash'); (
} (tx) {
); tx.remove('tx_blob');
return result; tx.remove('tx_json');
tx.remove('last_failed_id_hash');
}
);
return result;
}
} }
} }