diff --git a/src/i18n_messages/en.json b/src/i18n_messages/en.json index 0bf46321..d9fef0d0 100644 --- a/src/i18n_messages/en.json +++ b/src/i18n_messages/en.json @@ -68,7 +68,9 @@ "share": "Share", "showMore": "Show more", "success": "Success!", - "copySuccessParam": "Copied %{param}" + "copySuccessParam": "Copied %{param}", + "hide": "Hide", + "show": "Show" }, "confirmBackupRecovery": "Do you really want to recover ecash from the backup?", "confirmMintRemoval": "Do you really want to remove %{hostname} - %{shortname} from the wallet?", diff --git a/src/screens/MintInfoScreen.tsx b/src/screens/MintInfoScreen.tsx index 15b7494c..7750fd3c 100644 --- a/src/screens/MintInfoScreen.tsx +++ b/src/screens/MintInfoScreen.tsx @@ -99,42 +99,44 @@ function NutItem(props: { const textDim = useThemeColor('textDim') const $nutItem: ViewStyle = { flexDirection: 'row', - width: props.display === 'row' ? '100%' : (props?.width ?? 'auto'), alignItems: 'center', justifyContent: 'flex-start', - gap: spacing.extraSmall + gap: spacing.extraSmall, + // borderWidth: 1, borderColor: 'red' } const $nutIcon: ViewStyle = { paddingHorizontal: 0 } return ( - + + icon={props.enabled ? 'faCheckCircle' : 'faXmark'} + color={props.enabled ? colors.palette.success200 : colors.palette.angry500} + size={16} + containerStyle={$nutIcon} + /> NUT-{props.nutNumber} - {props.nutInfo && props.nutInfo.methods.map(m => (<> - - {/* */} - {m.min_amount && m.max_amount - ? - : m.min_amount && !m.max_amount ? - : m.max_amount && !m.min_amount ? - : void 0 - } - {MintUnits.includes(m.unit as MintUnit) ? ( - - ) : (<> - - - )} - ))} + {props.nutInfo && + {props.nutInfo.methods.map(m => ( + {/* */} + + {typeof m.min_amount !== 'undefined' && typeof m.max_amount !== 'undefined' // for whatever reason, the methods don't always have min/max amounts + ? + : typeof m.min_amount !== 'undefined' && typeof m.max_amount === 'undefined' ? + : typeof m.max_amount !== 'undefined' && typeof m.min_amount === 'undefined' ? + : void 0 + } + {MintUnits.includes(m.unit as MintUnit) ? ( + + ) : (<> + + + )} + ))} + } ) } @@ -150,7 +152,7 @@ function NutsCard(props: {info: GetInfoResponse}) { } else if ('supported' in info) { // simple nutsSimple.push([nut, info.supported]) } else { - nutsSimple.push([nut, false]) // fallback or detailed, but disabled nut + nutsSimple.push([nut, false]) // fallback or detailed but disabled nut } } @@ -199,6 +201,7 @@ function MintInfoDetails(props: { info: GetInfoResponse, popupMessage: (msg: str const missingComponent = @@ -218,7 +221,7 @@ function MintInfoDetails(props: { info: GetInfoResponse, popupMessage: (msg: str .filter(([k, v]) => k.trim() !== '') // filter out empty contacts valueComponent = (contacts.length === 0) ? missingComponent : (<> {contacts.map(([platform, user]) => ( - + > = observer