WebOfTrustInfo / btcr-tx-playground.github.io

https://weboftrustinfo.github.io/btcr-tx-playground.github.io/
MIT License
4 stars 8 forks source link

Current Coinb.in Playground not resolving TXREF, possible Explorer problem? #33

Open ChristopherA opened 4 years ago

ChristopherA commented 4 years ago

The three example, and old TXREF xyv2-xzyq-qqm5-tyke should at least resolve to the implicit DDO.

However, the current the coinb.in playground stalls. Could be the link to the explorer? We may want to move to Blockstream.info as there is no API key required there.

-- Christopher Allen

hawkmauk commented 4 years ago

The call to the btcrDidUtils.js script is causing an error here. I've fixed that and published the site at https://hawkmauk.github.io/btcr-tx-playground.github.io/ but am getting some cross-site scripting errors that are being caused by btcrDidUtils.js. Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.blockcypher.com/v1/btc/test3/blocks/1152194?txstart=1&limit=1. (Reason: missing token ‘user-agent’ in CORS header ‘Access-Control-Allow-Headers’ from CORS preflight channel). @kimdhamilton did you encounter this with the previous version of the site?

ChristopherA commented 4 years ago

I vaguely recall she hit rate limits. Blockstream.info currently has no rate limits

hawkmauk commented 4 years ago

I think I've found the root of the issue. There is a variable called unsafeHeaders that should include 'user-agent'. This is in the btcrDidUtils.js file and looks to be pulled in from another package when it's browserified. I'll put a workaround in and see if it can be fixed upstream.

hawkmauk commented 4 years ago

34 has been merged with the fixes for this. Can you verify and then close if your happy it's been resolved please.