@bloks/link-session-manager
Advanced tools
Comparing version 0.2.636 to 0.2.637
/** | ||
* proton-link-session-manager v0.2.636 | ||
* proton-link-session-manager v0.2.637 | ||
* https://github.com/greymass/proton-link-session-manager | ||
@@ -4,0 +4,0 @@ * |
/** | ||
* proton-link-session-manager v0.2.636 | ||
* proton-link-session-manager v0.2.637 | ||
* https://github.com/greymass/proton-link-session-manager | ||
@@ -191,3 +191,3 @@ * | ||
var _loop_1 = function (stdEvent) { | ||
this_1.realWs.addEventListener(stdEvent, function (event) { | ||
var onEvent = function (event) { | ||
_this.dispatchEvent(event); | ||
@@ -198,3 +198,4 @@ var cb = _this['on' + stdEvent]; | ||
} | ||
}); | ||
}; | ||
this_1.realWs.addEventListener(stdEvent, onEvent.bind(this_1)); | ||
}; | ||
@@ -257,3 +258,3 @@ var this_1 = this; | ||
if (!this.unsubscribeNetInfo && this.opts.netInfo && this.netInfoState) { | ||
this.unsubscribeNetInfo = this.opts.netInfo.addEventListener(function (state) { | ||
var onConnectivityChange = function (state) { | ||
if (!state) { | ||
@@ -278,3 +279,4 @@ return; | ||
_this.netInfoState = state; | ||
}); | ||
}; | ||
this.unsubscribeNetInfo = this.opts.netInfo.addEventListener(onConnectivityChange.bind(this)); | ||
} | ||
@@ -281,0 +283,0 @@ }; |
/** | ||
* proton-link-session-manager v0.2.636 | ||
* proton-link-session-manager v0.2.637 | ||
* https://github.com/greymass/proton-link-session-manager | ||
@@ -164,3 +164,3 @@ * | ||
for (const stdEvent of ['open', 'close', 'message', 'error', 'ping']) { | ||
this.realWs.addEventListener(stdEvent, (event) => { | ||
const onEvent = (event) => { | ||
this.dispatchEvent(event); | ||
@@ -171,3 +171,4 @@ const cb = this['on' + stdEvent]; | ||
} | ||
}); | ||
}; | ||
this.realWs.addEventListener(stdEvent, onEvent.bind(this)); | ||
} | ||
@@ -202,3 +203,3 @@ if (this.opts.netInfo) { | ||
if (!this.unsubscribeNetInfo && this.opts.netInfo && this.netInfoState) { | ||
this.unsubscribeNetInfo = this.opts.netInfo.addEventListener((state) => { | ||
const onConnectivityChange = (state) => { | ||
if (!state) { | ||
@@ -223,3 +224,4 @@ return; | ||
this.netInfoState = state; | ||
}); | ||
}; | ||
this.unsubscribeNetInfo = this.opts.netInfo.addEventListener(onConnectivityChange.bind(this)); | ||
} | ||
@@ -226,0 +228,0 @@ } |
{ | ||
"name": "@bloks/link-session-manager", | ||
"description": "Session management for signature providers when receiving requests using the Anchor Link protocol", | ||
"version": "0.2.636", | ||
"version": "0.2.637", | ||
"homepage": "https://github.com/greymass/proton-link-session-manager", | ||
@@ -6,0 +6,0 @@ "license": "BSD-3-Clause", |
@@ -119,3 +119,3 @@ import NetInfo, {NetInfoState, NetInfoSubscription} from '@react-native-community/netinfo' | ||
for (const stdEvent of ['open', 'close', 'message', 'error', 'ping']) { | ||
this.realWs.addEventListener(stdEvent, (event) => { | ||
const onEvent = (event) => { | ||
this.dispatchEvent(event) | ||
@@ -127,3 +127,4 @@ | ||
} | ||
}) | ||
} | ||
this.realWs.addEventListener(stdEvent, onEvent.bind(this)) | ||
} | ||
@@ -165,3 +166,3 @@ | ||
if (!this.unsubscribeNetInfo && this.opts.netInfo && this.netInfoState) { | ||
this.unsubscribeNetInfo = this.opts.netInfo.addEventListener((state) => { | ||
const onConnectivityChange = (state) => { | ||
if (!state) { | ||
@@ -190,3 +191,7 @@ return | ||
this.netInfoState = state | ||
}) | ||
} | ||
this.unsubscribeNetInfo = this.opts.netInfo.addEventListener( | ||
onConnectivityChange.bind(this) | ||
) | ||
} | ||
@@ -193,0 +198,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102996
1762