mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-24 15:36:59 +01:00
Merge pull request #4094 from BlueWallet/uuid
FIX: Use existing UID instead of recreating one
This commit is contained in:
commit
e39a847f60
5 changed files with 8 additions and 19 deletions
|
@ -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
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<key>Title</key>
|
||||
<string>Unique ID</string>
|
||||
<key>Key</key>
|
||||
<string>uniqueid</string>
|
||||
<string>deviceUID</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
|
|
|
@ -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>
|
||||
)}
|
||||
|
|
|
@ -139,6 +139,7 @@ const styles = StyleSheet.create({
|
|||
marginVertical: 16,
|
||||
fontSize: 16,
|
||||
fontWeight: '500',
|
||||
writingDirection: I18nManager.isRTL ? 'rtl' : 'ltr',
|
||||
},
|
||||
secret: {
|
||||
flexWrap: 'wrap',
|
||||
|
|
|
@ -741,7 +741,6 @@ const styles = StyleSheet.create({
|
|||
minHeight: 130,
|
||||
},
|
||||
walletDetails: {
|
||||
minWidth: 150,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'flex-end',
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue