Subprefix DB potential issue #37

Open
opened 2025-03-21 10:49:35 +01:00 by Alfred-mk · 0 comments
Member

Data stored using the subprefix db at times gets mixed up.

This has been noted with the vouchers, when selecting the active voucher

API responds with correct data but the list can end up displaying unrelated data or vouchers.

Potential solution is switching to the normal user data store

Issue condition

When two or more accounts access the USSD simultaneously, navigating to the "Select voucher" node under "My voucher" returns a list of vouchers that belongs to the first user to access the node.

If the first user has 5 vouchers, the same list will be displayed to the other users that are on the same node.

Fix

  • Replace the subprefix DB functionality related to vouchers with the user data store
  • Use userStore.WriteEntry to write vouchers data, and userStore.ReadEntry to retrieve the data

Issue resolved on https://git.grassecon.net/grassrootseconomics/sarafu-vise/src/tag/v1.0.0-rc.7

Data stored using the subprefix db at times gets mixed up. This has been noted with the vouchers, when selecting the active voucher API responds with correct data but the list can end up displaying unrelated data or vouchers. Potential solution is switching to the normal user data store ### Issue condition When two or more accounts access the USSD simultaneously, navigating to the "Select voucher" node under "My voucher" returns a list of vouchers that belongs to the first user to access the node. If the first user has 5 vouchers, the same list will be displayed to the other users that are on the same node. ### Fix - Replace the subprefix DB functionality related to vouchers with the user data store - Use userStore.WriteEntry to write vouchers data, and userStore.ReadEntry to retrieve the data Issue resolved on https://git.grassecon.net/grassrootseconomics/sarafu-vise/src/tag/v1.0.0-rc.7
Alfred-mk added the
Kind/Bug
Reviewed
Confirmed
Priority
Critical
labels 2025-03-21 15:06:38 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: grassrootseconomics/sarafu-vise#37
No description provided.