Skip to content

Commit

Permalink
PSBT: properly update props
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloudis committed Nov 10, 2024
1 parent 3147881 commit c3e00cc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions views/PSBT.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,19 @@ export default class PSBT extends React.Component<PSBTProps, PSBTState> {
);
}

UNSAFE_componentWillReceiveProps(nextProps: any): void {
const { route } = nextProps;
const psbt = route.params?.psbt;
this.setState(
{
fundedPsbt: psbt
},
() => {
this.generateInfo();
}
);
}

generateInfo = () => {
const { fundedPsbt } = this.state;

Expand Down

0 comments on commit c3e00cc

Please sign in to comment.