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

fix(ui-ux): allow adding of dusd collateral with active dusd loan #4131

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

lykalabrada
Copy link
Contributor

What this PR does / why we need it:

Allow adding of DUSD collateral to a vault with active DUSD loan

To borrow DUSD token:

  • Vault should have DFI collateral > 50% (of loan value)
  • Vault has 100% DUSD collateral (newly added when dusd-loop is enabled)

To borrow non-DUSD tokens:

  • Vault should have DFI collateral > 50% of loan value
  • Vault should have DUSD collateral > 50% of loan value

When adding collateral:

  • Adding of DUSD collateral to a vault with both DFI and DUSD collaterals should be allowed
  • Adding of non-DUSD collateral to a vault with an active DUSD loan, containing 100% DUSD collateral should not be allowed

Which issue(s) does this PR fixes?:

Fixes #4130

Additional comments?:

Developer Checklist:

  • Read your code changes at least once
  • Tested on iOS/Android device (e.g, No crashes, library supported etc.)
  • No console errors on web
  • Tested on Light mode and Dark mode*
  • Your UI implementation visually matched the rendered design*
  • Unit tests*
  • Added e2e tests*
  • Added translations*

Copy link
Contributor

github-actions bot commented Nov 8, 2023

Missing Translations Report

The following translations are missing for this pull request.

{
    "missingLanguageItems": {
        "zh-Hans": {
            "missingCount": 0,
            "labels": {},
            "totalCount": 2032,
            "allLabels": "{}"
        },
        "zh-Hant": {
            "missingCount": 0,
            "labels": {},
            "totalCount": 2032,
            "allLabels": "{}"
        },
        "fr": {
            "missingCount": 0,
            "labels": {},
            "totalCount": 2032,
            "allLabels": "{}"
        },
        "es": {
            "missingCount": 0,
            "labels": {},
            "totalCount": 2032,
            "allLabels": "{}"
        },
        "it": {
            "missingCount": 0,
            "labels": {},
            "totalCount": 2032,
            "allLabels": "{}"
        }
    },
    "totalMissingCount": 0
}

Copy link
Contributor

github-actions bot commented Nov 8, 2023

Build preview for DeFiChain Wallet is ready!

Built with commit cb71075

https://expo.io/@defichain/wallet?release-channel=pr-preview-4131

@codecov-commenter
Copy link

codecov-commenter commented Nov 8, 2023

Codecov Report

Merging #4131 (0d8cec3) into main (f29a056) will decrease coverage by 6.10%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #4131      +/-   ##
==========================================
- Coverage   61.38%   55.28%   -6.10%     
==========================================
  Files         438      438              
  Lines       12356    12348       -8     
  Branches     4091     4085       -6     
==========================================
- Hits         7585     6827     -758     
- Misses       4680     5438     +758     
+ Partials       91       83       -8     
Files Coverage Δ
...eens/Loans/screens/AddOrRemoveCollateralScreen.tsx 57.00% <0.00%> (+2.05%) ⬆️

... and 47 files with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@pierregee pierregee enabled auto-merge (squash) November 9, 2023 01:51
@pierregee pierregee disabled auto-merge November 9, 2023 01:57
@pierregee pierregee merged commit 13cf063 into main Nov 9, 2023
13 of 15 checks passed
@pierregee pierregee deleted the lyka/fix-add-col-error branch November 9, 2023 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not able to add dusd collateral to dfi dusd collateral vaults when dusd loan is open
3 participants