mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 04:27:56 +00:00
fix: only init WalletConnect when a saved session exists
This commit is contained in:
@@ -325,8 +325,9 @@ export const PezkuwiProvider: React.FC<PezkuwiProviderProps> = ({
|
||||
}
|
||||
}
|
||||
|
||||
// Try to restore WalletConnect session first
|
||||
try {
|
||||
// Try to restore WalletConnect session only if one was previously saved
|
||||
const savedWcTopic = localStorage.getItem('wc_session_topic');
|
||||
if (savedWcTopic) try {
|
||||
const wcSession = await restoreSession();
|
||||
if (wcSession) {
|
||||
const wcAddresses = getSessionAccounts();
|
||||
|
||||
Reference in New Issue
Block a user