Skip to content

Commit

Permalink
Fixed rewards display issue. Regression cause by other bug fix (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Vilensky authored Mar 30, 2020
1 parent a1c12aa commit 0c74ca7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/infra/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const createError = (message, func) => ({
const getAbbreviatedText = (address: string, addPrefix: boolean = true, tailSize: number = 4) =>
`${addPrefix && address.indexOf('0x') === -1 ? '0x' : ''}${address.substring(0, tailSize)}...${address.substring(address.length - tailSize, address.length)}`;

const formatTxId = (id) => id && id.substring(0, 6);
const formatTxId = (id) => id && `0x${id.substring(0, 6)}`;

const formatNumber = (num) => num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');

Expand Down
12 changes: 5 additions & 7 deletions desktop/nodeManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,16 @@ class NodeManager {
os.type() === 'Windows_NT'
? `(if exist ${nodeDataFilesPath} rd /s /q ${nodeDataFilesPath}) && (if exist ${logFilePath} del ${logFilePath})`
: `rm -rf ${nodeDataFilesPath} && rm -rf ${logFilePath}`;
exec(command, (err) => {
exec(command, async (err) => {
if (!err) {
StoreService.set({ key: 'genesisTime', value: fetchedGenesisTime });
StoreService.remove({ key: 'miningParams' });
await FileSystemManager.cleanWalletFile();
const nodePathWithParams = `"${nodePath}" --grpc-server --json-server --tcp-port ${port} --config "${tomlFileLocation}" -d "${nodeDataFilesPath}" > "${logFilePath}"`;
exec(nodePathWithParams, async (error) => {
exec(nodePathWithParams, (error) => {
if (error) {
(process.env.NODE_ENV !== 'production' || process.env.DEBUG_PROD === 'true') && dialog.showErrorBox('Smesher Start Error', `${error}`);
console.error(error); // eslint-disable-line no-console
} else {
StoreService.set({ key: 'genesisTime', value: fetchedGenesisTime });
StoreService.remove({ key: 'miningParams' });
await FileSystemManager.cleanWalletFile();
console.log('node started with provided params'); // eslint-disable-line no-console
}
});
} else {
Expand Down

0 comments on commit 0c74ca7

Please sign in to comment.