From 387729a9ec65099c6b3ec210c768b1e1bd45b55b Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Sat, 11 May 2019 11:07:29 -0700 Subject: [PATCH] fix: all program ids of a transaction are now searchable --- api/inbound-stream.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/inbound-stream.js b/api/inbound-stream.js index bd593d63..9d13fd63 100644 --- a/api/inbound-stream.js +++ b/api/inbound-stream.js @@ -243,18 +243,18 @@ class RedisHandler { commands.push(['sadd', `!ent-txn:${message.hash}`, tx.id]); commands.push(['lpush', '!txn-timeline', txnMsg]); - if (tx.instructions.length > 0) { + tx.instructions.forEach(instruction => { commands.push([ 'lpush', - `!txns-by-prgid-timeline:${tx.instructions[0].program_id}`, + `!txns-by-prgid-timeline:${instruction.program_id}`, txnMsg, ]); commands.push([ 'publish', - `@program_id:${tx.instructions[0].program_id}`, + `@program_id:${instruction.program_id}`, txnMsg, ]); - } + }); }); if (txCount > 0) {