@@ -22,6 +22,7 @@ import { VisibilityType } from 'src/services/wallets/enums';
22
22
import { WalletType } from 'src/services/wallets/enums' ;
23
23
import { captureError } from 'src/services/sentry' ;
24
24
import BackupModalContent from '../AppSettings/BackupModal' ;
25
+ import ActivityIndicatorView from 'src/components/AppActivityIndicator/ActivityIndicatorView' ;
25
26
26
27
function WalletSettings ( { route } ) {
27
28
const { colorMode } = useColorMode ( ) ;
@@ -31,6 +32,7 @@ function WalletSettings({ route }) {
31
32
const [ xpubVisible , setXPubVisible ] = useState ( false ) ;
32
33
const [ confirmPassVisible , setConfirmPassVisible ] = useState ( false ) ;
33
34
const [ transferPolicyVisible , setTransferPolicyVisible ] = useState ( editPolicy ) ;
35
+ const [ loadingState , setLoadingState ] = useState ( false ) ;
34
36
35
37
const { wallets } = useWallets ( ) ;
36
38
const wallet = wallets . find ( ( item ) => item . id === walletRoute . id ) ;
@@ -64,6 +66,13 @@ function WalletSettings({ route }) {
64
66
}
65
67
} ;
66
68
69
+ const handleTransferPolicy = async ( ) => {
70
+ setLoadingState ( true ) ;
71
+ await new Promise ( ( resolve ) => setTimeout ( resolve , 2000 ) ) ;
72
+ setTransferPolicyVisible ( true ) ;
73
+ setLoadingState ( false ) ;
74
+ } ;
75
+
67
76
return (
68
77
< ScreenWrapper backgroundcolor = { `${ colorMode } .primaryBackground` } >
69
78
< KeeperHeader title = { settings . walletSettings } subtitle = { settings . walletSettingSubTitle } />
@@ -96,13 +105,13 @@ function WalletSettings({ route }) {
96
105
< OptionCard
97
106
title = { walletTranslation . TransferPolicy }
98
107
description = { walletTranslation . TransferPolicyDesc }
99
- callback = { ( ) => {
100
- setTransferPolicyVisible ( true ) ;
101
- } }
108
+ callback = { handleTransferPolicy }
102
109
/>
103
110
) }
104
111
{ TestSatsComponent }
105
112
</ ScrollView >
113
+ < ActivityIndicatorView visible = { loadingState } showLoader />
114
+
106
115
< KeeperModal
107
116
visible = { transferPolicyVisible }
108
117
close = { ( ) => {
0 commit comments