Skip to content

Commit

Permalink
Resolved UI issues while restoring the wallet. #3161 (#3378)
Browse files Browse the repository at this point in the history
* -Resolved Text change on Security Question #3322

* - Resolved UI issue on savings account/Donation account while entering wrong OTP for setup a 2FA authentication. #2697
- Resolved Wallet Settings: Page freeze #3249

* - Swan Success model UI fix

* - Resolved Showing irrelevant section when confirm security question on restore #3319

* -Resolved Text going out of button #3256

* - Removed old flow of Recovery when Cloud backup not found

* - Resolved Level 2>RK2 fail to update after share and confirm #3325

* - Resolved Mandatory Upgrade Notification with reminder #3228

* -Resolved UI issues while restoring the wallet. #3161
  • Loading branch information
cakesoft-nikhita authored May 17, 2021
1 parent 8f56b30 commit aa7ae2c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
14 changes: 13 additions & 1 deletion src/common/CommonFunctions/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import AsyncStorage from '@react-native-async-storage/async-storage';
import AsyncStorage from '@react-native-async-storage/async-storage'
import { LevelHealthInterface, LevelInfo } from '../../bitcoin/utilities/Interface'
import SSS from '../../bitcoin/utilities/sss/SSS'
import AccountShell from '../data/models/AccountShell'
Expand Down Expand Up @@ -279,3 +279,15 @@ export const getLevelInfo = ( levelHealthVar: LevelHealthInterface[], currentLev
}
return levelHealthVar[ currentLevel - 1 ].levelInfo
}


export const deviceText = ( text ) =>{
switch ( text ) {
case 'Secondary Device1': return 'Personal Device1'
case 'Secondary Device2': return 'Personal Device2'
case 'Secondary Device3': return 'Personal Device3'

default:
return text
}
}
12 changes: 1 addition & 11 deletions src/pages/NewBHR/SecondaryDeviceHistoryNewBHR.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import SourceAccountKind from '../../common/data/enums/SourceAccountKind'
import KeeperProcessStatus from '../../common/data/enums/KeeperProcessStatus'
import SubAccountDescribing from '../../common/data/models/SubAccountInfo/Interfaces'
import semver from 'semver'
import { deviceText } from '../../common/CommonFunctions'

const SecondaryDeviceHistoryNewBHR = ( props ) => {
const [ ErrorBottomSheet ] = useState( React.createRef() )
Expand Down Expand Up @@ -833,17 +834,6 @@ const SecondaryDeviceHistoryNewBHR = ( props ) => {
dispatch( updateMSharesHealth( shareArray ) )
}

const deviceText = ( text ) =>{
switch ( text ) {
case 'Secondary Device1': return 'Personal Device1'
case 'Secondary Device2': return 'Personal Device2'
case 'Secondary Device3': return 'Personal Device3'

default:
return text
}
}

return (
<View style={{
flex: 1, backgroundColor: Colors.backgroundColor
Expand Down
10 changes: 3 additions & 7 deletions src/pages/RestoreHexaWithKeeper/RestoreWithICloud.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { requestTimedout } from '../../store/utils/utilities'
import RestoreWallet from './RestoreWallet'
import { REGULAR_ACCOUNT } from '../../common/constants/wallet-service-types'
import RegularAccount from '../../bitcoin/services/accounts/RegularAccount'
import { isEmpty } from '../../common/CommonFunctions'
import { deviceText, isEmpty } from '../../common/CommonFunctions'
import CloudBackup from '../../common/CommonFunctions/CloudBackup'
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons'
import SSS from '../../bitcoin/utilities/sss/SSS'
Expand Down Expand Up @@ -254,10 +254,6 @@ class RestoreWithICloud extends Component<
showLoader: true
} )
this.props.getCloudDataRecovery()
// const cloudObject = new CloudBackup( {
// recoveryCallback: ( result ) => this.getData( result ),
// } )
// cloudObject.CheckCloudDataBackup( ( result ) => this.getData( result ) )
};

componentDidUpdate = async ( prevProps, prevState ) => {
Expand Down Expand Up @@ -442,7 +438,7 @@ class RestoreWithICloud extends Component<
} else {
this.setState( ( state ) => ( {
showLoader: false,
} ) )
} ) );
( this.BackupNotFound as any ).current.snapTo( 1 )
}
};
Expand Down Expand Up @@ -941,7 +937,7 @@ class RestoreWithICloud extends Component<
fontSize: RFValue( 18 ),
}}
>
{item.title}
{deviceText( item.title )}
</Text>
<Text style={styles.cardsInfoText}>{item.info}</Text>
<Text style={styles.cardsInfoText}>
Expand Down

0 comments on commit aa7ae2c

Please sign in to comment.