Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 133c753

Browse files
committed
Go back to lightning confirm screen when pressing try again
1 parent 13db55a commit 133c753

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

src/view/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class MainView extends Component {
113113
<PayLightningDone store={store} payment={payment} nav={nav} />
114114
)}
115115
{route === 'PaymentFailed' && (
116-
<PaymentFailed channel={channel} payment={payment} />
116+
<PaymentFailed channel={channel} nav={nav} />
117117
)}
118118
{route === 'PayBitcoin' && (
119119
<PayBitcoin store={store} payment={payment} nav={nav} />

src/view/payment-failed.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const styles = StyleSheet.create({
2828
},
2929
});
3030

31-
const PaymentFailedView = ({ channel, payment }) => (
31+
const PaymentFailedView = ({ channel, nav }) => (
3232
<Background color={color.blackDark}>
3333
<MainContent>
3434
<FormStretcher>
@@ -41,7 +41,10 @@ const PaymentFailedView = ({ channel, payment }) => (
4141
<PillButton style={styles.createBtn} onPress={() => channel.initCreate()}>
4242
Create channel
4343
</PillButton>
44-
<Button style={styles.retryBtn} onPress={() => payment.init()}>
44+
<Button
45+
style={styles.retryBtn}
46+
onPress={() => nav.goPayLightningConfirm()}
47+
>
4548
<ButtonText>Try again</ButtonText>
4649
</Button>
4750
</MainContent>
@@ -50,7 +53,7 @@ const PaymentFailedView = ({ channel, payment }) => (
5053

5154
PaymentFailedView.propTypes = {
5255
channel: PropTypes.object.isRequired,
53-
payment: PropTypes.object.isRequired,
56+
nav: PropTypes.object.isRequired,
5457
};
5558

5659
export default observer(PaymentFailedView);

stories/screen-story.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ storiesOf('Screens', module)
149149
.add('Pay Lightning Done', () => (
150150
<PayLightningDone store={store} payment={payment} nav={nav} />
151151
))
152-
.add('Payment Failed', () => (
153-
<PaymentFailed channel={channel} payment={payment} />
154-
))
152+
.add('Payment Failed', () => <PaymentFailed channel={channel} nav={nav} />)
155153
.add('Pay Bitcoin', () => (
156154
<PayBitcoin store={store} payment={payment} nav={nav} />
157155
))

0 commit comments

Comments
 (0)