mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-15 09:31:02 +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 to restore WalletConnect session only if one was previously saved
|
||||||
try {
|
const savedWcTopic = localStorage.getItem('wc_session_topic');
|
||||||
|
if (savedWcTopic) try {
|
||||||
const wcSession = await restoreSession();
|
const wcSession = await restoreSession();
|
||||||
if (wcSession) {
|
if (wcSession) {
|
||||||
const wcAddresses = getSessionAccounts();
|
const wcAddresses = getSessionAccounts();
|
||||||
|
|||||||
Reference in New Issue
Block a user