Skip to content

Commit

Permalink
Indexer bug
Browse files Browse the repository at this point in the history
File names of certain lengths are excluded from the Stamp indexer. 4-letter are confirmed to be ok. Temporarily force 4 letter file names to mitigate bug. To be removed once indexer is fixed.
  • Loading branch information
Jpja committed Mar 4, 2024
1 parent 682ff2d commit 01dde05
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion olga_stamp.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
out += '<b>Success!</b>'
out += '<br>Make sure all details are correct.';
if (network == 'testnet') out += '<br><b>Network Testnet</b>'
out += '<br>Input coin ' + inp_utxo;
out += '<br>Input coin ' + utxo;
out += '<br>Burn ₿' + sat_to_btc(sum_dust);
out += '<br>Token ' + inp_name;
out += '<br>Supply ' + parseInt(inp_supply);
Expand Down Expand Up @@ -244,6 +244,17 @@ <h1>OLGA STAMP MINTER</h1>
}
//document.getElementById("input_text").value = 'STAMP:' + file_name;
file_size = file_hex.length / 2;

//TEMPORARY INDEXER BUG
//File names of certain lengths are excluded from the Stamp indexer.
//Until this is fixed, truncate names.
//We know "derp.png" is accepted so force 4 letter name and 3 letter extension (ie jpeg -> jpg)
//Remove this as soon as the bug is fixed.
file_name = file_name.toLowerCase();
file_name = file_name.replace('.jpeg','.jpg');
file_name = file_name.slice(0,4) + file_name.slice(-4);
file_name = file_name.padStart(8, 'x');

description_text= 'STAMP:' + file_name;
};
fr.readAsBinaryString(this.files[0]);
Expand Down

0 comments on commit 01dde05

Please sign in to comment.