-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "feat: update session on login rather than disconnecting walle…
- Loading branch information
Showing
17 changed files
with
66 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
packages/shared/src/lib/auxiliary/wallet-connect/actions/removeAllDisconnectedDapps.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
import { connectedDapps, getWalletClient, setConnectedDapps } from '../stores' | ||
import { connectedDapps, getWalletClient, getPersistedDapp, removePersistedDapp } from '../stores' | ||
import { get } from 'svelte/store' | ||
import { clearOldPairings } from './clearOldPairings' | ||
|
||
export function removeAllDisconnectedDapps(): void { | ||
const client = getWalletClient() | ||
if (!client) { | ||
return | ||
} | ||
|
||
const connectedDappsForProfile = get(connectedDapps).filter((dapp) => !dapp.session) | ||
const connectedDappsForProfile = get(connectedDapps).filter( | ||
(dapp) => !!getPersistedDapp(dapp.metadata?.url ?? '') && !dapp.session | ||
) | ||
|
||
for (const dapp of connectedDappsForProfile) { | ||
if (dapp.metadata) { | ||
void clearOldPairings(dapp.metadata.url) | ||
removePersistedDapp(dapp.metadata.url) | ||
} | ||
} | ||
setConnectedDapps() | ||
} |
9 changes: 2 additions & 7 deletions
9
packages/shared/src/lib/auxiliary/wallet-connect/stores/persisted-dapp-namespaces.store.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
packages/shared/src/lib/auxiliary/wallet-connect/utils/buildDefaultNamespaces.ts
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/shared/src/lib/auxiliary/wallet-connect/utils/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
export * from './buildCaip10Address' | ||
export * from './buildDefaultNamespaces' | ||
export * from './disconnectAllDapps' | ||
export * from './doesNamespaceSupportEvent' | ||
export * from './getBloomError' | ||
export * from './getPermissionForMethod' | ||
export * from './normalizeSupportedNamespace' | ||
export * from './rejectAndClearSessionInitiationRequest' | ||
export * from './rejectSessionInitiationRequest' | ||
export * from './switchToRequiredAccount' | ||
export * from './updateActiveSessionsToActiveProfile' | ||
export * from './updateSession' | ||
export * from './validateConnectionCodeUri' |
16 changes: 0 additions & 16 deletions
16
packages/shared/src/lib/auxiliary/wallet-connect/utils/normalizeSupportedNamespace.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.