Skip to content

Commit 4c6ee63

Browse files
committed
fix: add missing slot check on multi user update slot
1 parent 35586ec commit 4c6ee63

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sdk/src/accounts/grpcMultiUserAccountSubscriber.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ export class grpcMultiUserAccountSubscriber {
161161
},
162162

163163
updateData(userAccount: UserAccount, slot: number): void {
164+
const existingData = parent.userData.get(key);
165+
if (existingData && existingData.slot > slot) {
166+
return;
167+
}
164168
parent.userData.set(key, { data: userAccount, slot });
165169
perUserEmitter.emit('userAccountUpdate', userAccount);
166170
perUserEmitter.emit('update');

0 commit comments

Comments
 (0)