Skip to content

Commit 53f22b7

Browse files
authored
Merge pull request #398 from getAlby/fix/issues
fix: minor issues
2 parents 39e5805 + a51b953 commit 53f22b7

File tree

13 files changed

+84
-122
lines changed

13 files changed

+84
-122
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![image](https://github.com/user-attachments/assets/c41c4ae2-ab4f-4fd8-8012-c6d3fbd8ca87)
1+
![image](https://github.com/user-attachments/assets/b68b6da1-a5e0-4958-afa9-c0ba83be7c59)
22

33
# Alby Go
44

components/Icons.tsx

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
PopiconsCircleExclamationLine as AlertCircleIcon,
66
PopiconsArrowLeftSolid as ArrowLeftIcon,
77
PopiconsBitcoinSolid as BitcoinIcon,
8-
PopiconsAddressBookSolid as BookUserIcon,
98
PopiconsCameraWebOffSolid as CameraOffIcon,
109
PopiconsCircleCheckLine as CheckCircleIcon,
1110
PopiconsCheckSolid as CheckIcon,
@@ -16,23 +15,17 @@ import {
1615
PopiconsCopySolid as CopyIcon,
1716
PopiconsEditSolid as EditIcon,
1817
PopiconsEditLine as EditLineIcon,
19-
PopiconsUploadSolid as ExportIcon,
2018
PopiconsTouchIdSolid as FingerprintIcon,
2119
PopiconsCircleInfoSolid as HelpCircleIcon,
2220
PopiconsImageSolid as ImageIcon,
23-
PopiconsKeyboardSolid as KeyboardIcon,
2421
PopiconsLinkExternalSolid as LinkIcon,
2522
PopiconsMapLine as MapLineIcon,
26-
PopiconsArrowDownLine as MoveDownIcon,
27-
PopiconsArrowUpLine as MoveUpIcon,
2823
PopiconsNotePlusLine as NotesIcon,
2924
PopiconsNotificationSquareSolid as NotificationIcon,
3025
PopiconsLifebuoySolid as OnboardingIcon,
3126
PopiconsClipboardTextSolid as PasteIcon,
3227
PopiconsClipboardTextLine as PasteLineIcon,
33-
PopiconsPinSolid as PinIcon,
3428
PopiconsQrCodeMinimalSolid as QRIcon,
35-
PopiconsReloadLine as RefreshIcon,
3629
PopiconsReloadSolid as ResetIcon,
3730
PopiconsFullscreenSolid as ScanIcon,
3831
PopiconsSettingsMinimalSolid as SettingsIcon,
@@ -70,7 +63,6 @@ interopIcon(AddUserIcon);
7063
interopIcon(AlertCircleIcon);
7164
interopIcon(ArrowLeftIcon);
7265
interopIcon(BitcoinIcon);
73-
interopIcon(BookUserIcon);
7466
interopIcon(CameraOffIcon);
7567
interopIcon(CheckCircleIcon);
7668
interopIcon(CheckIcon);
@@ -81,23 +73,17 @@ interopIcon(ChevronUpIcon);
8173
interopIcon(CopyIcon);
8274
interopIcon(EditIcon);
8375
interopIcon(EditLineIcon);
84-
interopIcon(ExportIcon);
8576
interopIcon(FingerprintIcon);
8677
interopIcon(HelpCircleIcon);
8778
interopIcon(ImageIcon);
88-
interopIcon(KeyboardIcon);
8979
interopIcon(LinkIcon);
9080
interopIcon(MapLineIcon);
91-
interopIcon(MoveDownIcon);
92-
interopIcon(MoveUpIcon);
9381
interopIcon(NotesIcon);
9482
interopIcon(NotificationIcon);
9583
interopIcon(OnboardingIcon);
9684
interopIcon(PasteIcon);
9785
interopIcon(PasteLineIcon);
98-
interopIcon(PinIcon);
9986
interopIcon(QRIcon);
100-
interopIcon(RefreshIcon);
10187
interopIcon(ResetIcon);
10288
interopIcon(ScanIcon);
10389
interopIcon(SettingsIcon);
@@ -121,7 +107,6 @@ export {
121107
AlertCircleIcon,
122108
ArrowLeftIcon,
123109
BitcoinIcon,
124-
BookUserIcon,
125110
CameraOffIcon,
126111
CheckCircleIcon,
127112
CheckIcon,
@@ -132,23 +117,17 @@ export {
132117
CopyIcon,
133118
EditIcon,
134119
EditLineIcon,
135-
ExportIcon,
136120
FingerprintIcon,
137121
HelpCircleIcon,
138122
ImageIcon,
139-
KeyboardIcon,
140123
LinkIcon,
141124
MapLineIcon,
142-
MoveDownIcon,
143-
MoveUpIcon,
144125
NotesIcon,
145126
NotificationIcon,
146127
OnboardingIcon,
147128
PasteIcon,
148129
PasteLineIcon,
149-
PinIcon,
150130
QRIcon,
151-
RefreshIcon,
152131
ResetIcon,
153132
ScanIcon,
154133
SettingsIcon,

components/Receiver.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function Receiver({ lightningAddress }: ReceiverProps) {
2020
<Text className="text-muted-foreground text-center font-semibold2">
2121
To
2222
</Text>
23-
<Text className="text-center text-foreground text-2xl font-medium2">
23+
<Text className="text-center text-foreground text-2xl font-semibold2">
2424
{lightningAddress.toLowerCase().replace("lightning:", "")}
2525
</Text>
2626
</View>

components/Screen.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { type NativeStackHeaderItemProps } from "@react-navigation/native-stack";
22
import { router, Stack } from "expo-router";
3-
import { TouchableOpacity } from "react-native";
3+
import { Platform, TouchableOpacity } from "react-native";
44
import { type StackAnimationTypes } from "react-native-screens";
55
import { ChevronLeftIcon } from "~/components/Icons";
66
import { Text } from "~/components/ui/text";
7+
import { cn } from "~/lib/utils";
78

89
type ScreenProps = {
910
title: string;
@@ -30,7 +31,12 @@ function Screen({ title, animation, right, left }: ScreenProps) {
3031
);
3132
},
3233
headerTitle: () => (
33-
<Text className="text-2xl font-semibold2 text-muted-foreground">
34+
<Text
35+
className={cn(
36+
Platform.OS === "android" && "mr-[42.18]", // this translates to width of headerLeft button
37+
"text-2xl text-center font-semibold2 text-muted-foreground",
38+
)}
39+
>
3440
{title}
3541
</Text>
3642
),

components/TransactionItem.tsx

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import dayjs from "dayjs";
33
import { router } from "expo-router";
44
import React from "react";
55
import { TouchableOpacity, View } from "react-native";
6-
import Animated from "react-native-reanimated";
76
import FailedTransactionIcon from "~/components/icons/FailedTransaction";
87
import PendingTransactionIcon from "~/components/icons/PendingTransaction";
98
import ReceivedTransactionIcon from "~/components/icons/ReceivedTransaction";
@@ -69,21 +68,11 @@ export function TransactionItem({ tx }: Props) {
6968
})
7069
}
7170
>
72-
{/* TODO: Replace this with animate-pulse class after Nativewind v5 migration */}
73-
<Animated.View
74-
style={
75-
tx.state === "pending" && {
76-
animationName: {
77-
from: { opacity: 0.4 },
78-
to: { opacity: 1 },
79-
},
80-
animationDuration: "1s",
81-
animationIterationCount: "infinite",
82-
animationTimingFunction: "ease-in-out",
83-
animationDirection: "alternate",
84-
}
85-
}
86-
className={cn("flex flex-row items-center gap-3 px-6 py-2 my-2")}
71+
<View
72+
className={cn(
73+
tx.state === "pending" && "animate-pulse",
74+
"flex flex-row items-center gap-3 px-6 py-2 my-2",
75+
)}
8776
>
8877
<View className="w-[44px] h-[44px] bg-muted rounded-full flex flex-col items-center justify-center">
8978
<Icon />
@@ -125,7 +114,7 @@ export function TransactionItem({ tx }: Props) {
125114
</Text>
126115
)}
127116
</View>
128-
</Animated.View>
117+
</View>
129118
</TouchableOpacity>
130119
);
131120
}

pages/Home.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export function Home() {
191191
)}
192192
</View>
193193
{/* Hide conversion if fiat currency is not selected */}
194-
{balanceDisplayMode !== "hidden" && fiatCurrency && (
194+
{fiatCurrency && (
195195
<View className="flex justify-center items-center">
196196
{balance &&
197197
!refreshingBalance &&
@@ -204,6 +204,7 @@ export function Home() {
204204
Math.floor(balance.balance / 1000),
205205
bitcoinDisplayFormat,
206206
)}
207+
{balanceDisplayMode === "hidden" && " "}
207208
</Text>
208209
) : (
209210
<Skeleton className="w-32 text-3xl" />

pages/Transactions.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
TouchableOpacity,
99
View,
1010
} from "react-native";
11-
import Animated from "react-native-reanimated";
1211
import { XIcon } from "~/components/Icons";
1312
import Screen from "~/components/Screen";
1413
import { TransactionItem } from "~/components/TransactionItem";
@@ -89,22 +88,9 @@ export function Transactions() {
8988
}
9089
ListFooterComponent={
9190
loadingNextPage ? (
92-
// TODO: Replace this with animate-pulse class after Nativewind v5 migration
93-
<Animated.Text
94-
style={{
95-
animationName: {
96-
from: { opacity: 0.4 },
97-
to: { opacity: 1 },
98-
},
99-
animationDuration: "1s",
100-
animationIterationCount: "infinite",
101-
animationTimingFunction: "ease-in-out",
102-
animationDirection: "alternate",
103-
}}
104-
className="text-center mb-5"
105-
>
91+
<Text className="text-center mb-5 animate-pulse">
10692
Loading more transactions...
107-
</Animated.Text>
93+
</Text>
10894
) : undefined
10995
}
11096
data={allTransactions}

pages/send/ConfirmPayment.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export function ConfirmPayment() {
115115
<Text
116116
numberOfLines={2}
117117
ellipsizeMode="tail"
118-
className="text-center text-foreground text-2xl font-medium2"
118+
className="text-center text-foreground text-2xl font-semibold2"
119119
>
120120
{decodedInvoice.description}
121121
</Text>

pages/send/PaymentSuccess.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,16 @@ export function PaymentSuccess() {
3838
<Tick />
3939
</View>
4040
<View className="flex-[0.55] flex flex-col justify-center items-center gap-4">
41-
<View className="flex">
42-
<Text className="text-2xl text-muted-foreground text-center font-semibold2">
43-
Sent to
44-
</Text>
45-
<Text className="text-center text-foreground text-2xl font-semibold2">
46-
{receiver.toLowerCase().replace("lightning:", "")}
47-
</Text>
48-
</View>
41+
{receiver && (
42+
<View className="flex">
43+
<Text className="text-2xl text-muted-foreground text-center font-semibold2">
44+
Sent to
45+
</Text>
46+
<Text className="text-center text-foreground text-2xl font-semibold2">
47+
{receiver.toLowerCase().replace("lightning:", "")}
48+
</Text>
49+
</View>
50+
)}
4951
<View className="flex items-center">
5052
<View className="flex flex-row items-end">
5153
<Text

pages/settings/wallets/ConnectWallet.tsx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ function ConnectView({
241241
expiresAt,
242242
returnTo,
243243
metadata,
244-
}: Omit<NWAOptions, "appPubkey" | "relayUrls"> & { maxAmount: number }) {
244+
}: Omit<NWAOptions, "appPubkey" | "relayUrls">) {
245245
const getFiatAmount = useGetFiatAmount();
246246
const [showDetails, setShowDetails] = React.useState(false);
247247
const closeModal = () => setShowDetails(false);
@@ -346,16 +346,21 @@ function ConnectView({
346346
)}
347347
budget
348348
</Text>
349-
<View>
350-
<Text className="text-right text-lg text-foreground font-medium2">
351-
{formatBitcoinAmount(maxAmount, bitcoinDisplayFormat)}
352-
</Text>
353-
{getFiatAmount && (
354-
<Text className="text-right text-sm text-muted-foreground">
355-
{getFiatAmount(Math.floor(maxAmount / 1000))}
349+
{maxAmount && (
350+
<View>
351+
<Text className="text-right text-lg text-foreground font-medium2">
352+
{formatBitcoinAmount(
353+
Math.floor(maxAmount / 1000),
354+
bitcoinDisplayFormat,
355+
)}
356356
</Text>
357-
)}
358-
</View>
357+
{getFiatAmount && (
358+
<Text className="text-right text-sm text-muted-foreground">
359+
{getFiatAmount(Math.floor(maxAmount / 1000))}
360+
</Text>
361+
)}
362+
</View>
363+
)}
359364
</View>
360365
)}
361366
<TouchableOpacity onPress={() => setShowDetails(true)}>

0 commit comments

Comments
 (0)