We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75040ec commit 8ea903dCopy full SHA for 8ea903d
packages/passport/sdk/src/zkEvm/sessionActivity/sessionActivity.ts
@@ -19,8 +19,12 @@ const syncSendCount = () => {
19
sendCount = getItem(SESSION_ACTIVITY_COUNT_KEY) || {};
20
const sendDay = getItem(SESSION_ACTIVITY_DAY_KEY);
21
22
- // If no day, set count to zero. If not today, reset sendCount to 0
23
- const today = new Date().toISOString().split('T')[0];
+ // If no day, init sendCount. If not today, reset sendCount
+ const date = new Date();
24
+ const yyyy = date.getFullYear();
25
+ const mm = `${date.getMonth() + 1}`.padStart(2, '0');
26
+ const dd = `${date.getDate()}`.padStart(2, '0');
27
+ const today = `${yyyy}-${mm}-${dd}`;
28
if (!sendDay || sendDay !== today) {
29
sendCount = {};
30
}
0 commit comments