Skip to content

Commit

Permalink
wip: useful logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mroz22 committed Jan 24, 2025
1 parent a91dd99 commit e30e2cf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/suite/src/middlewares/wallet/discoveryMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export const prepareDiscoveryMiddleware = createMiddlewareWithExtraDeps(
!isDeviceLocked &&
(deviceActions.selectDevice.match(action) || action.type === SUITE.APP_CHANGED)
) {
console.log('true 1');
authorizationIntent = true;
}

Expand All @@ -113,12 +114,17 @@ export const prepareDiscoveryMiddleware = createMiddlewareWithExtraDeps(
device.connected
);
if (becomesAcquired) {
console.log('true 2');

authorizationIntent = true;
}
}

// 3. begin auth process
if (authorizationIntent) {
console.log('middleware handling action', action.type);

console.log('authorizeDeviceThunk()');
dispatch(authorizeDeviceThunk());
}

Expand Down
3 changes: 3 additions & 0 deletions suite-common/connect-init/src/connectInitThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ export const connectInitThunk = createThunk(
const useWrapped =
params.device && infoResult.success && infoResult.payload.useDevice;

// console.log('infoResult', infoResult);

if (!useWrapped) {
return original(params);
}
Expand All @@ -109,6 +111,7 @@ export const connectInitThunk = createThunk(
original({ ...params, useCardanoDerivation: cardanoEnabled }),
);
dispatch(lockDevice(false));
// console.log('result', result);

return result;
};
Expand Down
3 changes: 3 additions & 0 deletions suite-common/wallet-core/src/device/deviceThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ export const authorizeDeviceThunk = createThunk<
useEmptyPassphrase: device.useEmptyPassphrase,
};

console.log('getDeviceState 1');

Check failure on line 333 in suite-common/wallet-core/src/device/deviceThunks.ts

View workflow job for this annotation

GitHub Actions / Linting and formatting

Unexpected console statement
const response = await TrezorConnect.getDeviceState(deviceParams);

if (response.success) {
Expand Down Expand Up @@ -412,6 +413,8 @@ export const authConfirm = createThunk(
const device = selectDeviceSelector(getState());
if (!device) return false;

console.log('getDeviceState 2');

Check failure on line 416 in suite-common/wallet-core/src/device/deviceThunks.ts

View workflow job for this annotation

GitHub Actions / Linting and formatting

Unexpected console statement

const response = await TrezorConnect.getDeviceState({
device: {
path: device.path,
Expand Down

0 comments on commit e30e2cf

Please sign in to comment.