How to use the unchained-bitcoin.satoshisToBitcoins function in unchained-bitcoin

To help you get started, we’ve selected a few unchained-bitcoin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github unchained-capital / caravan / src / components / Spend / OutputsForm.jsx View on Github external
async initialOutputState() {
    await this.getFeeEstimate();
    const {inputsTotalSats, fee, setOutputAmount} = this.props;
    const feeSats = bitcoinsToSatoshis(new BigNumber(fee));
    const outputAmount = satoshisToBitcoins(inputsTotalSats.minus(feeSats));
    setOutputAmount(1, outputAmount.toFixed(8));
  }
github unchained-capital / caravan / src / components / Spend / OutputsForm.jsx View on Github external
inputsTotal = () => {
    const {inputsTotalSats} = this.props;
    return satoshisToBitcoins(inputsTotalSats);
  }