diff --git a/src/views/reverse/reverseActions.js b/src/views/reverse/reverseActions.js index 51344a4..96fdd74 100644 --- a/src/views/reverse/reverseActions.js +++ b/src/views/reverse/reverseActions.js @@ -127,8 +127,10 @@ const broadcastClaim = (currency, claimTransaction, cb) => { }) .then(() => cb()) .catch(error => { - window.alert(`Failed to broadcast claim transaction`); - dispatch(reverseSwapResponse(false, error.data)); + const message = error.response.data.error; + + window.alert(`Failed to broadcast claim transaction: ${message}`); + dispatch(reverseSwapResponse(false, message)); }); }; }; diff --git a/src/views/swap/steps/inputInvoice.js b/src/views/swap/steps/inputInvoice.js index 715f4c6..2dcdfce 100644 --- a/src/views/swap/steps/inputInvoice.js +++ b/src/views/swap/steps/inputInvoice.js @@ -4,7 +4,11 @@ import injectSheet from 'react-jss'; import { FaBolt } from 'react-icons/fa'; import View from '../../../components/view'; import InputArea from '../../../components/inputarea'; -import { getCurrencyName, getSampleInvoice } from '../../../scripts/utils'; +import { + getCurrencyName, + getSampleInvoice, + toSatoshi, +} from '../../../scripts/utils'; const InputInvoiceStyles = () => ({ wrapper: { @@ -38,7 +42,7 @@ class StyledInputInvoice extends React.Component { const { swapInfo, webln } = this.props; if (webln) { - webln.makeInvoice(swapInfo.quoteAmount).then(response => { + webln.makeInvoice(toSatoshi(swapInfo.quoteAmount)).then(response => { const invoice = response.paymentRequest; this.setState({ value: invoice });