defichain-wallet icon indicating copy to clipboard operation
defichain-wallet copied to clipboard

fix(core): wip update borrow loan condition

Open kyleleow opened this issue 2 years ago • 8 comments

What kind of PR is this?:

/kind fix

What this PR does / why we need it:

  • To change condition from DFI and DUSD has to be 50% of total collateral to 50% of minimum required collateral
  • Update error message shown in borrow loan screen, remove collateral screen

Which issue(s) does this PR fixes?:

Fixes #2734

Additional comments?:

Developer Checklist:

  • [x] Read your code changes at least once
  • [x] Tested on iOS/Android device (e.g, No crashes, library supported etc.)
  • [x] 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*

kyleleow avatar May 27 '22 02:05 kyleleow

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
wallet ✅ Ready (Inspect) Visit Preview Jun 8, 2022 at 0:31AM (UTC)

vercel[bot] avatar May 27 '22 02:05 vercel[bot]

Code Climate has analyzed commit 9591780e and detected 0 issues on this pull request.

View more on Code Climate.

codeclimate[bot] avatar May 27 '22 02:05 codeclimate[bot]

Deploy Preview for wallet-defichain ready!

Name Link
Latest commit 4cb5f5837f2b2006ab6178b6d2f12b947205d927
Latest deploy log https://app.netlify.com/sites/wallet-defichain/deploys/629ed070367705000abf1f49
Deploy Preview https://deploy-preview-2858--wallet-defichain.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar May 27 '22 02:05 netlify[bot]

Missing Translations Report

The following translations are missing for this pull request.

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

defichain-bot avatar May 27 '22 02:05 defichain-bot

Deploy Preview for mobile-wallet-preview ready!

Name Link
Latest commit 9591780e325468c7ed413a124b4a89cf1a29f1b8
Latest deploy log https://app.netlify.com/sites/mobile-wallet-preview/deploys/629fedd4d5f1e10008414c2a
Deploy Preview https://deploy-preview-2858--mobile-wallet-preview.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar May 27 '22 02:05 netlify[bot]

Codecov Report

Merging #2858 (9591780) into main (d5bbb6c) will increase coverage by 4.49%. The diff coverage is 96.96%.

@@            Coverage Diff             @@
##             main    #2858      +/-   ##
==========================================
+ Coverage   73.84%   78.33%   +4.49%     
==========================================
  Files         369      369              
  Lines        8450     8467      +17     
  Branches     2174     2184      +10     
==========================================
+ Hits         6240     6633     +393     
+ Misses       2192     1815     -377     
- Partials       18       19       +1     
Impacted Files Coverage Δ
mobile-app/app/components/BottomSheetModal.web.tsx 100.00% <ø> (ø)
...s/AppNavigator/screens/Balances/BalancesScreen.tsx 69.64% <ø> (+3.57%) :arrow_up:
...tor/screens/Loans/screens/EditCollateralScreen.tsx 85.71% <ø> (-0.11%) :arrow_down:
...ens/Loans/components/AddOrRemoveCollateralForm.tsx 93.20% <91.66%> (-1.54%) :arrow_down:
...ppNavigator/screens/Loans/hooks/CollateralPrice.ts 97.22% <100.00%> (ø)
...creens/AppNavigator/screens/Loans/hooks/MaxLoan.ts 100.00% <100.00%> (ø)
...or/screens/Loans/screens/BorrowLoanTokenScreen.tsx 92.14% <100.00%> (ø)
...vigator/screens/Loans/screens/BorrowMoreScreen.tsx 92.92% <100.00%> (ø)
...s/Loans/VaultDetail/components/EmptyCollateral.tsx 0.00% <0.00%> (-100.00%) :arrow_down:
...tor/screens/Loans/screens/EditLoanSchemeScreen.tsx 0.00% <0.00%> (-96.23%) :arrow_down:
... and 63 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 d5bbb6c...9591780. Read the comment docs.

codecov[bot] avatar May 27 '22 02:05 codecov[bot]

Build preview for DeFiChain Wallet is ready!

Built with commit 5d83cabbd75ea4ad08a375ec413b74ef9c835116

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

defichain-bot avatar May 27 '22 02:05 defichain-bot



Test summary

470 21 1 5


Run details

Project wallet
Status Failed
Commit 5d83cabbd7 ℹ️
Started Jun 8, 2022 12:34 AM
Ended Jun 8, 2022 1:11 AM
Duration 36:21 💡
OS Linux Ubuntu - 20.04
Browser Chrome 102

View run in Cypress Dashboard ➡️


Failures

auctions/auctions.spec.ts Failed
1 Wallet - Auctions > Min. Next Bid > should display USD values in batch card
2 Wallet - Auctions > Min. Next Bid > should display USD values in quick bid bottom sheet in auction home screen
3 Wallet - Auctions > Min. Next Bid > should display USD values in place bid screen
4 Wallet - Auctions > Min. Next Bid > should display USD values in auction details screen
5 Wallet - Auctions > Min. Next Bid > should display USD values in quick bid bottom sheet in auction details screen
balances/send.spec.ts Failed
1 Wallet - Send - Switch token > should be able to enable/disable token selection
2 Wallet - Send - Address book > should be able to block duplicate address
3 Wallet - Send - Address book > should be able to block wallet address
4 Wallet - Send - Address book > should disable add new, edit and favourite button has has refresh button in Your address tab
5 Wallet - Send - Address book > should be able to validate edit address form
This comment includes only the first 10 test failures. See all 21 failures in the Cypress Dashboard.

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

cypress[bot] avatar May 27 '22 03:05 cypress[bot]

implemented in #3654

kyleleow avatar Oct 21 '22 01:10 kyleleow