diff --git a/src/botPage/view/LogTable.js b/src/botPage/view/LogTable.js index b8f413afb1..622f1e6f65 100644 --- a/src/botPage/view/LogTable.js +++ b/src/botPage/view/LogTable.js @@ -53,7 +53,7 @@ export default class LogTable extends Component { if (!Object.keys(log).length) { return; } - this.setState(appendRow(log, this.state)); + this.setState(appendRow(log, this.state, true)); } }); } diff --git a/src/botPage/view/shared.js b/src/botPage/view/shared.js index e0e28d4743..1f39d86ca6 100644 --- a/src/botPage/view/shared.js +++ b/src/botPage/view/shared.js @@ -25,15 +25,23 @@ export const createScope = () => { return { observer, api, ticksService, symbolApi }; }; -export const appendRow = (trade, state) => ({ +export const appendRow = (trade, state, isDesc = false) => ({ id : state.id + 1, - rows: [ - ...state.rows, - { - ...trade, - id: state.id + 1, - }, - ], + rows: isDesc + ? [ + { + ...trade, + id: state.id + 1, + }, + ...state.rows, + ] + : [ + ...state.rows, + { + ...trade, + id: state.id + 1, + }, + ], }); export const updateRow = (prevRowIndex, trade, state) => ({