fix: save connection url as class variable

Summary:
Conform with Websocket javascript api.
related to web3js issues: https://github.com/ethereum/web3.js/issues/2864 https://github.com/ethereum/web3.js/issues/2602

Reviewed By: javache

Differential Revision: D25927475

Pulled By: TheSavior

fbshipit-source-id: 26b2df0565dac581d546b6824dd4f0fc2c8cdc32
This commit is contained in:
sirpy
2021-01-18 21:58:53 -08:00
committed by Facebook GitHub Bot
parent 65975dd28d
commit 8facc865ab
+1
View File
@@ -97,6 +97,7 @@ class WebSocket extends (EventTarget(...WEBSOCKET_EVENTS): any) {
options: ?{headers?: {origin?: string, ...}, ...},
) {
super();
this.url = url;
if (typeof protocols === 'string') {
protocols = [protocols];
}