Skip to content

Commit b604127

Browse files
wa0x6eChaituVR
andauthored
fix: fix stamp cache refresh on profile name update not triggering (#437)
* fix: fix wrong field name for triggering profile cache refresh * fix tests --------- Co-authored-by: ChaituVR <[email protected]>
1 parent d8bcab2 commit b604127

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/writer/profile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function action(message, ipfs): Promise<void> {
4040

4141
await db.queryAsync('REPLACE INTO users SET ?', params);
4242

43-
['avatar', 'address'].forEach(async type => {
43+
['avatar', 'name'].forEach(async type => {
4444
if (profile[type] !== existingProfile[type]) await clearStampCache(type, message.from);
4545
});
4646
}

test/unit/writer/profile.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('writer/profile', () => {
3939
'1'
4040
);
4141

42-
return expect(spy).toHaveBeenCalledTimes(1);
42+
return expect(spy).toHaveBeenCalledTimes(2);
4343
});
4444

4545
it('does not clear the stamp cache if the avatar has not changed', () => {

0 commit comments

Comments
 (0)