CounterpartyXCP / counterwallet

Counterparty web wallet
https://counterwallet.io
147 stars 162 forks source link

Enable BTC history on testnet and fix it on mainnet #809

Open unsystemizer opened 7 years ago

unsystemizer commented 7 years ago

https://github.com/CounterpartyXCP/counterwallet/blob/master/src/js/components/history.js#L6 - it says here that BTC on History page can't be shown. We should consider enabling it, as testnet CW is very useful for troubleshooting.

In https://github.com/CounterpartyXCP/counterwallet/blob/master/src/js/components/history.js#L38 I see we use blockchain.info. I checked my history and it's not working. It could be this: http://bitcoin.stackexchange.com/questions/46766/cannot-check-balance-with-blockchain-info-api.

Because it (according to the above URL) requires node.js, I suggest we make it simple and change the both to Bitcoin Core or BlockTrail's BTC/tBTC explorer. Since an API key is still required for the latter, we could add a CW configuration setting for this Web API key.

$.get('https://api.blocktrail.com/v1/BTC/address/1NcXPMRaanz43b1kokpPuYDdk6GGDvxT2T/transactions?api_key=MY_APIKEY',
    function(address_txs) {});

Reference: https://www.blocktrail.com/api/docs/lang/jquery#api_data

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40639562-enable-btc-history-on-testnet-and-fix-it-on-mainnet?utm_campaign=plugin&utm_content=tracker%2F542579&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F542579&utm_medium=issues&utm_source=github).