Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ibc.html for converting the transaction_id to uppercase when comparing. #5

Open
wants to merge 4 commits into
base: mainnets
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions ibc.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h3 class="text-center">IBC DEMO</h3>
nodeUrl: 'https://jungle4.api.eosnation.io', //api supporting send_transaction2
txExplorer: 'https://jungle4.eosq.eosnation.io/tx',
name: "jungle4",
label: "Jungle 4 Testnet",
label: "Jungle4 (EOS) Testnet",
proofSocket: "wss://jungle4-ibc.goldenplatform.com",
bridgeContract:"antelopeibc2",
wrapLockContractsArray: ["antelopewlk1", "antelopewlk2", "antelopewlk3", "antelopewlk4"],
Expand All @@ -99,7 +99,7 @@ <h3 class="text-center">IBC DEMO</h3>
nodeUrl: 'https://kylin.api.eosnation.io', //api supporting send_transaction2
txExplorer: 'https://kylin.eosq.eosnation.io/tx',
name: "kylin",
label: "Kylin Testnet",
label: "Kylin (EOS) Testnet",
proofSocket: "wss://kylin-ibc.goldenplatform.com",
bridgeContract:"antelopeibc2",
wrapLockContractsArray: ["antelopewlk1", "antelopewlk2", "antelopewlk3", "antelopewlk4"],
Expand Down Expand Up @@ -133,7 +133,7 @@ <h3 class="text-center">IBC DEMO</h3>
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];
Expand Down Expand Up @@ -560,12 +560,12 @@ <h3 class="text-center">IBC DEMO</h3>
}


return pushGurantee(chain, obj, retry_trx_num_blocks); //if waiting for lib
return pushGuarantee(chain, obj, retry_trx_num_blocks); //if waiting for lib
}


//Add retry logic and waiting for blocks to send_transaction, to emulate send_transaction2 retry_trx_num_blocks
const pushGurantee = async (chain, packedTx, retry_trx_num_blocks ) => new Promise(async resolve=>{
const pushGuarantee = async (chain, packedTx, retry_trx_num_blocks ) => new Promise(async resolve=>{
let tx;
try{
tx = await $.post(`${chain.nodeUrl}/v1/chain/send_transaction`, JSON.stringify(packedTx));
Expand Down Expand Up @@ -622,7 +622,7 @@ <h3 class="text-center">IBC DEMO</h3>
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)
Expand Down Expand Up @@ -696,4 +696,4 @@ <h3 class="text-center">IBC DEMO</h3>
.box{ padding:16px; border:1px solid #64646d;margin-top:44px; }
.box > div, #status > div{ display:flex; justify-content: space-between; }
</style>
</html>
</html>