From 6bd42db35043e226c444bd5505d99a31d100c76a Mon Sep 17 00:00:00 2001 From: minibits-cash Date: Mon, 16 Mar 2026 18:48:38 -0700 Subject: [PATCH] Tune Optimize ecash screen UI --- src/screens/ExportBackupScreen.tsx | 10 +++++----- src/screens/OptimizeEcashScreen.tsx | 21 +++++++++++++-------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/screens/ExportBackupScreen.tsx b/src/screens/ExportBackupScreen.tsx index a254d831..c12910e6 100644 --- a/src/screens/ExportBackupScreen.tsx +++ b/src/screens/ExportBackupScreen.tsx @@ -36,11 +36,10 @@ import { ContactsStoreSnapshot } from '../models/ContactsStore' import { MintsStoreSnapshot } from '../models/MintsStore' import { ResultModalInfo } from './Wallet/ResultModalInfo' import { verticalScale } from '@gocodingnow/rn-size-matters' -import { Token, getDecodedToken, getEncodedToken } from '@cashu/cashu-ts' -import { minibitsPngIcon } from '../components/MinibitsIcon' +import { Token, getEncodedToken } from '@cashu/cashu-ts' import { StaticScreenProps, useNavigation } from '@react-navigation/native' -const OPTIMIZE_FROM_PROOFS_COUNT = 4 +const OPTIMIZE_FROM_PROOFS_COUNT = 10 type Props = StaticScreenProps export const ExportBackupScreen = function ExportBackup({ route }: Props) { @@ -329,7 +328,7 @@ export const ExportBackupScreen = function ExportBackup({ route }: Props) { preset='secondary' onPress={() => navigation.navigate('OptimizeEcash')} textStyle={{lineHeight: verticalScale(16), fontSize: verticalScale(14)}} - style={{minHeight: verticalScale(40), paddingVertical: verticalScale(spacing.tiny)}} + style={{minHeight: verticalScale(40), paddingVertical: verticalScale(spacing.tiny), marginRight: spacing.tiny, marginTop: -spacing.tiny}} text={'Optimize'} /> )} @@ -501,7 +500,8 @@ const $rightContainer: ViewStyle = { // alignSelf: 'center', marginLeft: spacing.tiny, marginRight: -10, - flexDirection: 'row' + flexDirection: 'row', + alignItems: 'center', } const $bottomContainer: ViewStyle = { diff --git a/src/screens/OptimizeEcashScreen.tsx b/src/screens/OptimizeEcashScreen.tsx index 97bfe7fa..4075e567 100644 --- a/src/screens/OptimizeEcashScreen.tsx +++ b/src/screens/OptimizeEcashScreen.tsx @@ -28,7 +28,7 @@ import {ResultModalInfo} from './Wallet/ResultModalInfo' import {verticalScale} from '@gocodingnow/rn-size-matters' import {StaticScreenProps, useNavigation} from '@react-navigation/native' -const OPTIMIZE_DENOMINATION_THRESHOLD = 1 +const OPTIMIZE_DENOMINATION_THRESHOLD = 5 type Props = StaticScreenProps @@ -148,14 +148,16 @@ export const OptimizeEcashScreen = function OptimizeEcash(_props: Props) { {denominationCounts.length === 0 ? ( ) : ( - denominationCounts.map(({denomination, count}) => ( + denominationCounts.map(({denomination, count}, index) => ( OPTIMIZE_DENOMINATION_THRESHOLD ? ( - + + + {count > OPTIMIZE_DENOMINATION_THRESHOLD ? (