btc: reset psbt state on exit from sending flow

This fixes trying to access beyond buffer length errors.
This commit is contained in:
pkova 2021-04-22 15:54:31 +03:00 committed by ixv
parent bdf64a9613
commit 89b7a24109
2 changed files with 5 additions and 2 deletions

View File

@ -66,7 +66,10 @@ export default class Balance extends Component {
denomination={denomination}
sats={sats}
conversion={conversion}
stopSending={() => {this.setState({sending: false})}}
stopSending={() => {
this.setState({sending: false});
store.handleEvent({data: {psbt: ''}});
}}
/> :
<Col
height="400px"

View File

@ -16,7 +16,7 @@ export class UpdateReducer {
if (json["change-wallet"]) {
this.changeWallet(json["change-wallet"], state);
}
if (json.psbt) {
if (json.hasOwnProperty('psbt')) {
this.reducePsbt(json.psbt, state);
}
if (json["btc-state"]) {