Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
🐛 Fix formatBlock invocation in blockchain.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sameersubudhi committed Oct 27, 2023
1 parent 76a81e8 commit f92e00d
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
*/
const { Signals } = require('lisk-service-framework');
const { formatBlock } = require('../../shared/sdk/formatter');
const { formatBlock: formatBlockFromFormatter } = require('../../shared/sdk/formatter');

const appReadyController = async cb => {
const appReadyListener = async payload => cb(payload);
Expand Down Expand Up @@ -51,6 +51,13 @@ const chainValidatorsChangeController = async cb => {
Signals.get('chainValidatorsChanged').add(chainValidatorsChangeListener);
};

const formatBlock = payload =>
formatBlockFromFormatter({
header: payload.blockHeader,
assets: [],
transactions: [],
});

const chainNewBlockController = async cb => {
const chainNewBlockListener = async payload => cb(formatBlock(payload));
Signals.get('chainNewBlock').add(chainNewBlockListener);
Expand Down

0 comments on commit f92e00d

Please sign in to comment.