Merge pull request #4094 from BlueWallet/uuid

FIX: Use existing UID instead of recreating one
This commit is contained in:
GLaDOS 2021-10-22 10:33:54 +01:00 committed by GitHub
commit e39a847f60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 19 deletions

View file

@ -42,7 +42,6 @@ static void InitializeFlipper(UIApplication *application) {
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[Bugsnag start];
[self registerDefaultsFromSettingsBundle];
#if !TARGET_OS_MACCATALYST
#ifdef FB_SONARKIT_ENABLED
InitializeFlipper(application);
@ -79,19 +78,6 @@ static void InitializeFlipper(UIApplication *application) {
return YES;
}
#pragma NSUserDefaults
- (void)registerDefaultsFromSettingsBundle {
// this function writes default settings as settings
NSString *settingsBundle = [[NSBundle mainBundle] pathForResource:@"Settings" ofType:@"bundle"];
if(!settingsBundle) {
NSLog(@"Could not find Settings.bundle");
return;
}
[[NSUserDefaults standardUserDefaults] setValue:UIDevice.currentDevice.identifierForVendor.UUIDString forKey:@"uniqueid"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG

View file

@ -20,7 +20,7 @@
<key>Title</key>
<string>Unique ID</string>
<key>Key</key>
<string>uniqueid</string>
<string>deviceUID</string>
</dict>
</array>
</dict>

View file

@ -28,11 +28,14 @@ const styles = StyleSheet.create({
},
secret: {
alignSelf: 'stretch',
alignItems: 'center',
textAlign: 'center',
paddingHorizontal: 16,
fontSize: 16,
lineHeight: 24,
},
secretWritingDirection: {
writingDirection: 'ltr',
},
});
const WalletExport = () => {
@ -53,7 +56,7 @@ const WalletExport = () => {
backgroundColor: colors.elevated,
},
type: { ...styles.type, color: colors.foregroundColor },
secret: { ...styles.secret, color: colors.foregroundColor },
secret: { color: colors.foregroundColor },
warning: { ...styles.secret, color: colors.failedColor },
};
@ -124,7 +127,7 @@ const WalletExport = () => {
{wallet.type === LightningCustodianWallet.type || wallet.type === WatchOnlyWallet.type ? (
<BlueCopyTextToClipboard text={wallet.getSecret()} />
) : (
<BlueText style={stylesHook.secret} testID="Secret">
<BlueText style={[styles.secret, styles.secretWritingDirection, stylesHook.secret]} testID="Secret">
{wallet.getSecret()}
</BlueText>
)}

View file

@ -139,6 +139,7 @@ const styles = StyleSheet.create({
marginVertical: 16,
fontSize: 16,
fontWeight: '500',
writingDirection: I18nManager.isRTL ? 'rtl' : 'ltr',
},
secret: {
flexWrap: 'wrap',

View file

@ -741,7 +741,6 @@ const styles = StyleSheet.create({
minHeight: 130,
},
walletDetails: {
minWidth: 150,
justifyContent: 'center',
alignItems: 'flex-end',
},