-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dapp-feat: Wipe Cached Transaction Results feature complete (#390) #398
dapp-feat: Wipe Cached Transaction Results feature complete (#390) #398
Conversation
Signed-off-by: Logan Nguyen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. 2 suggestions
*/ | ||
export const clearTransactionCache = () => { | ||
// loop through localStorage items | ||
if (typeof localStorage !== 'undefined') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: see if this works
if (typeof localStorage !== 'undefined') { | |
if (localStorage) { |
const key = localStorage.key(i); | ||
|
||
// remove items that have keys start with HEDERA | ||
if (key?.startsWith('HEDERA')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it a constant.
Actually all key names should be drawn from a shared constant
Signed-off-by: Logan Nguyen <[email protected]>
…h#390) (hashgraph#398) * dapp-feat: Wipe Cached transaction results feature complete Signed-off-by: Logan Nguyen <[email protected]> * dapp-update: pulled storage keys out of a constant object Signed-off-by: Logan Nguyen <[email protected]> --------- Signed-off-by: Logan Nguyen <[email protected]> Signed-off-by: Mo Shaikjee <[email protected]>
Description:
This PR completes the Wipe Cached Transaction Results feature
Related issue(s): #314
Fixes #340
** UI demo **:
Screen.Recording.2023-09-13.at.5.24.00.PM.mov
Notes for reviewer:
Checklist