Skip to content

Commit

Permalink
fix: disable add fund (tmp)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebulis committed Oct 26, 2020
1 parent 3cbfbda commit 77168f4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/implementations/wallet/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { highlight } from "../../utils";
import fs from "fs";
import { CreateWalletCommand } from "../../commands/wallet/wallet.type";
import { progress as defaultProgress } from "../../implementations/utils/progress";
import fetch from "node-fetch";

export const create = async ({
fund,
Expand All @@ -25,12 +24,13 @@ export const create = async ({
fs.writeFileSync(outputPath, json);

if (fund === "ropsten") {
const response = await fetch(`https://faucet.ropsten.be/donate/${wallet.address}`).then((res) => res.json());
if (response.message) {
signale.warn(`[ropsten] Adding fund to ${wallet.address} failed: ${response.message}`);
} else {
signale.info(`[ropsten] Added fund to ${wallet.address}`);
}
// const response = await fetch(`https://faucet.ropsten.be/donate/${wallet.address}`).then((res) => res.json());
// if (response.message) {
// signale.warn(`[ropsten] Adding fund to ${wallet.address} failed: ${response.message}`);
// } else {
// signale.info(`[ropsten] Added fund to ${wallet.address}`);
// }
signale.warn(`[ropsten] https://faucet.ropsten.be is down. Adding fund is disabled.`);
}
signale.info(`Wallet with public address ${highlight(wallet.address)} successfully created. Find more details:`);

Expand Down

0 comments on commit 77168f4

Please sign in to comment.