mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-08-12 09:23:20 +00:00
Fix wallet screen with NWC cards, improve transaction detail
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "minibits_wallet",
|
||||
"version": "0.2.2-beta.13",
|
||||
"version": "0.2.2-beta.14",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"android:clean": "cd android && ./gradlew clean",
|
||||
|
||||
@@ -88,12 +88,18 @@ export const TranDetailScreen = observer(function TranDetailScreen({ route }: Pr
|
||||
const [note, setNote] = useState<string>('')
|
||||
const [mint, setMint] = useState<Mint | undefined>()
|
||||
const [isAuditTrailVisible, setIsAuditTrailVisible] = useState<boolean>(false)
|
||||
const [isTokenTrackingVisible, setIsTokenTrackingVisible] = useState<boolean>(false)
|
||||
|
||||
const toggleAuditTrail = () => {
|
||||
LayoutAnimation.easeInEaseOut()
|
||||
setIsAuditTrailVisible(!isAuditTrailVisible)
|
||||
}
|
||||
|
||||
const toggleTokenTracking = () => {
|
||||
LayoutAnimation.easeInEaseOut()
|
||||
setIsTokenTrackingVisible(!isTokenTrackingVisible)
|
||||
}
|
||||
|
||||
useFocusEffect(useCallback(() => {
|
||||
try {
|
||||
const tx = transactionsStore.findById(id, true) // load full tokens
|
||||
@@ -402,40 +408,56 @@ export const TranDetailScreen = observer(function TranDetailScreen({ route }: Pr
|
||||
label='Token tracking'
|
||||
ContentComponent={
|
||||
<>
|
||||
{transaction.inputToken && (
|
||||
<ListItem
|
||||
text='Inputs'
|
||||
subText={transaction.inputToken}
|
||||
subTextEllipsizeMode='middle'
|
||||
subTextStyle={{fontFamily: typography.code?.normal}}
|
||||
<ListItem
|
||||
text='Logged ecash tokens for debugging purposes'
|
||||
RightComponent={
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={copyInputToken}
|
||||
text={translate("common.copy")}
|
||||
onPress={toggleTokenTracking}
|
||||
text={isTokenTrackingVisible ? translate("common.hide") : translate("common.show")}
|
||||
preset="secondary"
|
||||
/>
|
||||
</View>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{transaction.outputToken && (
|
||||
<ListItem
|
||||
text='Outputs'
|
||||
subText={transaction.outputToken}
|
||||
subTextEllipsizeMode='middle'
|
||||
subTextStyle={{fontFamily: typography.code?.normal}}
|
||||
RightComponent={
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={copyOutputToken}
|
||||
text={translate("common.copy")}
|
||||
preset="secondary"
|
||||
/>
|
||||
</View>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{isTokenTrackingVisible && (
|
||||
<>
|
||||
{transaction.inputToken && (
|
||||
<ListItem
|
||||
text='Inputs'
|
||||
subText={transaction.inputToken}
|
||||
subTextEllipsizeMode='middle'
|
||||
subTextStyle={{fontFamily: typography.code?.normal}}
|
||||
RightComponent={
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={copyInputToken}
|
||||
text={translate("common.copy")}
|
||||
preset="secondary"
|
||||
/>
|
||||
</View>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{transaction.outputToken && (
|
||||
<ListItem
|
||||
text='Outputs'
|
||||
subText={transaction.outputToken}
|
||||
subTextEllipsizeMode='middle'
|
||||
subTextStyle={{fontFamily: typography.code?.normal}}
|
||||
RightComponent={
|
||||
<View style={$rightContainer}>
|
||||
<Button
|
||||
onPress={copyOutputToken}
|
||||
text={translate("common.copy")}
|
||||
preset="secondary"
|
||||
/>
|
||||
</View>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
}
|
||||
/>
|
||||
@@ -1975,6 +1997,7 @@ const $contentContainer: TextStyle = {
|
||||
// flex: 1,
|
||||
padding: spacing.extraSmall,
|
||||
marginTop: -spacing.extraLarge * 1.5,
|
||||
paddingBottom: spacing.medium,
|
||||
}
|
||||
|
||||
const $tranAmount: TextStyle = {
|
||||
|
||||
@@ -1098,9 +1098,6 @@ const $tabContainer: TextStyle = {
|
||||
// borderColor: 'green',
|
||||
}
|
||||
|
||||
const $promoContainer: TextStyle = {
|
||||
marginTop: -spacing.extraLarge * 1.5,
|
||||
}
|
||||
|
||||
const $rightContainer: ViewStyle = {
|
||||
padding: spacing.extraSmall,
|
||||
@@ -1110,30 +1107,15 @@ const $rightContainer: ViewStyle = {
|
||||
|
||||
const $card: ViewStyle = {
|
||||
marginBottom: spacing.small,
|
||||
//paddingTop: 0,
|
||||
marginHorizontal: spacing.extraSmall,
|
||||
}
|
||||
|
||||
const $cardHeading: TextStyle = {
|
||||
fontFamily: typography.primary?.medium,
|
||||
fontSize: verticalScale(18),
|
||||
}
|
||||
|
||||
const $unitBalance: TextStyle = {
|
||||
fontSize: verticalScale(48),
|
||||
lineHeight: verticalScale(48)
|
||||
}
|
||||
|
||||
const $promoIconContainer: ViewStyle = {
|
||||
marginTop: -spacing.large,
|
||||
alignItems: 'center',
|
||||
}
|
||||
|
||||
const $promoText: TextStyle = {
|
||||
padding: spacing.small,
|
||||
textAlign: 'center',
|
||||
fontSize: 18,
|
||||
}
|
||||
|
||||
const $item: ViewStyle = {
|
||||
marginHorizontal: spacing.micro,
|
||||
@@ -1148,7 +1130,7 @@ const $nwcContainer: ViewStyle = {
|
||||
const $bottomContainer: ViewStyle = {
|
||||
justifyContent: 'flex-end',
|
||||
paddingHorizontal: spacing.extraSmall,
|
||||
marginTop: spacing.large,
|
||||
// marginTop: spacing.small,
|
||||
marginBottom: 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user