@reef-knot/web3-react 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConnectorLedger.d.ts","sourceRoot":"","sources":["../../src/hooks/useConnectorLedger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAIhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,KAAK,mBAAmB,GAAG;IACzB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,SAAS,EAAE,iBAAiB,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,UACtB,iBAAiB,KACvB,
|
|
1
|
+
{"version":3,"file":"useConnectorLedger.d.ts","sourceRoot":"","sources":["../../src/hooks/useConnectorLedger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAIhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,KAAK,mBAAmB,GAAG;IACzB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,SAAS,EAAE,iBAAiB,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,UACtB,iBAAiB,KACvB,mBAyBF,CAAC"}
|
|
@@ -17,6 +17,13 @@ var useConnectorLedger = args => {
|
|
|
17
17
|
var onConnect = args === null || args === void 0 ? void 0 : args.onConnect;
|
|
18
18
|
var connect = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
19
|
disconnect();
|
|
20
|
+
// Workaround for an issue when connection does not happen because of
|
|
21
|
+
// Warning: Suppressed stale connector activation [object Object]
|
|
22
|
+
// Reproducible on a stake widget, but not in the reef-knot demo app.
|
|
23
|
+
// This is web3-react related issue, see https://github.com/Uniswap/web3-react/issues/78
|
|
24
|
+
// In our case may happen because `disconnect()` on the upper line is not awaited.
|
|
25
|
+
// Leaving it like this, because web3-react will be removed soon and the code will be rewritten.
|
|
26
|
+
yield new Promise(resolve => setTimeout(resolve, 500));
|
|
20
27
|
yield activate(ledger, () => {}, true);
|
|
21
28
|
onConnect === null || onConnect === void 0 ? void 0 : onConnect();
|
|
22
29
|
}), [activate, disconnect, ledger, onConnect]);
|