From ffb3d2c76f013500e84231f5f3c9f76bd34aacd7 Mon Sep 17 00:00:00 2001
From: Juliano Lazzarotto <30806844+stackchain@users.noreply.github.com>
Date: Fri, 30 Aug 2024 12:04:23 +0100
Subject: [PATCH 1/2] fix(wallet-mobile): white flickering nav transitions
(#3579)
---
apps/wallet-mobile/src/AppNavigator.tsx | 1 +
apps/wallet-mobile/src/kernel/navigation.tsx | 2 +-
.../messages/src/AppNavigator.json | 32 +++++++++----------
3 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/apps/wallet-mobile/src/AppNavigator.tsx b/apps/wallet-mobile/src/AppNavigator.tsx
index 285a24bf08..7e8a160dc7 100644
--- a/apps/wallet-mobile/src/AppNavigator.tsx
+++ b/apps/wallet-mobile/src/AppNavigator.tsx
@@ -184,6 +184,7 @@ export const AppNavigator = () => {
screenOptions={{
presentation: 'transparentModal',
...(Platform.OS === 'android' && {...TransitionPresets.DefaultTransition}), // overriding general navigation settings
+ cardStyle: {backgroundColor: 'transparent'}, // this is needed for the modal to be transparent
}}
>
diff --git a/apps/wallet-mobile/src/kernel/navigation.tsx b/apps/wallet-mobile/src/kernel/navigation.tsx
index c5f45fae6c..a14cb8afb8 100644
--- a/apps/wallet-mobile/src/kernel/navigation.tsx
+++ b/apps/wallet-mobile/src/kernel/navigation.tsx
@@ -59,7 +59,7 @@ export const defaultStackNavigationOptions = (atoms: Atoms, color: ThemedPalette
...(Platform.OS === 'android' && {...TransitionPresets.SlideFromRightIOS}),
detachPreviousScreen: false /* https://github.com/react-navigation/react-navigation/issues/9883 */,
cardStyle: {
- backgroundColor: 'transparent',
+ backgroundColor: color.bg_color_max,
},
cardOverlay: () => (
Date: Fri, 30 Aug 2024 14:17:33 +0100
Subject: [PATCH 2/2] refactor(wallet-mobile): drop version + readonly on
static prop (#3580)
---
.../src/yoroi-wallets/cardano/cardano-wallet.ts | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/cardano-wallet.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/cardano-wallet.ts
index 01e27e85e0..80ec60e5f5 100644
--- a/apps/wallet-mobile/src/yoroi-wallets/cardano/cardano-wallet.ts
+++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/cardano-wallet.ts
@@ -10,7 +10,6 @@ import assert from 'assert'
import {BigNumber} from 'bignumber.js'
import {Buffer} from 'buffer'
import _ from 'lodash'
-import DeviceInfo from 'react-native-device-info'
import {defaultMemoize} from 'reselect'
import {Observable} from 'rxjs'
@@ -88,7 +87,6 @@ export const makeCardanoWallet = (
const {BACKEND, NETWORK_CONFIG, PRIMARY_TOKEN, PRIMARY_TOKEN_INFO, TOKEN_INFO_SERVICE} = constants
return class CardanoWallet implements YoroiWallet {
- readonly version: string
readonly id: string
readonly encryptedStorage: WalletEncryptedStorage
@@ -125,7 +123,7 @@ export const makeCardanoWallet = (
readonly primaryTokenInfo: Balance.TokenInfo = PRIMARY_TOKEN_INFO
// =================== create =================== //
- static build = async ({
+ static readonly build = async ({
id,
accountPubKeyHex,
accountVisual,
@@ -247,7 +245,6 @@ export const makeCardanoWallet = (
this.encryptedStorage = makeWalletEncryptedStorage(id)
- this.version = DeviceInfo.getVersion()
this.setupSubscriptions()
}