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

turing-staging faucet #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

turing-staging faucet #19

wants to merge 2 commits into from

Conversation

imstar15
Copy link
Member

@imstar15 imstar15 commented Oct 11, 2022

  1. Update discord.js version and modify some code to fit it.
  2. Change to turing-staging chain.

image

@@ -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}.`;
Copy link
Member

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.

Copy link
Member

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)

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@@ -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 };
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Member

@chrisli30 chrisli30 left a 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 👍

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