-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add command "withdraw" #21
Conversation
@Petrucheqa Please reference the "Add withdraw command" issue in your PR message :) |
@@ -25,6 +25,7 @@ | |||
"request": "^2.81.0" | |||
}, | |||
"devDependencies": { | |||
"nodemon": "^1.12.1" | |||
"nodemon": "^1.12.1", | |||
"standard": "*" |
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.
What is the utility of the "standard" dependency ?
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.
It's a linter and code fixer, it works without configuration.
const NO_COMMA_TEXT = 'Please avoid "," in your amount and use "."' | ||
const NEED_ADDRESS_TEXT = 'Need an address as a third argument' | ||
const NO_FUNDS = 'You dont have doge to transfer.' | ||
const NOT_ENOUGH_FUNDS = 'Not enough funds for this transfer. Please add some dogecoins.' |
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 think we could move theses const to the message file, since some of them are already used somewhere else in the app
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.
Start new issue ?
if (amount.indexOf(',') >= 0) { | ||
message.reply(NO_COMMA_TEXT) | ||
return | ||
} |
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.
This code that verify that we have a proper amount should be in a verifyAmount
function and also be used in tip
. This function would be tested to be sure we have the proper amount format.
if (!toAddress) { | ||
message.reply(NEED_ADDRESS_TEXT) | ||
return | ||
} |
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.
Should we verify that it would be a proper Dogecoin address ? Or is the sendFrom
command would reject this if not a proper dogecoin address ?
This need to be rebased with the development branch and we can merge it. |
fea7bef
to
8aec63c
Compare
8aec63c
to
bab2f98
Compare
Implementation of withdraw command, see #6