mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
FIX: poptotop should be in screen nor modal
This commit is contained in:
parent
1c61de7a32
commit
e5f0c603ef
@ -24,8 +24,8 @@ GEM
|
||||
artifactory (3.0.17)
|
||||
atomos (0.1.3)
|
||||
aws-eventstream (1.3.0)
|
||||
aws-partitions (1.962.0)
|
||||
aws-sdk-core (3.201.3)
|
||||
aws-partitions (1.963.0)
|
||||
aws-sdk-core (3.201.4)
|
||||
aws-eventstream (~> 1, >= 1.3.0)
|
||||
aws-partitions (~> 1, >= 1.651.0)
|
||||
aws-sigv4 (~> 1.8)
|
||||
@ -84,7 +84,7 @@ GEM
|
||||
colored2 (3.1.2)
|
||||
commander (4.6.0)
|
||||
highline (~> 2.0.0)
|
||||
concurrent-ruby (1.3.3)
|
||||
concurrent-ruby (1.3.4)
|
||||
connection_pool (2.4.1)
|
||||
declarative (0.0.20)
|
||||
digest-crc (0.6.5)
|
||||
|
@ -5,7 +5,6 @@ import { useTheme } from '../components/themes';
|
||||
import loc from '../loc';
|
||||
import { SecondButton } from './SecondButton';
|
||||
import triggerHapticFeedback, { HapticFeedbackTypes } from '../blue_modules/hapticFeedback';
|
||||
import { popToTop } from '../NavigationService';
|
||||
|
||||
export const MODAL_TYPES = {
|
||||
ENTER_PASSWORD: 'ENTER_PASSWORD',
|
||||
@ -161,7 +160,6 @@ const PromptPasswordConfirmationModal = forwardRef<PromptPasswordConfirmationMod
|
||||
}).start(() => {
|
||||
setTimeout(async () => {
|
||||
await modalRef.current?.dismiss();
|
||||
popToTop();
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
|
@ -10,6 +10,7 @@ import PromptPasswordConfirmationModal, {
|
||||
PromptPasswordConfirmationModalHandle,
|
||||
MODAL_TYPES,
|
||||
} from '../components/PromptPasswordConfirmationModal';
|
||||
import { popToTop } from '../NavigationService';
|
||||
|
||||
// Action Types
|
||||
const SET_LOADING = 'SET_LOADING';
|
||||
@ -48,6 +49,7 @@ const PlausibleDeniability: React.FC = () => {
|
||||
const promptRef = useRef<PromptPasswordConfirmationModalHandle>(null);
|
||||
|
||||
const handleOnCreateFakeStorageButtonPressed = async () => {
|
||||
dispatch({ type: SET_LOADING, payload: true });
|
||||
dispatch({ type: SET_MODAL_TYPE, payload: MODAL_TYPES.CREATE_FAKE_STORAGE });
|
||||
promptRef.current?.present();
|
||||
};
|
||||
@ -70,8 +72,12 @@ const PlausibleDeniability: React.FC = () => {
|
||||
dispatch({ type: SET_MODAL_TYPE, payload: MODAL_TYPES.SUCCESS });
|
||||
|
||||
success = true;
|
||||
setTimeout(() => {
|
||||
popToTop();
|
||||
}, 1500);
|
||||
} catch {
|
||||
success = false;
|
||||
dispatch({ type: SET_LOADING, payload: false });
|
||||
}
|
||||
|
||||
return success;
|
||||
@ -95,6 +101,7 @@ const PlausibleDeniability: React.FC = () => {
|
||||
testID="CreateFakeStorageButton"
|
||||
title={loc.plausibledeniability.create_fake_storage}
|
||||
onPress={handleOnCreateFakeStorageButtonPressed}
|
||||
disabled={state.isLoading}
|
||||
/>
|
||||
</BlueCard>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user