File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
lib/mm2/mm2_api/rpc/electrum Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1+ import 'package:web_dex/common/screen.dart' ;
12import 'package:web_dex/model/electrum.dart' ;
23
34class ElectrumReq {
@@ -22,6 +23,12 @@ class ElectrumReq {
2223 'method' : method,
2324 'coin' : coin,
2425 'servers' : servers.map ((server) => server.toJson ()).toList (),
26+ // limit the number of active connections to electrum servers to 1 to
27+ // reduce device load & request spamming. Use 3 connections on desktop
28+ // and 1 on mobile (web and native) using [isMobile] until a better
29+ // alternative is found
30+ // https://komodoplatform.com/en/docs/komodo-defi-framework/api/legacy/coin_activation/#electrum-method
31+ 'max_connected' : isMobile ? 1 : 3 ,
2532 'userpass' : userpass,
2633 'mm2' : mm2,
2734 'tx_history' : true ,
You can’t perform that action at this time.
0 commit comments