-
Notifications
You must be signed in to change notification settings - Fork 1
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
turing-staging faucet #19
base: master
Are you sure you want to change the base?
Conversation
imstar15
commented
Oct 11, 2022
•
edited
Loading
edited
- Update discord.js version and modify some code to fit it.
- Change to turing-staging chain.
src/bot/actions.js
Outdated
@@ -95,7 +96,7 @@ const dripLater = async (sender, address, time) => { | |||
const { amount } = dripActions[DRIP_TYPE.LATER]; | |||
const { data: { hash, providerId } } = res; | |||
|
|||
return `I will send ${amount} NEU to address ${address} at ${time} UTC. Extrinsic hash: ${hash}. Your provided_id: ${providerId}.`; | |||
return `I will send ${amount} ${tokenSymbol} to address ${address} at ${time} UTC. Extrinsic hash: ${hash}. Your provided_id: ${providerId}.`; |
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 address
in to address ${address}
can be removed.
UTC shouldn’t be needed to type in manually in ${time} UTC
. Try this, moment.utc(value).format("MM-DD HH:mm:ss Z")
, which will translate the timestamp in UTC to a string.
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.
Add one more sentence to the success messsage.
Try out our recurring payment feature on https://ace.web3go.xyz! (Click on Connect at the top right corner to select Turing Staging network)
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.
Fixed
src/bot/actions.js
Outdated
@@ -95,7 +96,7 @@ const dripLater = async (sender, address, time) => { | |||
const { amount } = dripActions[DRIP_TYPE.LATER]; | |||
const { data: { hash, providerId } } = res; | |||
|
|||
return `I will send ${amount} NEU to address ${address} at ${time} UTC. Extrinsic hash: ${hash}. Your provided_id: ${providerId}.`; | |||
return `I will send ${amount} ${tokenSymbol} to address ${address} at ${time} UTC. Extrinsic hash: ${hash}. Your provided_id: ${providerId}.`; | |||
} | |||
|
|||
const dripSwag = async (sender, address) => { |
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.
Remove this hourly drip function completely. We don’t need it, because
a) it’s not really an automation from user’s wallet
b) it will spam our turing staging chain.
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.
Fixed
src/bot/actions.js
Outdated
@@ -120,7 +121,7 @@ const dripSwag = async (sender, address) => { | |||
const { amount } = dripActions[DRIP_TYPE.SWAG]; | |||
const { data: { hash, providerId } } = res; | |||
|
|||
return `For the next 24 hours, I will send ${amount} NEU to address ${address} per hour. Extrinsic hash: ${hash}. Your provided_id: ${providerId}.`; | |||
return `For the next 24 hours, I will send ${amount} ${tokenSymbol} to address ${address} per hour. Extrinsic hash: ${hash}. Your provided_id: ${providerId}.`; | |||
} | |||
|
|||
module.exports = { drip, dripLater, dripSwag }; |
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.
Do not expose dripLater and dripSwag.
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.
Fixed
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.
Looks good to me 👍