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

feat(jellyfish-api-core): DFI Payback of all dTokens #1190

Merged
merged 35 commits into from
Mar 30, 2022

Conversation

chanakasameera
Copy link
Contributor

@chanakasameera chanakasameera commented Mar 8, 2022

kind/feature

What this PR does / why we need it:

Enable payback of all dTokens with DFI and not just dUSD
Related to Ain#1111 in version 2.7.0

Which issue(s) does this PR fixes?:

Fixes #

Additional comments?:

@codeclimate
Copy link

codeclimate bot commented Mar 8, 2022

Code Climate has analyzed commit dd15230 and detected 5 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 3
Duplication 2

View more on Code Climate.

@netlify
Copy link

netlify bot commented Mar 8, 2022

Deploy Preview for jellyfish-defi ready!

Name Link
🔨 Latest commit dd15230
🔍 Latest deploy log https://app.netlify.com/sites/jellyfish-defi/deploys/624324104dc8870008d3af1a
😎 Deploy Preview https://deploy-preview-1190--jellyfish-defi.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.

@codecov
Copy link

codecov bot commented Mar 8, 2022

Codecov Report

Merging #1190 (dd15230) into main (dc1cd7e) will increase coverage by 0.24%.
The diff coverage is 30.43%.

@@            Coverage Diff             @@
##             main    #1190      +/-   ##
==========================================
+ Coverage   90.47%   90.72%   +0.24%     
==========================================
  Files         332      332              
  Lines        9594     9615      +21     
  Branches     1174     1176       +2     
==========================================
+ Hits         8680     8723      +43     
+ Misses        863      849      -14     
+ Partials       51       43       -8     
Impacted Files Coverage Δ
...ackages/jellyfish-api-core/src/category/account.ts 100.00% <ø> (ø)
...h-transaction-builder/src/txn/txn_builder_loans.ts 88.57% <0.00%> (-11.43%) ⬇️
...ages/jellyfish-transaction/src/script/dftx/dftx.ts 97.01% <0.00%> (-1.47%) ⬇️
...ckages/jellyfish-transaction/src/script/mapping.ts 96.66% <0.00%> (-1.31%) ⬇️
...ontainers/src/containers/RegTestContainer/index.ts 100.00% <ø> (ø)
...ellyfish-transaction/src/script/dftx/dftx_loans.ts 93.18% <30.76%> (-6.82%) ⬇️
...s/legacy-api/src/controllers/PoolPairController.ts 95.13% <50.00%> (-0.64%) ⬇️
packages/jellyfish-api-core/src/category/loan.ts 100.00% <100.00%> (ø)
...es/testcontainers/src/containers/DeFiDContainer.ts 91.11% <100.00%> (ø)
... and 10 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 18c2389...dd15230. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Mar 8, 2022

Docker build preview for jellyfish/apps is ready!

Built with commit b96e5a1

  • ghcr.io/defich/legacy-api:pr-1190
  • ghcr.io/defich/ocean-api:pr-1190
  • ghcr.io/defich/playground-api:pr-1190

@chanakasameera chanakasameera changed the title Jellyfish updates for "DFI Payback of all dTokens Ain#1111" feat(jellyfish-api-core): DFI Payback of all dTokens Mar 10, 2022
@defichain-bot defichain-bot added the kind/feature New feature request label Mar 10, 2022
Copy link
Contributor

@surangap surangap left a comment

Choose a reason for hiding this comment

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

some comments were added. need to add tests to dftx

Copy link
Contributor

@ivan-zynesis ivan-zynesis left a comment

Choose a reason for hiding this comment

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

https://github.com/DeFiCh/jellyfish/runs/5723133086?check_suite_focus=true#step:5:557

Wonder is FCR causing the test fail? Or simply test result simply inconsistent/flaky?

@chanakasameera
Copy link
Contributor Author

https://github.com/DeFiCh/jellyfish/runs/5723133086?check_suite_focus=true#step:5:557

Wonder is FCR causing the test fail? Or simply test result simply inconsistent/flaky?

FCR affects the test cases that check the exceptions for 50% DFI/DUSD

Copy link
Contributor

@surangap surangap left a comment

Choose a reason for hiding this comment

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

overall looks good. minor comments added. once resolved should be good to go since downstream require the updated API.
Can address the burn info update here -> https://github.com/DeFiCh/jellyfish/pull/1190/files#r832985771 separately.

chanakasameera and others added 2 commits March 29, 2022 20:51
Co-authored-by: surangap <surangatco@gmail.com>
Co-authored-by: surangap <surangatco@gmail.com>
Copy link
Contributor

@ivan-zynesis ivan-zynesis left a comment

Choose a reason for hiding this comment

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

Foresee we should need rpc.gov.setGov(attr: GovAttributes) soon

Copy link
Member

@fuxingloh fuxingloh left a comment

Choose a reason for hiding this comment

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

txn_builder_loans.ts loan.paybackLoanV2(...) not tested?

@fuxingloh
Copy link
Member

txn_builder_loans.ts loan.paybackLoanV2(...) not tested?

However, I think the critical path of the code has been sufficiently tested on the RPC side. Let's merge this in first so we can do a quick release for the downstream. We will wait for the PR for txn_builder at a later date.

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

9 participants