Skip to content
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

Conversation

quiet-node
Copy link
Member

@quiet-node quiet-node commented Sep 13, 2023

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

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@quiet-node quiet-node added enhancement New feature or request P2 Tooling tooling labels Sep 13, 2023
@quiet-node quiet-node added this to the 0.5.0 milestone Sep 13, 2023
@quiet-node quiet-node requested a review from a team as a code owner September 13, 2023 22:27
@quiet-node quiet-node self-assigned this Sep 13, 2023
@github-actions
Copy link

github-actions bot commented Sep 13, 2023

Test Results

197 tests  ±0   191 ✔️ ±0   6m 39s ⏱️ -18s
  62 suites ±0       6 💤 ±0 
  13 files   ±0       0 ±0 

Results for commit a2e74bd. ± Comparison against base commit e7ae455.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@Nana-EC Nana-EC left a 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') {
Copy link
Collaborator

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

Suggested change
if (typeof localStorage !== 'undefined') {
if (localStorage) {

const key = localStorage.key(i);

// remove items that have keys start with HEDERA
if (key?.startsWith('HEDERA')) {
Copy link
Collaborator

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

@quiet-node quiet-node merged commit 0566f51 into main Sep 14, 2023
19 checks passed
@quiet-node quiet-node deleted the 340-disconnect-feature-should-also-wipe-off-any-records-made-during-smart-contract-interacting-session branch September 14, 2023 01:32
mshakeg pushed a commit to mshakeg/hedera-smart-contracts that referenced this pull request Oct 14, 2023
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 Tooling tooling
Projects
None yet
2 participants