Skip to content

Commit 644e008

Browse files
mr-zwetsrkalis
authored andcommitted
added patch for ElectrumNetworkProvider
1 parent a03119d commit 644e008

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

packages/cashscript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"dependencies": {
4848
"@bitauth/libauth": "^3.1.0-next.2",
4949
"@cashscript/utils": "^0.11.2",
50-
"@electrum-cash/network": "^4.1.1",
50+
"@electrum-cash/network": "^4.1.3",
5151
"@mr-zwets/bchn-api-wrapper": "^1.0.1",
5252
"delay": "^6.0.0",
5353
"fast-deep-equal": "^3.1.3",

packages/cashscript/src/network/ElectrumNetworkProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class ElectrumNetworkProvider implements NetworkProvider {
3737
private instantiateElectrumClient(network: Network, options: Options): ElectrumClient<ElectrumClientEvents> {
3838
if ('electrum' in options) return options.electrum;
3939
const server = 'hostname' in options ? options.hostname : this.getServerForNetwork(network);
40-
return new ElectrumClient('CashScript Application', '1.4.1', server);
40+
return new ElectrumClient('CashScript Application', '1.4.1', server, { disableBrowserVisibilityHandling: true });
4141
}
4242

4343
// Get Electrum server based on network

website/docs/releases/release-notes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
title: Release Notes
33
---
44

5+
## v0.11.3
6+
7+
#### CashScript SDK
8+
- :bug: Fix bug with where `ElectrumNetworkProvider` would disconnect in browser on visibility change of the page
9+
510
## v0.11.2
611

712
#### CashScript SDK

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,10 +1063,10 @@
10631063
dependencies:
10641064
debug "^4.3.7"
10651065

1066-
"@electrum-cash/network@^4.1.1":
1067-
version "4.1.1"
1068-
resolved "https://registry.yarnpkg.com/@electrum-cash/network/-/network-4.1.1.tgz#1f9571c783f613ce960374b4bffb73c27b28c429"
1069-
integrity sha512-v5abF2qGRTnBoi9tcS/iz7j82D8HYsK9iY0NM5v8/Qu8SnlMGGNz8UDFl+YzRPFXb4SUL3K0uf3Oydy82DB3oA==
1066+
"@electrum-cash/network@^4.1.3":
1067+
version "4.1.3"
1068+
resolved "https://registry.yarnpkg.com/@electrum-cash/network/-/network-4.1.3.tgz#195a96e8bb34493c622223992da0649c753aafff"
1069+
integrity sha512-amMvdcEfHhquoUkhN7x/H04KPYfqd5LilOGcg6O1OdUks1Mcrcah8WfHICHW/qyZ3Rgoos9o7Wx8gKz8qcSNzg==
10701070
dependencies:
10711071
"@electrum-cash/debug-logs" "^1.0.0"
10721072
"@electrum-cash/web-socket" "^1.0.0"

0 commit comments

Comments
 (0)