Skip to content

We're not in Kansas anymore #5588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/actions/LogActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,13 @@ function getRepoId(key: string): string {
return 'Invalid syncKey type'
}

export const sendLogs = async (logs: LogOutput) => {
export const sendLogs = async (logs: LogOutput, underDuress: boolean) => {
console.log('====== SENDING LOGS REQUEST ======')

if (underDuress) {
logs.userMessage += ' (DURESS MODE)'
}

return await fetch(logsUri, {
method: 'PUT',
headers: {
Expand Down
3 changes: 0 additions & 3 deletions src/actions/LoginActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ function getFirstActiveWalletInfo(account: EdgeAccount): {

export function initializeAccount(navigation: NavigationBase, account: EdgeAccount): ThunkAction<Promise<void>> {
return async (dispatch, getState) => {
if (account.isDuressAccount) logActivity(`pineapple juice`)
else logActivity(`Kansas`)

const rootNavigation = getRootNavigation(navigation)

// Log in as quickly as possible, but we do need the sort order:
Expand Down
8 changes: 6 additions & 2 deletions src/components/modals/LogsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { sprintf } from 'sprintf-js'
import { MultiLogOutput, sendLogs } from '../../actions/LogActions'
import { lstrings } from '../../locales/strings'
import { config } from '../../theme/appConfig'
import { useSelector } from '../../types/reactRedux'
import { ModalButtons } from '../buttons/ModalButtons'
import { AlertCardUi4 } from '../cards/AlertCard'
import { WarningCard } from '../cards/WarningCard'
Expand All @@ -26,6 +27,7 @@ export const LogsModal = (props: Props) => {
const { bridge, logs } = props
const [userMessage, setUserMessage] = React.useState('')
const [isKeyboardVisible, setKeyboardVisible] = React.useState(false)
const account = useSelector(state => state.core.account)

React.useEffect(() => {
const keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', () => {
Expand Down Expand Up @@ -72,11 +74,13 @@ export const LogsModal = (props: Props) => {
logs.info.userMessage = userMessage
logs.activity.userMessage = userMessage

const underDuress = account.isDuressAccount

await Promise.all([
sendLogs(logs.activity).catch((e: any) => {
sendLogs(logs.activity, underDuress).catch((e: any) => {
throw new Error(`${lstrings.settings_modal_send_logs_failure} activity logs code ${e?.message}`)
}),
sendLogs(logs.info).catch((e: any) => {
sendLogs(logs.info, underDuress).catch((e: any) => {
throw new Error(`${lstrings.settings_modal_send_logs_failure} info logs code ${e?.message}`)
})
])
Expand Down
Loading