-
Notifications
You must be signed in to change notification settings - Fork 37
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): Add account getPendingFutureSwaps RPC for dfip2203 futures #1321
Conversation
Code Climate has analyzed commit 71d4b76 and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
✅ Deploy Preview for jellyfish-defi ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Codecov Report
@@ Coverage Diff @@
## main #1321 +/- ##
==========================================
- Coverage 90.47% 89.62% -0.86%
==========================================
Files 348 348
Lines 10008 10010 +2
Branches 1222 1222
==========================================
- Hits 9055 8971 -84
- Misses 905 987 +82
- Partials 48 52 +4
Continue to review full report at Codecov.
|
Docker build preview for jellyfish/apps is ready! Built with commit 2840b35
|
The final review of this PR is going to determine how the design of listPendingFutureSwaps PR looks like as both PRs are highly related. |
}) | ||
|
||
it('Should getPendingFutureSwaps if futureswap DUSD for TSLA', async () => { | ||
// Call getpendingfutureswaps before performing futureswap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks redundant as Line 142 does the same thing.
However, I believe every code in every Jest Item (It) should be independent.
@@ -35,7 +35,7 @@ export abstract class DeFiDContainer extends DockerContainer { | |||
if (process?.env?.DEFICHAIN_DOCKER_IMAGE !== undefined) { | |||
return process.env.DEFICHAIN_DOCKER_IMAGE | |||
} | |||
return 'defi/defichain:master-2a236bb79' | |||
return 'defi/defichain:master-57c099c1a' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be the latest docker, if not reviewer please change this for me.
packages/jellyfish-api-core/__tests__/category/account/getPendingFutureSwaps.test.ts
Outdated
Show resolved
Hide resolved
packages/jellyfish-api-core/__tests__/category/account/getPendingFutureSwaps.test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the listing logic against the gov
futureswap
check the list
deactivate the DFIP2203
check the list again
await testing.generate(1) | ||
} | ||
|
||
beforeEach(async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reset container to remove GOV attributes
@@ -43,6 +43,11 @@ export class TestingToken { | |||
const to = { [address]: [account] } | |||
return await this.rpc.account.sendTokensToAddress({}, to) | |||
} | |||
|
|||
async getTokenId (symbol: string): Promise<string> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a new function created by Suranga
}) | ||
}) | ||
|
||
describe('Multiple futureswaps', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't duplicate the negative test units for setGov in multiple futureswaps
…utureSwaps # Conflicts: # docs/node/CATEGORIES/08-account.md # packages/jellyfish-api-core/src/category/account.ts # packages/testcontainers/src/containers/DeFiDContainer.ts
What this PR does / why we need it:
Add getPendingFutureSwaps RPC
Which issue(s) does this PR fixes?:
Fixes part of #1268
Additional comments?: