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

Implemented redux on ReadCode/SendModal #1761

Merged
merged 4 commits into from
Dec 22, 2018

Conversation

ranbena
Copy link
Contributor

@ranbena ranbena commented Dec 20, 2018

What current issue(s) from Trello/Github does this address?
This is a part of a few PRs to better the QR Scan implementation.

What problem does this PR solve?
The Send Modal code is a bit convoluted imho and now made simpler.
It handles notification errors by itself and lacks in static typing.

How did you solve this problem?

  1. Added redux, hoc and spunky to deal with data, notifications and callbacks. This also allows adding withProgress to be used by the QR Scanner (upcoming commit depending on this one).
  2. Removed the "step 1/2" logic and instead changing steps automatically if recipient data exists or not. So simple!

How did you make sure your solution works?
Manually tested. No change in functionality nor regression.
Go to Send -> Enter QR Code -> try it out

Are there any special changes in the code that we should be aware of?

Is there anything else we should know?

  • Unit tests written?

app/util/parseQRCode.js Outdated Show resolved Hide resolved
app/components/Modals/SendModal/SendModal.jsx Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Dec 20, 2018

Pull Request Test Coverage Report for Build 5478

  • 7 of 21 (33.33%) changed or added relevant lines in 5 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.1%) to 41.194%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app/components/QrCodeScanner/QrCodeScanner.jsx 0 1 0.0%
app/components/Modals/SendModal/index.js 3 6 50.0%
app/actions/sendModalActions.js 3 8 37.5%
app/components/Modals/SendModal/SendModal.jsx 0 5 0.0%
Files with Coverage Reduction New Missed Lines %
app/components/Modals/SendModal/SendModal.jsx 2 0.0%
Totals Coverage Status
Change from base Build 5473: 0.1%
Covered Lines: 1029
Relevant Lines: 2286

💛 - Coveralls

@comountainclimber
Copy link
Member

This looks and works great excellent job @ranbena

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.

5 participants