-
Notifications
You must be signed in to change notification settings - Fork 0
Clean code and type fixes for models #16
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
base: feature/bws-ts
Are you sure you want to change the base?
Clean code and type fixes for models #16
Conversation
| } | ||
|
|
||
| sign = function(copayerId, signatures, xpub) { | ||
| sign = (copayerId, signatures, xpub) => { |
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.
sign(...) {
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.
Done
| }; | ||
| } | ||
|
|
||
| setBroadcasted = function() { |
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.
All methods should be method(args) {
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.
Done
| comment: string; | ||
|
|
||
| static create = function(opts) { | ||
| static create = (opts) => { |
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.
static create(opts) {
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.
Done
| singleAddress: boolean; | ||
| status: string; | ||
| publicKeyRing: string[]; | ||
| publicKeyRing: 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.
why 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.
Here, if we do this:
this.publicKeyRing = _.map(this.copayers, (copayer) => { return _.pick(copayer, ['xPubKey', 'requestPubKey']); });
We get something like: Array<{xPubKey: string, requestPubKey: string}>
so string[] is not quite right .. That’s why I had put any[]
We could use Array<{xPubKey: string, requestPubKey: string}> to be more specific
^ Done
| id: copayerId | ||
| }); | ||
| getCopayer(copayerId): Copayer { | ||
| return _.find(this.copayers, (c) => c.id == copayerId); |
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.
could we just do this.copayers.find
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.
Done
… settings in readme docs
Fix (BWS Docs) - removed testnet in bitcore config requirement in README
[insight-previous] FIX: UI fixes for invalid txs
…Messages Fix: add Deprecated server messages
fix push notification server start
…itcore-node-http-port
…ode-http-port Adding ENV for http port
Relative readme file links
287befc to
ce1803a
Compare
Delete unnecessary requires
Clean and fix types for all current models