Closed joshheald closed 1 day ago
2 Warnings | |
---|---|
:warning: | View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity. |
:warning: | This PR is assigned to the milestone 21.2. This milestone is due in less than 2 days. Please make sure to get it merged by then or assign it to a milestone with a later deadline. |
Generated by :no_entry_sign: Danger
📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.
App Name | WooCommerce iOS | |
Build Number | pr14473-46b2e09 | |
Version | 21.1 | |
Bundle ID | com.automattic.alpha.woocommerce | |
Commit | 46b2e09d8c06b278193ff8312747142e7d980b07 | |
App Center Build | WooCommerce - Prototype Builds #11700 |
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.
Part of: #14458
Description
This PR removes the posModel and cardReaderService dependencies from the TotalsViewModel.
These actions can simply happen within the aggregate model.
One notable point; the
connectCardReader
action on the reader not connected error (shown on the right hand side when viewing totals with no reader connected) now uses the environment object to callconnectCardReader
on the aggregate model.Not having to do any manual injection here really simplifies the view and view model, in my opinion.
Testing information
This PR requires general testing of the checkout and payment flow, including card reader disconnection and reconnection.
In particular note that the card reader gets prepared for payment when you connect it on the Totals View, using either button. This should not happen when connecting the reader on the item selection screen.
The connection/disconnection required some slight test setup changes, but the existing tests on the aggregate model already covered the behaviour.
RELEASE-NOTES.txt
if necessary.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: