From 1419ec0e6e3db3b8228c9ef64632c0e55d2dbefa Mon Sep 17 00:00:00 2001
From: yjwxfq <112159687+yjwxfq@users.noreply.github.com>
Date: Thu, 15 Aug 2024 14:35:11 +0800
Subject: [PATCH 1/2] Modify the comparison of the length of the initialResults
variable
modify while(initialResults.length >= 2)
---
ibc.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ibc.html b/ibc.html
index 728aea5..8c31645 100644
--- a/ibc.html
+++ b/ibc.html
@@ -133,7 +133,7 @@
IBC DEMO
fetchProgress+=50;
$('.progressDiv').last().html(fetchProgress+"%");
let groupedResults = [];
- while(initialResults.length > 2) groupedResults.push(initialResults.splice(0, 2));
+ while(initialResults.length >= 2) groupedResults.push(initialResults.splice(0, 2));
let tokenPromises = []
for (var result of groupedResults){
const global = result[0][0];
From b5eccf9b2c33b336c3383874a708cd511d3050c2 Mon Sep 17 00:00:00 2001
From: yjwxfq <112159687+yjwxfq@users.noreply.github.com>
Date: Mon, 23 Dec 2024 16:31:22 +0800
Subject: [PATCH 2/2] Update ibc.html for converting the transaction_id to
uppercase when comparing.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Because the transaction_id returned from proof server is in uppercase format,but it maybe is in lowercase format retured from leap.
---
ibc.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ibc.html b/ibc.html
index 8c31645..8fe6fdd 100644
--- a/ibc.html
+++ b/ibc.html
@@ -622,7 +622,7 @@ IBC DEMO
ws.addEventListener('message', (event) => {
const res = JSON.parse(event.data);
console.log("res",res)
- const firhoseTx = res.txs.find(r=>r.find(s=>s.transactionId === transaction_id));
+ const firhoseTx = res.txs.find(r=>r.find(s=>s.transactionId === transaction_id.toUpperCase()));
console.log("firhoseTx",firhoseTx)
const firehoseEmitxfer = firhoseTx.find(r=>r.action.name==='emitxfer');
console.log("firehoseEmitxfer",firehoseEmitxfer)