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

Feature/dapp ethereum connection persistence #2708

Conversation

weilbith
Copy link
Contributor

@weilbith weilbith commented May 7, 2021

Related to #2689

Short description
Move user settings into a new store module. Extend user settings to include Ethereum connection options.

Definition of Done

  • Steps to manually test the change have been documented
  • Acceptance criteria are met
  • Change has been manually tested by the reviewer (dApp)

Steps to manually test the change (dApp)

  1. Make sure that the "use raiden account" setting still works as expected and gets preserved over a reset (during connection)
  2. Make sure old settings from the localStorage get still parsed
  3. Make sure that your localStorage shows that there are no saved options yet.

@weilbith weilbith requested a review from taleldayekh May 7, 2021 06:53
@weilbith weilbith self-assigned this May 7, 2021
@weilbith
Copy link
Contributor Author

weilbith commented May 7, 2021

No CHANGELOG entry needed.

@codecov
Copy link

codecov bot commented May 7, 2021

Codecov Report

Merging #2708 (5e9bf59) into master (1b867e8) will increase coverage by 0.06%.
The diff coverage is 92.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2708      +/-   ##
==========================================
+ Coverage   92.28%   92.35%   +0.06%     
==========================================
  Files         179      183       +4     
  Lines        7245     7258      +13     
  Branches     1206     1208       +2     
==========================================
+ Hits         6686     6703      +17     
+ Misses        471      466       -5     
- Partials       88       89       +1     
Flag Coverage Δ
dapp 86.90% <92.59%> (+0.11%) ⬆️
dapp.unit 86.90% <92.59%> (+0.11%) ⬆️
sdk 94.90% <ø> (+0.06%) ⬆️
sdk.e2e 76.13% <ø> (+0.22%) ⬆️
sdk.integration 80.42% <ø> (+0.02%) ⬆️
sdk.unit 42.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ponents/account/backup-state/UploadStateDialog.vue 87.50% <ø> (-0.38%) ⬇️
...den-dapp/src/services/ethereum-connection/types.ts 50.00% <ø> (ø)
raiden-dapp/src/views/Home.vue 54.23% <66.66%> (+4.23%) ⬆️
raiden-dapp/src/store/user-settings/index.ts 83.33% <83.33%> (ø)
...ervices/ethereum-connection/direct-rpc-provider.ts 100.00% <100.00%> (ø)
.../services/ethereum-connection/injected-provider.ts 94.44% <100.00%> (ø)
...src/services/ethereum-connection/wallet-connect.ts 92.30% <100.00%> (ø)
raiden-dapp/src/store/index.ts 86.23% <100.00%> (-0.49%) ⬇️
raiden-dapp/src/store/user-settings/getters.ts 100.00% <100.00%> (ø)
raiden-dapp/src/store/user-settings/mutations.ts 100.00% <100.00%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b867e8...5e9bf59. Read the comment docs.

Copy link
Contributor

@taleldayekh taleldayekh left a comment

Choose a reason for hiding this comment

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

LGTM and works as described in the PR. 👍🏽

raiden-dapp/src/store/user-settings/mutations.ts Outdated Show resolved Hide resolved
@weilbith weilbith force-pushed the feature/dapp-ethereum-connection-persistence branch from 7b72b31 to a2568c8 Compare May 10, 2021 10:19
The user settings will become extended. For example it is planned to put
the ethereum connection options there. This will require some additional
logic and will grow over time. Therefore it make sense to export it into
its own store module. Thereby we don't clutter the main store and the
module can be a focused selection of storage, individually tested and
maintained.
This extension of the user settings allows to make the Ethereum
connection options as provided by the user can be easily preserved and
reloaded.

This is a preparation for the connection management by the user. For
this commit the connection options are still derived from the
configuration file. Later this will allows to save the users connection
options and pre-fill the connection dialog, allow for auto-logins,
change the options somewhere else and more.
@weilbith weilbith force-pushed the feature/dapp-ethereum-connection-persistence branch from a2568c8 to 5e9bf59 Compare May 10, 2021 10:37
@weilbith weilbith merged commit d31817c into raiden-network:master May 10, 2021
@weilbith weilbith deleted the feature/dapp-ethereum-connection-persistence branch May 10, 2021 11:15
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