Skip to content

Conversation

@Gamboster
Copy link

Delete unnecessary requires
Clean and fix types for all current models

@Gamboster Gamboster changed the title Clean code and types fixes for models Clean code and type fixes for models Mar 29, 2019
}

sign = function(copayerId, signatures, xpub) {
sign = (copayerId, signatures, xpub) => {
Copy link
Owner

Choose a reason for hiding this comment

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

sign(...) {

Copy link
Author

Choose a reason for hiding this comment

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

Done

};
}

setBroadcasted = function() {
Copy link
Owner

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) {

Copy link
Author

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) => {
Copy link
Owner

Choose a reason for hiding this comment

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

static create(opts) {

Copy link
Author

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[];
Copy link
Owner

Choose a reason for hiding this comment

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

why any?

Copy link
Author

@Gamboster Gamboster Mar 29, 2019

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);
Copy link
Owner

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

Copy link
Author

Choose a reason for hiding this comment

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

Done

rastajpa and others added 19 commits April 1, 2019 11:09
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
@Gamboster Gamboster force-pushed the micahriggan/feature/bws-ts-2 branch from 287befc to ce1803a Compare April 2, 2019 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants