UNPKG

@bpanel/price

Version:

Fetch BTC-fiat exchange rate and add to app store.

24 lines (23 loc) 664 B
'use strict'; function options() { // bpanel endpoints var nodePath = '/bcoin'; var walletPath = '/bwallet'; var curlPath = '/curl'; // determine the port and ssl usage var protocol = window.location.protocol; var hostname = window.location.hostname; var port = window.location.port; var ssl = false; // use https and http ports when the window doesn't render them if (port === '') protocol === 'https:' ? port = '443' : port = '80'; if (protocol === 'https:') ssl = true; return { bpanelPort: parseInt(port, 10), ssl: ssl, hostname: hostname, nodePath: nodePath, walletPath: walletPath, curlPath: curlPath }; }