Skip to content

Commit ef5a409

Browse files
committed
remove namespace from session id
1 parent f4b572c commit ef5a409

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Web3Auth.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ export class Web3Auth extends SafeEventEmitter<Web3AuthSfaEvents> implements IWe
126126
throw WalletInitializationError.invalidParams("provider should have chainConfig and should be initialized with chainId and chainNamespace");
127127
}
128128

129-
const storageKey =
130-
this.coreOptions.sessionKey ||
131-
`${this.baseStorageKey}_${this.coreOptions.chainConfig.chainNamespace === CHAIN_NAMESPACES.SOLANA ? "solana" : "eip"}_${this.coreOptions.usePnPKey ? "pnp" : "core_kit"}`;
129+
const storageKey = this.coreOptions.sessionKey || `${this.baseStorageKey}_${this.coreOptions.usePnPKey ? "pnp" : "core_kit"}`;
132130
this.currentStorage = new AsyncStorage(storageKey, this.coreOptions.storage);
133131
this.nodeDetails = fetchLocalConfig(this.coreOptions.web3AuthNetwork, KEY_TYPE.SECP256K1);
134132
this.authInstance = new Torus({
@@ -161,7 +159,8 @@ export class Web3Auth extends SafeEventEmitter<Web3AuthSfaEvents> implements IWe
161159
});
162160
if (data && data.privKey) {
163161
this.torusPrivKey = data.basePrivKey;
164-
await this.privKeyProvider.setupProvider(data.privKey);
162+
const finalPrivKey = await this.getFinalPrivKey(data.basePrivKey);
163+
await this.privKeyProvider.setupProvider(finalPrivKey);
165164
// setup aa provider after private key provider is setup
166165
if (this.accountAbstractionProvider) {
167166
await this.accountAbstractionProvider.setupProvider(this.privKeyProvider);

0 commit comments

Comments
 (0)