-
Notifications
You must be signed in to change notification settings - Fork 13
feat(module.api): add lp rewardpct #869
base: main
Are you sure you want to change the base?
Conversation
Code Climate has analyzed commit f53154c and detected 2 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## main #869 +/- ##
==========================================
+ Coverage 92.46% 92.74% +0.27%
==========================================
Files 127 127
Lines 3678 3737 +59
Branches 461 476 +15
==========================================
+ Hits 3401 3466 +65
+ Misses 267 263 -4
+ Partials 10 8 -2
Continue to review full report at Codecov.
|
@fuxingloh this is merge ready and should be quite minimal impact to any downstream |
} catch (err: any) { | ||
if (err?.payload?.message !== 'Pool not found') { |
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.
} catch (err: any) { | |
if (err?.payload?.message !== 'Pool not found') { | |
} catch (err) { | |
if (err instanceof RpcApiError && err?.payload?.message !== 'Pool not found') { |
We can potentially use instanceof here to avoid casting errors to any
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.
Note that this requires RpcApiError
to be imported so will need manual commits I think 🤔
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.
Quite reluctant to make changes here, since it is a generic issue and all over the codebase. I think we should open an issue to clean it up if we have to.
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 am wondering if we want to set the typescript rules to disable the useUnknownInCatchVariables until we formally address this so we don't have to cast back to any
for our try/catch.
But that could also be part of a separate PR.
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.
We don't need to manually calculate it anymore since |
I guess this means we can also simplify the code and remove the manual calculation all together and just get the data from listPoolPair directly. |
We're finishing up BirthdayResearch/jellyfishsdk#580 This PR needs to be migrated to https://github.com/JellyfishSDK/jellyfish/tree/main/apps/whale-api Since you're busy currently, I will re-assign this to someone else. |
What kind of PR is this?:
/kind feature
What this PR does / why we need it:
Include reward split % for DUSD pairs
Which issue(s) does this PR fixes?:
Fixes BirthdayResearch/jellyfishsdk#1482
Additional comments?: