From fad3586d300740e5d8ee01d2cfaba8171c7a6088 Mon Sep 17 00:00:00 2001 From: fuwa Date: Wed, 27 Nov 2019 16:36:05 +0800 Subject: [PATCH] hide pruning_seed when there is none --- cyberwow/lib/controller/rpc/rpcView.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cyberwow/lib/controller/rpc/rpcView.dart b/cyberwow/lib/controller/rpc/rpcView.dart index ee5a778..b22a8c1 100644 --- a/cyberwow/lib/controller/rpc/rpcView.dart +++ b/cyberwow/lib/controller/rpc/rpcView.dart @@ -101,6 +101,12 @@ Map rpcPeerView(Map x) { for (var k in keys) k: _conn[k] }; - return _sortedConn; + + final _cleanupConn = x..removeWhere + ( + (k,v) => k == 'pruning_seed' && x[k] == 0 + ); + + return _cleanupConn; }