Skip to content

Commit

Permalink
Revert "remove express faucet (#36)"
Browse files Browse the repository at this point in the history
This reverts commit e1af0f2.
  • Loading branch information
hoonsubin committed Apr 11, 2022
1 parent e1af0f2 commit 0a33aea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/clients/express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ export const expressApp = async (apis: NetworkApis) => {
// parse the faucet drip destination
const address: string = req.body.destination as string;
// todo: refactor this to implement the command pattern
//let hash = '';
/*
let hash = '';
// i know this is not a clean solution :(
switch (network) {
case Network.astar:
Expand All @@ -69,8 +68,7 @@ export const expressApp = async (apis: NetworkApis) => {
}

return res.status(200).json({ hash });
*/
return res.status(403).json({ code: 403, error: 'Faucet no longer supported' });

// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (e: any) {
console.error(e);
Expand Down
8 changes: 8 additions & 0 deletions src/config/appConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
"type": 3,
"required": true,
"choices": [
{
"name": "Astar",
"value": "astar"
},
{
"name": "Shiden",
"value": "shiden"
},
{
"name": "Shibuya",
"value": "shibuya"
Expand Down

0 comments on commit 0a33aea

Please sign in to comment.