File tree Expand file tree Collapse file tree
packages/wallet/core/src/signers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,6 +71,10 @@ export class SessionManager implements SapientSigner {
7171 if ( ! imageHash ) {
7272 throw new Error ( `Session configuration not found for image hash ${ imageHash } ` )
7373 }
74+ return this . _getTopologyForImageHash ( imageHash )
75+ }
76+
77+ private async _getTopologyForImageHash ( imageHash : Hex . Hex ) : Promise < SessionConfig . SessionsTopology > {
7478 const tree = await this . stateProvider . getTree ( imageHash )
7579 if ( ! tree ) {
7680 throw new Error ( `Session configuration not found for image hash ${ imageHash } ` )
@@ -235,6 +239,7 @@ export class SessionManager implements SapientSigner {
235239 if ( ( await this . imageHash ) !== imageHash ) {
236240 throw new Error ( 'Unexpected image hash' )
237241 }
242+ const topology = await this . _getTopologyForImageHash ( imageHash )
238243 //FIXME Test chain id
239244 // if (this._provider) {
240245 // const providerChainId = await this._provider.request({
@@ -311,7 +316,7 @@ export class SessionManager implements SapientSigner {
311316
312317 const encodedSignature = SessionSignature . encodeSessionCallSignatures (
313318 signatures ,
314- await this . topology ,
319+ topology ,
315320 explicitSigners ,
316321 implicitSigners ,
317322 )
You can’t perform that action at this time.
0 commit comments