Browse Source

preparation

master
yuriy0803 2 years ago
parent
commit
0f00f313cc
  1. 16
      www/app/helpers/format-ethinr.js
  2. 16
      www/app/helpers/format-ethusd.js
  3. 109
      www/config/environment.js

16
www/app/helpers/format-ethinr.js

@ -0,0 +1,16 @@
import Ember from 'ember';
export function formatEthInr(params) {
let value = params[0];
let ethinr = params[1];
let valueeth = value * 0.000000001;
let inr = valueeth * ethinr;
if (isNaN(inr)) {
return '';
}
return "?" + inr.toFixed(2);
}
export default Ember.Helper.helper(formatEthInr);

16
www/app/helpers/format-ethusd.js

@ -0,0 +1,16 @@
import Ember from 'ember';
export function formatEthUsd(params) {
let value = params[0];
let ethinr = params[1];
let valueeth = value * 0.000000001;
let inr = valueeth * ethinr;
if (isNaN(inr)) {
return '';
}
return "$" + inr.toFixed(2);
}
export default Ember.Helper.helper(formatEthUsd);

109
www/config/environment.js

@ -1,70 +1,71 @@
/* jshint node: true */ /* jshint node: true */
module.exports = function(environment) { module.exports = function (environment) {
var ENV = { var ENV = {
modulePrefix: 'open-etc-pool', modulePrefix: 'open-etc-pool',
environment: environment, environment: environment,
rootURL: '/', rootURL: '/',
locationType: 'hash', locationType: 'hash',
EmberENV: { EmberENV: {
FEATURES: { FEATURES: {
// Here you can enable experimental features on an ember canary build // Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true // e.g. 'with-controller': true
} }
}, },
APP: {
// API host and port
ApiUrl: '//192.168.178.27/',
// HTTP mining endpoint APP: {
HttpHost: 'http://192.168.178.27', // API host and port
HttpPort: 8888, ApiUrl: '//192.168.178.27/',
// Stratum mining endpoint // HTTP mining endpoint
StratumHost: 'example.net', HttpHost: 'http://192.168.178.27',
StratumPort: 8008, HttpPort: 8888,
// The ETC network // Stratum mining endpoint
Unit: 'ETC', StratumHost: 'example.net',
StratumPort: 8008,
// Fee and payout details // The ETC network
PoolFee: '1%', Unit: 'ETC',
PayoutThreshold: '0.5 ETC', Currency: 'USD',
BlockReward: 2.56,
// For network hashrate (change for your favourite fork) // Fee and payout details
BlockTime: 13.2 PoolFee: '1%',
} PayoutThreshold: '0.5 ETC',
}; BlockReward: 2.56,
if (environment === 'development') { // For network hashrate (change for your favourite fork)
/* Override ApiUrl just for development, while you are customizing BlockTime: 13.2
frontend markup and css theme on your workstation.
*/
ENV.APP.ApiUrl = 'http://localhost:8080/'
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true;
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
// ENV.APP.LOG_VIEW_LOOKUPS = true;
} }
};
if (environment === 'test') { if (environment === 'development') {
// Testem prefers this... /* Override ApiUrl just for development, while you are customizing
ENV.locationType = 'none'; frontend markup and css theme on your workstation.
*/
ENV.APP.ApiUrl = 'http://localhost:8080/'
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true;
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
// ENV.APP.LOG_VIEW_LOOKUPS = true;
}
// keep test console output quieter if (environment === 'test') {
ENV.APP.LOG_ACTIVE_GENERATION = false; // Testem prefers this...
ENV.APP.LOG_VIEW_LOOKUPS = false; ENV.locationType = 'none';
ENV.APP.rootElement = '#ember-testing'; // keep test console output quieter
} ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false;
if (environment === 'production') { ENV.APP.rootElement = '#ember-testing';
}
} if (environment === 'production') {
return ENV; }
};
return ENV;
};

Loading…
Cancel
Save