Skip to content
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

More tests #12

Closed
wants to merge 6 commits into from
Closed

More tests #12

wants to merge 6 commits into from

Conversation

michielbdejong
Copy link
Contributor

No description provided.

@michielbdejong michielbdejong changed the base branch from mj-fixes to master November 28, 2017 14:46
src/index.js Outdated
return Promise.resolve()
const promises = []
if (this.config.btp) {
promises.push(this.pluginFactory.stop())

Choose a reason for hiding this comment

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

If there's only one promise, why use an array and Promise.all()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree it's currently superfluous, but I did it this way for symmetry with the start() function. Also in case we want to add a this.removePlugin function in the future.

appliesToPrefix: curve.prefix,
sourceHoldDuration: 15000,
expiresAt: new Date(Date.now() + 3600 * 1000)
return Promise.resolve().then(() => {

Choose a reason for hiding this comment

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

What is the reason for this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

That's not what I mean.

return Promise.resolve().then(() => {
    return Promise.resolve(foo)
})

is redundant. You can just return Promise.resolve(foo) for the same effect.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

corrected.

})
} else {
this.main.getPlugin(prefix).rejectIncomingTransfer(transfer, {
code: 'L53',

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really I think, which one were you thinking of?

Choose a reason for hiding this comment

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

I didn't have one in mind, but the "L" prefix isn't used anywhere afaik. It should either be "F", "T", or "R" depending on what type of error it is. And probably 99 to indicate it is an application error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This code no longer exists.

@michielbdejong
Copy link
Contributor Author

michielbdejong commented Feb 23, 2018

Comments addressed and changes merged in #22

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.

2 participants