Skip to content

Commit

Permalink
fix: use the steemApi config option
Browse files Browse the repository at this point in the history
  • Loading branch information
Jblew committed Dec 6, 2018
1 parent 6d38cc0 commit 37b0176
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CMD ["wise daemon"]

##§ '\n' + data.config.docker.generateDockerfileFrontMatter(data) + '\n' §##
LABEL maintainer="The Wise Team (https://wise-team.io/) <[email protected]>"
LABEL vote.wise.wise-version="3.0.4"
LABEL vote.wise.wise-version="3.0.5"
LABEL vote.wise.license="MIT"
LABEL vote.wise.repository="steem-wise-cli"
##§ §.##
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "steem-wise-cli",
"version": "3.0.4",
"version": "3.0.5",
"description": "Vote delegation system for STEEM blockchain: cli tool for delegators",
"main": "dist/app.js",
"bin": {
Expand All @@ -15,7 +15,7 @@
"js-yaml": "^3.12.0",
"lodash": "^4.17.11",
"prompt": "^1.0.0",
"steem-wise-core": "^3.0.4"
"steem-wise-core": "^3.0.5"
},
"devDependencies": {
"@types/bluebird": "^3.5.24",
Expand Down Expand Up @@ -67,4 +67,4 @@
"bugs": {
"url": "https://github.com/wise-team/steem-wise-cli/issues"
}
}
}
2 changes: 1 addition & 1 deletion src/actions/DaemonAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class DaemonAction {
return Promise.resolve()
.then(() => ConfigLoader.askForCredentialsIfEmpty(config))
.then(() => {
api = new DirectBlockchainApi(Wise.constructDefaultProtocol(), config.postingWif);
api = new DirectBlockchainApi(Wise.constructDefaultProtocol(), config.postingWif, { url: config.steemApi });
if (config.disableSend) api.setSendEnabled(false);
delegatorWise = new Wise(config.username, api);
})
Expand Down
6 changes: 3 additions & 3 deletions src/actions/DownloadRulesAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class DownloadRulesAction {
})
.then((account: string) => {
console.log("Downloading rules set by @" + account + "...");
return DownloadRulesAction.downloadRules(account);
return DownloadRulesAction.downloadRules(account, config);
})
.then((result: EffectuatedSetRules []): Promise<string> => {
const rulesWithoutMoment = result.map(esr => {
Expand Down Expand Up @@ -59,8 +59,8 @@ export class DownloadRulesAction {
});
}

private static downloadRules(username: string): Promise<EffectuatedSetRules []> {
const delegatorWise = new Wise(username, new DirectBlockchainApi(Wise.constructDefaultProtocol()));
private static downloadRules(username: string, config: Config): Promise<EffectuatedSetRules []> {
const delegatorWise = new Wise(username, new DirectBlockchainApi(Wise.constructDefaultProtocol(), "", { url: config.steemApi }));
return delegatorWise.downloadAllRulesets(username);
}

Expand Down
2 changes: 1 addition & 1 deletion src/actions/SendVoteorderAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class SendVoteorderAction {
console.log(JSON.stringify(voteorder));
if (!voteorder.delegator || voteorder.delegator.length == 0) throw new Error("You must specify delegator in voteorder JSON");

const api: DirectBlockchainApi = new DirectBlockchainApi(Wise.constructDefaultProtocol(), config.postingWif);
const api: DirectBlockchainApi = new DirectBlockchainApi(Wise.constructDefaultProtocol(), config.postingWif, { url: config.steemApi });
if (config.disableSend) api.setSendEnabled(false);
const wise = new Wise(config.username, api);

Expand Down
2 changes: 1 addition & 1 deletion src/actions/UploadRulesAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class UploadRulesAction {
if (!element.rulesets) return Promise.reject(new Error("Rulesets should be specified for each voter"));
});

const api: DirectBlockchainApi = new DirectBlockchainApi(Wise.constructDefaultProtocol(), config.postingWif);
const api: DirectBlockchainApi = new DirectBlockchainApi(Wise.constructDefaultProtocol(), config.postingWif, { url: config.steemApi });
if (config.disableSend) api.setSendEnabled(false);
const delegatorWise = new Wise(config.username, api);

Expand Down

0 comments on commit 37b0176

Please sign in to comment.