@@ -8,6 +8,7 @@ import { sprintf } from 'sprintf-js'
8
8
import { MultiLogOutput , sendLogs } from '../../actions/LogActions'
9
9
import { lstrings } from '../../locales/strings'
10
10
import { config } from '../../theme/appConfig'
11
+ import { useSelector } from '../../types/reactRedux'
11
12
import { ModalButtons } from '../buttons/ModalButtons'
12
13
import { AlertCardUi4 } from '../cards/AlertCard'
13
14
import { WarningCard } from '../cards/WarningCard'
@@ -26,6 +27,7 @@ export const LogsModal = (props: Props) => {
26
27
const { bridge, logs } = props
27
28
const [ userMessage , setUserMessage ] = React . useState ( '' )
28
29
const [ isKeyboardVisible , setKeyboardVisible ] = React . useState ( false )
30
+ const account = useSelector ( state => state . core . account )
29
31
30
32
React . useEffect ( ( ) => {
31
33
const keyboardDidShowListener = Keyboard . addListener ( 'keyboardDidShow' , ( ) => {
@@ -72,11 +74,13 @@ export const LogsModal = (props: Props) => {
72
74
logs . info . userMessage = userMessage
73
75
logs . activity . userMessage = userMessage
74
76
77
+ const underDuress = account . isDuressAccount
78
+
75
79
await Promise . all ( [
76
- sendLogs ( logs . activity ) . catch ( ( e : any ) => {
80
+ sendLogs ( logs . activity , underDuress ) . catch ( ( e : any ) => {
77
81
throw new Error ( `${ lstrings . settings_modal_send_logs_failure } activity logs code ${ e ?. message } ` )
78
82
} ) ,
79
- sendLogs ( logs . info ) . catch ( ( e : any ) => {
83
+ sendLogs ( logs . info , underDuress ) . catch ( ( e : any ) => {
80
84
throw new Error ( `${ lstrings . settings_modal_send_logs_failure } info logs code ${ e ?. message } ` )
81
85
} )
82
86
] )
0 commit comments