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

Persist transactions #620

Merged
merged 2 commits into from
Aug 3, 2021
Merged

Conversation

evgenyboxer
Copy link
Contributor

@evgenyboxer evgenyboxer commented Aug 3, 2021

Description

Added persistence to notifications by adding a version version prop to lsGet and lsSet.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

How should this be tested?

Please provide instructions so we can test. Please also list any relevant details for your test configuration.

  • Make a trade/invest, etc, and refresh the browser.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code where relevant, particularly in hard-to-understand areas
  • My changes generate no new console warnings
  • The base of this PR is master if hotfix, develop if not

@linear
Copy link

linear bot commented Aug 3, 2021

return fallback || {};
}
}

Copy link
Contributor Author

@evgenyboxer evgenyboxer Aug 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved into lsGet and refactored (I'm not a fan of returning an empty object - better return something like null)

}
}

return defaultValue;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If provided with version it will try to get the data of that version and will always return the defaultValue in case of a mismatch (for version upgrades)

Copy link
Collaborator

@garethfuller garethfuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the local storage logic could probably be extracted into a service now. Would make it cleaner and more self-contained. I'm not suggesting it needs to be part of this PR though.

@evgenyboxer
Copy link
Contributor Author

Yeah, good idea - a chance to make it much nicer and cleaner.

@evgenyboxer evgenyboxer merged commit 085d48d into develop Aug 3, 2021
@evgenyboxer evgenyboxer deleted the evgeny/ui-682-persist-transactions branch August 3, 2021 09:54
TomAFrench added a commit that referenced this pull request Aug 7, 2021
* develop:
  [Gnosis]: Add wrap/unwrap transaction action (#636)
  fix: use more accurate buy/sell amounts for transactions (#635)
  Add support for transaction speed ups / cancellations (#631)
  UI 678 lm table (#621)
  Cleanup dependencies (#629)
  Disable coingecko list for now (#628)
  Cleanup unused files & functions (#626)
  Hotfix/1.11.4 (#627)
  [Gnosis]: Various bug fixes (#624)
  Registry refactor hook up (#570)
  Persist transactions (#620)
  [Gnosis]: More UI Tweaks (#616)
This was referenced Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants