btc: propagate psbt state through balance component

This commit is contained in:
pkova 2021-04-20 15:45:29 +03:00 committed by ixv
parent e043273446
commit 5d44b596d0
3 changed files with 6 additions and 4 deletions

View File

@ -60,6 +60,7 @@ export default class Balance extends Component {
{this.state.sending ?
<Send
api={api}
psbt={this.props.state.psbt}
shipWallets={this.props.state.shipWallets}
value={value}
denomination={denomination}

View File

@ -73,7 +73,7 @@ export default class Invoice extends Component {
}
render() {
const { stopSending, payee, denomination, denomAmount, satsAmount } = this.props;
const { stopSending, payee, denomination, denomAmount, satsAmount, psbt } = this.props;
const { sent } = this.state;
return (
<>
@ -166,7 +166,7 @@ export default class Invoice extends Component {
borderRadius='24px'
py='24px'
px='24px'
onClick={() => this.sendBitcoin(this.state.masterTicket, store.state.psbt)}
onClick={() => this.sendBitcoin(this.state.masterTicket, psbt)}
disabled={!this.state.ready}
style={{cursor: this.state.ready ? "pointer" : "default"}}
/>

View File

@ -93,14 +93,15 @@ export default class Send extends Component {
render() {
const { api, value, conversion, stopSending, denomination } = this.props;
const { api, value, conversion, stopSending, denomination, psbt } = this.props;
const { denomAmount, satsAmount, signing, payee } = this.state;
return (
<>
{ signing ?
{ (signing && psbt) ?
<Invoice
api={api}
psbt={psbt}
stopSending={stopSending}
payee={payee}
denomination={denomination}