Skip to content

Commit

Permalink
Switch to blockexplorer
Browse files Browse the repository at this point in the history
  • Loading branch information
dabura667 committed Apr 19, 2020
1 parent d17b822 commit 9d87b40
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
8 changes: 3 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1361,9 +1361,7 @@ <h2>Settings <small> making coinb.in even better!</small></h2>
<p class="text-muted">Select which network you'd like to use for key pair generation.</p>
<select class="form-control" id="coinjs_coin">
<option value="bitcoin_mainnet" rel="0x00;0x80;0x05;0x488b21e;0x488ade4;coinb.in;coinb.in">Bitcoin (mainnet)</option>
<option value="bitcoin-cash_mainnet" rel="0x00;0x80;0x05;0x488b21e;0x488ade4;blockdozer.com_bitcoincash;blockdozer.com_bitcoincash">Bitcoin Cash (mainnet)</option>
<option value="litecoin_mainnet" rel="0x30;0xb0;0x32;0x019da462;0x019d9cfe;blockcypher_litecoin;blockcypher_litecoin">Litecoin (mainnet)</option>
<option value="dogecoin_mainnet" rel="0x1e;0x9e;0x16;0x0827421e;0x089944e4;blockcypher_dogecoin;blockcypher_dogecoin">Dogecoin (mainnet)</option>
<option value="bitcoin-cash_mainnet" rel="0x00;0x80;0x05;0x488b21e;0x488ade4;blockexplorer.com_bitcoincash;blockexplorer.com_bitcoincash">Bitcoin Cash (mainnet)</option>
<option value="carboncoin_mainnet" rel="0x2f;0xaf;0x05;0x488b21e;0x488ade4;cryptoid.info_carboncoin;cryptoid.info_carboncoin">Carboncoin (mainnet)</option>
<option value="shadowcash_mainnet" rel="0x3f;0xbf;0x7d;0xee80286a;0xee8031e8;false;false">ShadowCash (mainnet)</option>
<option value="bitcoin_testnet" rel="0x6f;0xef;0xc4;0x043587cf;0x04358394;false;false">Bitcoin (testnet)</option>
Expand Down Expand Up @@ -1420,7 +1418,7 @@ <h2>Settings <small> making coinb.in even better!</small></h2>
<p class="text-muted">Select the network you wish to broadcast the transaction via</p>
<select class="form-control" id="coinjs_broadcast">
<option value="coinb.in">coinb.in (Bitcoin mainnet)</option>
<option value="blockdozer.com_bitcoincash">Blockdozer.com (Bitcoin Cash Mainnet)</option>
<option value="blockexplorer.com_bitcoincash">Blockexplorer.com (Bitcoin Cash Mainnet)</option>
<option value="blockcypher_bitcoinmainnet"> Blockcypher.com (Bitcoin mainnet)</option>
<option value="blockcypher_litecoin"> Blockcypher.com (Litecoin)</option>
<option value="blockcypher_dogecoin"> Blockcypher.com (Dogecoin)</option>
Expand All @@ -1443,7 +1441,7 @@ <h2>Settings <small> making coinb.in even better!</small></h2>
<p class="text-muted">Select the network you wish to retreive your unspent inputs from</p>
<select class="form-control" id="coinjs_utxo">
<option value="coinb.in">coinb.in (Bitcoin mainnet)</option>
<option value="blockdozer.com_bitcoincash">Blockdozer.com (Bitcoin Cash Mainnet)</option>
<option value="blockexplorer.com_bitcoincash">Blockexplorer.com (Bitcoin Cash Mainnet)</option>
<option value="blockcypher_bitcoinmainnet"> Blockcypher.com (Bitcoin mainnet)</option>
<option value="blockcypher_litecoin"> Blockcypher.com (Litecoin)</option>
<option value="blockcypher_dogecoin"> Blockcypher.com (Dogecoin)</option>
Expand Down
4 changes: 2 additions & 2 deletions js/coin.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@

coinjs.isBitcoinCash = function() {
var host = $("#coinjs_broadcast option:selected").val();
return (host == 'blockdozer.com_bitcoincash')
return (host == 'blockexplorer.com_bitcoincash')
}

/* start of hd functions, thanks bip32.org */
Expand Down Expand Up @@ -1389,7 +1389,7 @@
type: "GET",
cache: false,
async: false,
url: "http://blockdozer.com/insight-api/addr/"+utxo_address+"/utxo",
url: "https://bitcoincash.blockexplorer.com/api/addr/"+utxo_address+"/utxo",
dataType: "json",
error: function(data) {
alert('Couldn\'t get values for inputs. Bitcoin Cash will not sign correctly.');
Expand Down
12 changes: 6 additions & 6 deletions js/coinbin.js
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ $(document).ready(function() {

} else if(host=='cryptoid.info_carboncoin'){
listUnspentCryptoidinfo_Carboncoin(redeem);
} else if(host=='blockdozer.com_bitcoincash'){
} else if(host=='blockexplorer.com_bitcoincash'){
listUnspentBlockdozer_bitcoincash(redeem);
} else {
listUnspentDefault(redeem);
Expand Down Expand Up @@ -1162,13 +1162,13 @@ $(document).ready(function() {

}

/* retrieve unspent data from blockdozer.com (no https available) for bitcoin cash */
/* retrieve unspent data from blockexplorer.com for bitcoin cash */
function listUnspentBlockdozer_bitcoincash(redeem) {

$.ajax ({
type: "GET",
cache: false,
url: "http://blockdozer.com/insight-api/addr/"+redeem.addr+"/utxo",
url: "https://bitcoincash.blockexplorer.com/api/addr/"+redeem.addr+"/utxo",
dataType: "json",
error: function(data) {
$("#redeemFromStatus").removeClass('hidden').html('<span class="glyphicon glyphicon-exclamation-sign"></span> Unexpected error, unable to retrieve unspent outputs!');
Expand All @@ -1180,7 +1180,7 @@ $(document).ready(function() {
data = $.parseJSON(json);
}
if((data[0].address && data[0].txid) && data[0].address==redeem.addr){
$("#redeemFromAddress").removeClass('hidden').html('<span class="glyphicon glyphicon-info-sign"></span> Retrieved unspent inputs from address <a href="http://blockdozer.com/insight/address/'+redeem.addr+'" target="_blank">'+redeem.addr+'</a>');
$("#redeemFromAddress").removeClass('hidden').html('<span class="glyphicon glyphicon-info-sign"></span> Retrieved unspent inputs from address <a href="https://bitcoincash.blockexplorer.com/api/address/'+redeem.addr+'" target="_blank">'+redeem.addr+'</a>');
for(var i in data){
var o = data[i];
var tx = ((""+o.txid).match(/.{1,2}/g).reverse()).join("")+'';
Expand Down Expand Up @@ -1387,7 +1387,7 @@ $(document).ready(function() {
$(thisbtn).val('Please wait, loading...').attr('disabled',true);
$.ajax ({
type: "POST",
url: "http://blockdozer.com/insight-api/tx/send",
url: "https://bitcoincash.blockexplorer.com/api/tx/send",
data: {"rawtx":$("#rawTransaction").val()},
dataType: "json",
error: function(data) {
Expand Down Expand Up @@ -2100,7 +2100,7 @@ $(document).ready(function() {
$("#rawSubmitBtn").click(function(){
rawSubmitcryptoid_Carboncoin(this);
});
} else if(host=="blockdozer.com_bitcoincash"){
} else if(host=="blockexplorer.com_bitcoincash"){
$("#rawSubmitBtn").click(function(){
rawSubmitBlockDozer_BitcoinCash(this);
});
Expand Down

0 comments on commit 9d87b40

Please sign in to comment.