-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: initialize NetworksService in renderer process
Reduce about `1100 ~ 1200` `TIME_WAIT` connections to about `20 ~ 30`
- Loading branch information
1 parent
6558669
commit 73f1bf0
Showing
4 changed files
with
34 additions
and
14 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
packages/neuron-wallet/src/models/subjects/network-switch-subject.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { BehaviorSubject } from 'rxjs' | ||
import { NetworkWithID } from 'types/network' | ||
|
||
export default class NetworkSwitchSubject { | ||
static subject = new BehaviorSubject<undefined | NetworkWithID>(undefined) | ||
|
||
static getSubject() { | ||
return this.subject | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters