File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/wallet/wdk/src/sequence Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1159,12 +1159,6 @@ export class Wallets implements WalletsInterface {
11591159 throw new Error ( 'wallet-not-found' )
11601160 }
11611161
1162- // Prevent starting logout if already logging out or not ready
1163- if ( walletEntry . status !== 'ready' ) {
1164- console . warn ( `Logout called on wallet ${ wallet } with status ${ walletEntry . status } . Aborting.` )
1165- throw new Error ( `Wallet is not in 'ready' state for logout (current: ${ walletEntry . status } )` )
1166- }
1167-
11681162 if ( options ?. skipRemoveDevice ) {
11691163 await Promise . all ( [
11701164 this . shared . databases . manager . del ( wallet ) ,
@@ -1173,6 +1167,12 @@ export class Wallets implements WalletsInterface {
11731167 return undefined as any
11741168 }
11751169
1170+ // Prevent starting logout if already logging out or not ready
1171+ if ( walletEntry . status !== 'ready' ) {
1172+ console . warn ( `Logout called on wallet ${ wallet } with status ${ walletEntry . status } . Aborting.` )
1173+ throw new Error ( `Wallet is not in 'ready' state for logout (current: ${ walletEntry . status } )` )
1174+ }
1175+
11761176 const device = await this . shared . modules . devices . get ( walletEntry . device )
11771177 if ( ! device ) {
11781178 throw new Error ( 'device-not-found' )
You can’t perform that action at this time.
0 commit comments