File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ import {
102102import { showToast } from '../notifications' ;
103103import i18n from '../i18n' ;
104104import { bitkitLedger , syncLedger } from '../ledger' ;
105+ import { sendNavigation } from '../../navigation/bottom-sheet/SendNavigation' ;
105106
106107const PAYMENT_TIMEOUT = 8 * 1000 ; // 8 seconds
107108
@@ -492,6 +493,14 @@ export const subscribeToLightningPayments = ({
492493 title : i18n . t ( 'wallet:toast_payment_success_title' ) ,
493494 description : i18n . t ( 'wallet:toast_payment_success_description' ) ,
494495 } ) ;
496+
497+ // If the send sheet is open, navigate to the success screen
498+ sendNavigation . navigate ( 'Success' , {
499+ type : EActivityType . lightning ,
500+ txId : found . payment_hash ,
501+ amount : found . amount ,
502+ } ) ;
503+
495504 await refreshLdk ( ) ;
496505 bitkitLedger ?. handleLNTx ( { ...res , amount_sat : found . amount } ) ;
497506 } else {
@@ -508,7 +517,7 @@ export const subscribeToLightningPayments = ({
508517 const found = pending . find ( ( p ) => p . payment_hash === res . payment_hash ) ;
509518
510519 if ( found ) {
511- await refreshLdk ( { selectedWallet , selectedNetwork } ) ;
520+ await refreshLdk ( ) ;
512521 showToast ( {
513522 type : 'error' ,
514523 title : i18n . t ( 'wallet:toast_payment_failed_title' ) ,
You can’t perform that action at this time.
0 commit comments