Commit 4cbaf36 1 parent d2f876e commit 4cbaf36 Copy full SHA for 4cbaf36
File tree 2 files changed +10
-1
lines changed
packages/connect/src/core
suite-common/wallet-core/src/device
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -696,6 +696,15 @@ const onCallDevice = async (
696
696
}
697
697
// Work done
698
698
699
+ if (
700
+ method . keepSession &&
701
+ method . deviceState &&
702
+ method . deviceState . sessionId !== device . getState ( ) ?. sessionId
703
+ ) {
704
+ // if session was changed from the one that was sent, send a device changed event
705
+ sendCoreMessage ( createDeviceMessage ( DEVICE . CHANGED , device . toMessageObject ( ) ) ) ;
706
+ }
707
+
699
708
// TODO: This requires a massive refactoring https://github.com/trezor/trezor-suite/issues/5323
700
709
// @ts -expect-error TODO: messageResponse should be assigned from the response of "inner" function
701
710
const response = messageResponse ;
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ const mergeDeviceState = (
67
67
// state was previously not defined, we can set it
68
68
device . state === undefined ||
69
69
// update sessionId for the same staticSessionId
70
- ( upcomingState ?. sessionId &&
70
+ ( upcomingState &&
71
71
device . state ?. staticSessionId === upcomingState . staticSessionId &&
72
72
device . state ?. sessionId !== upcomingState . sessionId )
73
73
) {
You can’t perform that action at this time.
0 commit comments