Skip to content

Commit

Permalink
Changes for GUNBOT 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
BeerK0in committed May 12, 2017
1 parent 549b666 commit a566100
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions __tests__/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const parameters = require('../generators/app/parameters');
const defaultValues = require('../generators/app/defaultValues.js');

const promptsParamsInit = {
apiKey: 'this is the apikey',
apiSecret: 'this is the apiSecret',
poloniexApiKey: 'this is the poloniexApiKey',
poloniexApiSecret: 'this is the poloniexApiSecret',
btcTradingLimit: '123',
strategy: 'BB',
currencies: ['ABC', 'DEF', 'JKL', 'XYZ'],
Expand All @@ -17,8 +17,8 @@ const promptsParamsInit = {

const promptsParamsAdd = {
currencyToAdd: 'MNO',
apiKey: 'this is the apikey',
apiSecret: 'this is the apiSecret',
poloniexApiKey: 'this is the poloniexApiKey',
poloniexApiSecret: 'this is the poloniexApiSecret',
btcTradingLimit: '987',
strategy: 'GAIN',
startCurrencyToAdd: true
Expand All @@ -35,8 +35,8 @@ describe('generator-gunbot:app init', () => {
.withOptions({skipInstall: true})
.withArguments(['init'])
.withPrompts({
apiKey: promptsParamsInit.apiKey,
apiSecret: promptsParamsInit.apiSecret,
poloniexApiKey: promptsParamsInit.poloniexApiKey,
poloniexApiSecret: promptsParamsInit.poloniexApiSecret,
btcTradingLimit: promptsParamsInit.btcTradingLimit,
buyStrategy: promptsParamsInit.strategy,
sellStrategy: promptsParamsInit.strategy,
Expand Down Expand Up @@ -96,8 +96,8 @@ describe('generator-gunbot:app add', () => {
return helpers.run(path.join(__dirname, '../generators/app'))
.withArguments(['add'])
.withPrompts({
apiKey: promptsParamsAdd.apiKey,
apiSecret: promptsParamsAdd.apiSecret,
poloniexApiKey: promptsParamsAdd.poloniexApiKey,
poloniexApiSecret: promptsParamsAdd.poloniexApiSecret,
btcTradingLimit: promptsParamsAdd.btcTradingLimit,
currencyToAdd: promptsParamsAdd.currencyToAdd,
startCurrencyToAdd: promptsParamsAdd.startCurrencyToAdd
Expand Down
8 changes: 4 additions & 4 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ module.exports = class extends Generator {
{
when: () => this.options.action === 'init',
type: 'input',
name: 'apiKey',
name: 'poloniexApiKey',
message: '[POLONIEX_KEY] Your Poloniex API key:',
store: true
}, {
when: () => this.options.action === 'init',
type: 'password',
name: 'apiSecret',
name: 'poloniexApiSecret',
message: '[POLONIEX_SECRET] Your Poloniex API secret:',
store: true
}, {
Expand Down Expand Up @@ -267,8 +267,8 @@ module.exports = class extends Generator {
this.fs.copyTpl(
this.templatePath('ALLPAIRS-params.js'),
this.destinationPath('ALLPAIRS-params.js'), {
apiKey: this.props.apiKey,
apiSecret: this.props.apiSecret,
poloniexApiKey: this.props.poloniexApiKey,
poloniexApiSecret: this.props.poloniexApiSecret,
btcTradingLimit: this.props.btcTradingLimit || defaultValues.btcTradingLimit,
buyStrategy: this.props.buyStrategy || defaultValues.buyStrategy,
sellStrategy: this.props.sellStrategy || defaultValues.sellStrategy,
Expand Down
4 changes: 2 additions & 2 deletions generators/app/templates/ALLPAIRS-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ var config = {
KRAKEN_VWA_2_INTERVAL: 15, // weighted average interval in minutes

//---POLONIEX
POLONIEX_KEY: '<%= apiKey %>',
POLONIEX_SECRET: '<%= apiSecret %>',
POLONIEX_KEY: '<%= poloniexApiKey %>',
POLONIEX_SECRET: '<%= poloniexApiSecret %>',

POLONIEX_PRICE_METHOD: 'vwa', // ohlc OR vwa 'price to buy' definition method.
POLONIEX_VWA_1_INTERVAL: 0.02, // Weighted average interval in hours.
Expand Down

0 comments on commit a566100

Please sign in to comment.