@manahippo/aptos-wallet-adapter
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -34,3 +34,3 @@ "use strict"; | ||
const [disconnecting, setDisconnecting] = (0, react_1.useState)(false); | ||
// const isConnecting = useRef(false); | ||
const isConnecting = (0, react_1.useRef)(false); | ||
const isDisconnecting = (0, react_1.useRef)(false); | ||
@@ -209,3 +209,3 @@ const isUnloading = (0, react_1.useRef)(false); | ||
} | ||
// isConnecting.current = true; | ||
isConnecting.current = true; | ||
setConnecting(true); | ||
@@ -229,3 +229,3 @@ try { | ||
setConnecting(false); | ||
// isConnecting.current = false; | ||
isConnecting.current = false; | ||
} | ||
@@ -235,3 +235,4 @@ }), [connected, adapter, handleError, wallets, setName, wallet, account, network]); | ||
(0, react_1.useEffect)(() => { | ||
if (connected || | ||
if (isConnecting.current || | ||
connected || | ||
!autoConnect || | ||
@@ -243,3 +244,3 @@ !name || | ||
connect(name); | ||
}, [connected, autoConnect, name, connect, adapter, readyState]); | ||
}, [isConnecting, connected, autoConnect, name, connect, adapter, readyState]); | ||
// Disconnect the adapter from the wallet | ||
@@ -246,0 +247,0 @@ const disconnect = (0, react_1.useCallback)(() => __awaiter(void 0, void 0, void 0, function* () { |
{ | ||
"name": "@manahippo/aptos-wallet-adapter", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "typings": "dist/index.d.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
803219
14522