Skip to content

Commit

Permalink
reintroduced the if statement so that paraId query param works when c…
Browse files Browse the repository at this point in the history
…onnected to parachain
  • Loading branch information
Imod7 committed Jan 15, 2024
1 parent aee1c85 commit bd35e99
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/services/blocks/XCMDecoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,22 @@ export class XcmDecoder {
data.horizontalMessages.forEach((msgs, index) => {
msgs.forEach((msg) => {
const xcmMessageDecoded = this.decodeMsg(api, msg.data.slice(1));
const horizontalMessage: IHorizontalMessage = {
sentAt: msg.sentAt,
paraId: index,
data: xcmMessageDecoded,
};
xcmMessages.horizontalMessages?.push(horizontalMessage);
let horizontalMessage: IHorizontalMessage;
if (paraId !== undefined && index.toString() === paraId) {
horizontalMessage = {
sentAt: msg.sentAt,
paraId: index,
data: xcmMessageDecoded,
};
xcmMessages.horizontalMessages?.push(horizontalMessage);
} else if (paraId === undefined) {
horizontalMessage = {
sentAt: msg.sentAt,
paraId: index,
data: xcmMessageDecoded,
};
xcmMessages.horizontalMessages?.push(horizontalMessage);
}
});
});
}
Expand Down

0 comments on commit bd35e99

Please sign in to comment.