Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiple issues #6075

Merged
merged 7 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/components/KeeperModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function KeeperModal(props: ModalProps) {
}
style={styles.container}
>
<Box style={styles.header}>
<Box>
{showCloseIcon ? (
<TouchableOpacity testID="btn_close_modal" style={styles.close} onPress={close}>
{getCloseIcon()}
Expand Down Expand Up @@ -285,10 +285,6 @@ const getStyles = (subTitleWidth) =>
lineHeight: 20,
width: subTitleWidth,
},
header: {
paddingBottom: hp(-10),
marginBottom: hp(-10),
},
secCta: {
color: '#073E39',
borderRadius: 10,
Expand Down
2 changes: 1 addition & 1 deletion src/components/ToastMessages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const styles = StyleSheet.create({
width: windowWidth * 0.9,
paddingLeft: 15,
bottom: hp(40),
height: 70,
minHeight: hp(70),
fontSize: 13,
elevation: 6,
shadowOpacity: 0.6,
Expand Down
1 change: 0 additions & 1 deletion src/context/Localization/language/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
"manageUTXO": "manage UTXO",
"manageKeys": "Manage Keys",
"manageKeysDesc": "Securely manage your keys with ease",

"forThisVault": "for this vault",
"saveChanges": "Save Changes",
"signerFingerPrint": "Signer Fingerprint",
Expand Down
19 changes: 11 additions & 8 deletions src/hooks/useWalletAsset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ const useWalletAsset = () => {
case VaultType.COLLABORATIVE:
return [
{ tag: 'Collaborative', color: Colors.mintGreen },
{ tag: getSchemeTag(wallet as Vault), color: Colors.LightMossGreen },
{ tag: getSchemeTag(wallet as Vault), color: Colors.DesertSand },
];
case VaultType.ASSISTED:
return [
{ tag: 'Assisted', color: Colors.LightMossGreen },
{ tag: getSchemeTag(wallet as Vault), color: Colors.mintGreen },
{ tag: getSchemeTag(wallet as Vault), color: Colors.DesertSand },
];
case VaultType.TIMELOCKED:
return [
{ tag: 'Timelocked', color: Colors.mintGreen },
{ tag: getSchemeTag(wallet as Vault), color: Colors.LightMossGreen },
{ tag: getSchemeTag(wallet as Vault), color: Colors.DesertSand },
];
case VaultType.CANARY:
return [{ tag: 'Canary', color: Colors.LightMossGreen }];
Expand All @@ -76,12 +76,12 @@ const useWalletAsset = () => {
wallet.scheme.miniscriptScheme?.usedMiniscriptTypes.includes(
MiniscriptTypes.INHERITANCE
) && { tag: 'Inheritance Key', color: Colors.Aquamarine },
{ tag: getSchemeTag(wallet as Vault), color: Colors.LightMossGreen },
{ tag: getSchemeTag(wallet as Vault), color: Colors.DesertSand },
].filter(Boolean);
default:
return [
{ tag: 'Multi-key', color: Colors.mintGreen },
{ tag: getSchemeTag(wallet as Vault), color: Colors.LightMossGreen },
{ tag: 'Multi-key', color: Colors.LabelLight3 },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not enough to assign the colors like this, the colors need to be consistent, ie first pill color is the same for all then second is also same for all etc,

{ tag: getSchemeTag(wallet as Vault), color: Colors.DesertSand },
];
}
} else {
Expand All @@ -94,8 +94,11 @@ const useWalletAsset = () => {
derivationPath && WalletUtilities.getPurpose(derivationPath) === DerivationPurpose.BIP86;

return [
{ tag: walletKind, color: Colors.LightMossGreen },
{ tag: isTaprootWallet ? 'Taproot' : 'Single-Key', color: Colors.PaleCyan },
{ tag: walletKind, color: Colors.DesertSand },
{
tag: isTaprootWallet ? 'Taproot' : 'Single-Key',
color: isTaprootWallet ? Colors.PaleCyan : Colors.LabelLight3,
},
];
}
};
Expand Down
7 changes: 5 additions & 2 deletions src/screens/ChoosePlanScreen/components/SubscriptionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Box, ScrollView, useColorMode } from 'native-base';
import React, { useState } from 'react';
import { View, TouchableOpacity, StyleSheet } from 'react-native';
import CircleIconWrapper from 'src/components/CircleIconWrapper';
import { wp } from 'src/constants/responsive';
import { hp, wp } from 'src/constants/responsive';
import { useSettingKeeper } from 'src/hooks/useSettingKeeper';
import ArrowRightGreen from 'src/assets/images/right-green-icon.svg';
import ArrowDownGreen from 'src/assets/images/down-green-icon.svg';
Expand Down Expand Up @@ -93,6 +93,7 @@ const SubscriptionList: React.FC<{
toggleExpand(index);
}}
style={styles.touchable}
key={index}
>
<Box
key={index}
Expand Down Expand Up @@ -233,10 +234,12 @@ const styles = StyleSheet.create({
},
divider: {
height: 1,
marginVertical: 20,
marginTop: hp(20),
marginBottom: hp(10),
opacity: 0.2,
},
price: {
paddingTop: hp(10),
fontSize: 22,
fontWeight: '700',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ const SettingModal = ({ isUaiFlow, confirmPass, setConfirmPass }) => {
const { primaryMnemonic }: KeeperApp = useQuery(RealmSchema.KeeperApp).map(
getJSONFromRealmObject
)[0];
const [confirmPassVisible, setConfirmPassVisible] = useState(isUaiFlow);
const [confirmPassVisible, setConfirmPassVisible] = useState(false);
const [backupModalVisible, setBackupModalVisible] = useState(false);

useEffect(() => {
if (confirmPass) {
if (confirmPass || isUaiFlow) {
navigation.setParams({ isUaiFlow: false });
setConfirmPassVisible(true);
}
}, [confirmPass]);
}, [confirmPass, isUaiFlow]);

return (
<Box>
Expand Down
1 change: 0 additions & 1 deletion src/screens/Vault/VaultDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ function VaultDetails({ navigation, route }: ScreenProps) {
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
<VStack style={styles.topSection}>
<WalletHeader
title={vault.presentationData?.name}
data={vault}
rightComponent={
<TouchableOpacity
Expand Down
1 change: 0 additions & 1 deletion src/screens/WalletDetails/WalletDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ function WalletDetails({ route }: ScreenProps) {
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
<Box style={styles.topContainer}>
<WalletHeader
title={name}
rightComponent={
<TouchableOpacity
style={styles.settingBtn}
Expand Down
1 change: 1 addition & 0 deletions src/theme/Colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ const Colors = {
horizontaldivider: 'rgba(232, 227, 221,1)',
termsGrey: 'rgba(78, 92, 106, 1)',
headerWhite: 'rgba(255, 255, 255, 1)',
DesertSand: 'rgba(234, 210, 181, 1)',

darkBorderGreen: 'rgba(89, 116, 107, 1)',

Expand Down
Loading