Skip to content

Commit

Permalink
Merge branch 'main' into feat/hidden-dev-mode-trigger
Browse files Browse the repository at this point in the history
Signed-off-by: Bryce McMath <[email protected]>
  • Loading branch information
bryce-mcmath committed Jan 3, 2025
2 parents be48946 + c27864a commit aa3f1f6
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 14 deletions.
8 changes: 2 additions & 6 deletions packages/legacy/core/App/contexts/reducers/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import { generateRandomWalletName } from '../../utils/helpers'
import { PersistentStorage } from '../../services/storage'

enum StateDispatchAction {
STATE_DISPATCH = 'state/stateDispatch',
STATE_LOADED = 'state/stateLoaded',
STATE_DISPATCH = 'state/stateDispatch'
}

enum OnboardingDispatchAction {
Expand Down Expand Up @@ -110,12 +109,9 @@ export interface ReducerAction<R> {

export const reducer = <S extends State>(state: S, action: ReducerAction<DispatchAction>): S => {
switch (action.type) {
case StateDispatchAction.STATE_LOADED: {
return { ...state, stateLoaded: true }
}
case StateDispatchAction.STATE_DISPATCH: {
const newState: State = (action?.payload || []).pop()
return { ...state, ...newState }
return { ...state, ...newState, stateLoaded: true }
}
case PreferencesDispatchAction.ENABLE_DEVELOPER_MODE: {
const choice = (action?.payload ?? []).pop() ?? false
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/core/App/localization/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ const translation = {
"CredentialReceived": "received a credential",
"ProofRequestSent": "sent a proof request",
"ProofPresentationReceived": "has sent you information",
"ProofRequestReceived": "received a proof request",
"ProofRequestReceived": "has sent you a proof request",
"ProofRequestRejected": "rejected a proof request",
"ProofRequestRejectReceived": "rejected a proof request",
"ProofRequestSatisfied": "shared information",
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/core/App/localization/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ const translation = {
"CredentialReceived": "reçu une attestation",
"ProofRequestSent": "envoyé une demande d'attestation",
"ProofPresentationReceived": "vous a envoyé des informations",
"ProofRequestReceived": "reçu une demande d'attestation",
"ProofRequestReceived": "has sent you a proof request (FR)",
"ProofRequestRejected": "rejeté une demande d'attestation",
"ProofRequestRejectReceived": "a rejeté une demande d'attestation",
"ProofRequestSatisfied": "informations partagées",
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/core/App/localization/pt-br/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ const translation = {
"CredentialReceived": "recebeu uma credencial",
"ProofRequestSent": "enviou uma solicitação de prova",
"ProofPresentationReceived": "te enviou informações",
"ProofRequestReceived": "recebeu uma solicitação de prova",
"ProofRequestReceived": "has sent you a proof request (PT-BR)",
"ProofRequestRejected": "rejeitou uma solicitação de prova",
"ProofRequestRejectReceived": "rejeitou um pedido de prova",
"ProofRequestSatisfied": "informações compartilhadas",
Expand Down
4 changes: 0 additions & 4 deletions packages/legacy/core/App/navigators/RootStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { DeviceEventEmitter } from 'react-native'
import IconButton, { ButtonLocation } from '../components/buttons/IconButton'
import { EventTypes } from '../constants'
import { TOKENS, useServices } from '../container-api'
import { DispatchAction } from '../contexts/reducers/store'
import { useStore } from '../contexts/store'
import { useTheme } from '../contexts/theme'
import { useDeepLinks } from '../hooks/deep-links'
Expand Down Expand Up @@ -67,9 +66,6 @@ const RootStack: React.FC = () => {

useEffect(() => {
loadState(dispatch)
.then(() => {
dispatch({ type: DispatchAction.STATE_LOADED })
})
.catch((err: unknown) => {
const error = new BifoldError(t('Error.Title1044'), t('Error.Message1044'), (err as Error).message, 1001)
DeviceEventEmitter.emit(EventTypes.ERROR_ADDED, error)
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/core/App/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ export function getProofEventRole(record: ProofExchangeRecord) {
case ProofState.PresentationReceived:
return Role.them
case ProofState.RequestReceived:
return Role.me
return Role.them
case ProofState.ProposalSent:
case ProofState.PresentationSent:
return Role.me
Expand Down

0 comments on commit aa3f1f6

Please sign in to comment.