File tree 5 files changed +24
-13
lines changed
5 files changed +24
-13
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ name: ci
3
3
on :
4
4
pull_request :
5
5
branches :
6
- - ' ** '
6
+ - " ** "
7
7
8
8
jobs :
9
9
lint_test :
10
10
uses :
babylonlabs-io/.github/.github/workflows/[email protected]
11
11
with :
12
12
run-build : true
13
- run-unit-tests : true
13
+ run-unit-tests : true
Original file line number Diff line number Diff line change @@ -3,18 +3,18 @@ name: docker_publish
3
3
on :
4
4
push :
5
5
branches :
6
- - ' main'
7
- - ' dev'
6
+ - " main"
7
+ - " dev"
8
8
tags :
9
- - ' * '
9
+ - " * "
10
10
11
11
jobs :
12
12
lint_test :
13
13
uses :
babylonlabs-io/.github/.github/workflows/[email protected]
14
14
with :
15
15
run-build : true
16
16
run-unit-tests : true
17
-
17
+
18
18
docker_build :
19
19
needs : [lint_test]
20
20
runs-on : ubuntu-22.04
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ interface ErrorModalProps {
12
12
errorMessage : string ;
13
13
errorState ?: ErrorState ;
14
14
errorTime : Date ;
15
+ noCancel ?: boolean ;
15
16
}
16
17
17
18
export const ErrorModal : React . FC < ErrorModalProps > = ( {
@@ -20,6 +21,7 @@ export const ErrorModal: React.FC<ErrorModalProps> = ({
20
21
onRetry,
21
22
errorMessage,
22
23
errorState,
24
+ noCancel,
23
25
errorTime,
24
26
} ) => {
25
27
const { error, retryErrorAction } = useError ( ) ;
@@ -93,12 +95,14 @@ export const ErrorModal: React.FC<ErrorModalProps> = ({
93
95
< p className = "text-center" > { getErrorMessage ( ) } </ p >
94
96
</ div >
95
97
< div className = "mt-4 flex justify-around gap-4" >
96
- < button
97
- className = "btn btn-outline flex-1 rounded-lg px-2"
98
- onClick = { ( ) => onClose ( ) }
99
- >
100
- Cancel
101
- </ button >
98
+ { noCancel && (
99
+ < button
100
+ className = "btn btn-outline flex-1 rounded-lg px-2"
101
+ onClick = { ( ) => onClose ( ) }
102
+ >
103
+ Cancel
104
+ </ button >
105
+ ) }
102
106
{ onRetry && (
103
107
< button
104
108
className = "btn-primary btn flex-1 rounded-lg px-2 text-white"
Original file line number Diff line number Diff line change @@ -286,7 +286,13 @@ export const Staking: React.FC<StakingProps> = ({
286
286
errorState : ErrorState . STAKING ,
287
287
errorTime : new Date ( ) ,
288
288
} ,
289
- retryAction : handleSign ,
289
+ noCancel : true ,
290
+ retryAction : ( ) => {
291
+ // in case of error, we need to reset the state
292
+ handleResetState ( ) ;
293
+ // and refetch the UTXOs
294
+ queryClient . invalidateQueries ( { queryKey : [ UTXO_KEY , address ] } ) ;
295
+ } ,
290
296
} ) ;
291
297
}
292
298
} ;
Original file line number Diff line number Diff line change @@ -22,4 +22,5 @@ export interface ErrorHandlerParam {
22
22
export interface ShowErrorParams {
23
23
error : ErrorType ;
24
24
retryAction ?: ( ) => void ;
25
+ noCancel ?: boolean ;
25
26
}
You can’t perform that action at this time.
0 commit comments