DisputableVoting: Extend vote model functionalities#194
Conversation
Codecov Report
@@ Coverage Diff @@
## master #194 +/- ##
==========================================
+ Coverage 32.68% 37.12% +4.44%
==========================================
Files 96 107 +11
Lines 1741 1907 +166
Branches 273 286 +13
==========================================
+ Hits 569 708 +139
- Misses 1172 1199 +27
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
0xGabi
left a comment
There was a problem hiding this comment.
Looking great, I like how you started extending the surface area that app connectors handle, doing more useful data transformations! 🙌
| return this.votingPowerPct(this.nays) | ||
| } | ||
|
|
||
| votingPowerPct(num: string): string { |
| this.script = data.script | ||
| } | ||
|
|
||
| get endDate(): string { |
There was a problem hiding this comment.
Leaving a comment to point a good utility on the Connectors layer.
There was a problem hiding this comment.
It would be nice to have a better way to handle bignumber ops to be honest, a few helpers would be wonderful
There was a problem hiding this comment.
Wonder what you have in mind? Maybe make sense to have a connect-utils, @bpierre what you think?
| readonly challengeDuration: string | ||
|
|
||
| constructor(data: CollateralRequirementData, connector: IDisputableVotingConnector) { | ||
| this.#connector = connector |
There was a problem hiding this comment.
I wonder about having the connector object on every model. Maybe we should only include it on those models that implement queries/subscriptions requests?
There was a problem hiding this comment.
Yes, I wasn't sure about that, but it makes sense, we can have it only if needed
This PR adds the following functionalities for the
Votemodel: