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

[NT-1809] Re-factoring add on selection + shipping rules logic #1399

Merged
merged 3 commits into from
Mar 18, 2021

Conversation

singhhari
Copy link
Contributor

📲 What

Because we make use of both shippingRules and shippingRulesExpanded there is some slightly confusing logic related to add on selection. In particular, we use shippingRules before add on selection and the expanded variant after. This led to a bug related to digital only add ons not rendering bc of a mishandled edge case. This PR simplifies the way we handle this flow and effectively uses shippingRule up until a particular add on is being mapped/filtered.

🤔 Why

Fixing a bug where a project with digital only add ons is returning no value for shipping rules and leading to a condition that looks like the UI timing out on a network request.

@codecov
Copy link

codecov bot commented Mar 18, 2021

Codecov Report

Merging #1399 (42570c7) into master (d22ca87) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1399      +/-   ##
==========================================
- Coverage   86.00%   85.99%   -0.01%     
==========================================
  Files        1104     1104              
  Lines       97033    97025       -8     
==========================================
- Hits        83449    83441       -8     
  Misses      13584    13584              
Impacted Files Coverage Δ
...ary/ViewModels/RewardAddOnSelectionViewModel.swift 98.49% <100.00%> (-0.03%) ⬇️
...iewModels/RewardAddOnSelectionViewModelTests.swift 99.38% <100.00%> (-0.01%) ⬇️

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 d22ca87...42570c7. Read the comment docs.

Copy link
Contributor

@jgsamudio jgsamudio left a comment

Choose a reason for hiding this comment

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

Great work! Thanks Hari!

@singhhari singhhari merged commit 6f5a2bc into master Mar 18, 2021
@singhhari singhhari deleted the NT-1809-digital-only-add-ons branch March 18, 2021 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants