Skip to content

Commit

Permalink
handleAnything: fix parsing of route and props
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloudis committed Apr 8, 2023
1 parent 053c419 commit 2741cec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions views/Send.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,10 @@ export default class Send extends React.Component<SendProps, SendState> {
handleAnything(text, this.state.amount)
.then((response) => {
try {
if (response)
navigation.navigate(response.route, response.props);
if (response) {
const [route, props] = response;
navigation.navigate(route, props);
}
} catch {
this.setState({
loading: false,
Expand Down
5 changes: 3 additions & 2 deletions views/handleAnythingQRScanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ export default class handleAnythingQRScanner extends React.Component<
this.setState({
loading: false
});
if (response) {
navigation.navigate(response.route, response.props);
const [route, props] = response;
if (route) {
navigation.navigate(route, props);
} else {
navigation.navigate('Send');
}
Expand Down

0 comments on commit 2741cec

Please sign in to comment.