Skip to content
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
17 changes: 14 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@lottiefiles/react-lottie-player": "3.6.0",
"@react-native-async-storage/async-storage": "2.1.1",
"@react-native-clipboard/clipboard": "1.16.1",
"@react-native-community/blur": "4.4.1",
"@react-native-community/checkbox": "0.5.17",
"@react-native-community/slider": "4.5.5",
"@react-native-picker/picker": "2.11.1",
Expand Down Expand Up @@ -111,7 +112,7 @@
"react-native-vision-camera": "4.6.3",
"react-native-web": "0.19.13",
"react-native-web-linear-gradient": "1.1.2",
"react-native-webview": "13.13.2",
"react-native-webview": "13.15.0",
"react-refresh": "0.16.0",
"react-router-dom": "7.1.5",
"react-router-native": "6.29.0",
Expand Down
4 changes: 3 additions & 1 deletion src/assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@
"scanToWithdraw": "Scan to receive bitcoin via",
"printReceipt": "Print receipt",
"receipt": "Receipt",
"downloadReceipt": "Download receipt"
"downloadReceipt": "Download receipt",
"readingBoltCard": "Reading BoltCard",
"boltcardSupported": "BoltCard supported"
},
"history": {
"title": "Transaction history",
Expand Down
47 changes: 34 additions & 13 deletions src/components/Blur/Blur.native.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,44 @@
import { View } from "@components";
import { BlurView } from "@react-native-community/blur";

type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`;

export type BlurProps = {
blurRadius: number;
backgroundColor?: RGBA;
zIndex?: number;
realBlur?: boolean;
};

export const Blur = ({ backgroundColor, zIndex }: BlurProps) => (
<View
style={{
backgroundColor,
zIndex,
position: "absolute",
top: 0,
left: 0,
bottom: 0,
right: 0
}}
/>
);
export const Blur = ({
backgroundColor,
zIndex,
blurRadius,
realBlur
}: BlurProps) =>
realBlur ? (
<BlurView
style={{
position: "absolute",
top: 0,
left: 0,
bottom: 0,
right: 0,
backgroundColor
}}
blurType="light"
blurAmount={blurRadius}
/>
) : (
<View
style={{
backgroundColor,
zIndex,
position: "absolute",
top: 0,
left: 0,
bottom: 0,
right: 0
}}
/>
);
2 changes: 1 addition & 1 deletion src/components/Blur/Blur.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Blur = ({
style={{
backgroundColor,
// @ts-ignore
backdropFilter: `blur(${blurRadius * 1.5}px)`,
backdropFilter: `blur(${blurRadius}px)`,
zIndex
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const Header = ({
left,
right,
backgroundOpacity = isWeb ? 0.25 : 0.5,
blurRadius = 6,
blurRadius = 8,
...props
}: HeaderProps) => {
const isLarge = useIsScreenSizeMin("large");
Expand Down
16 changes: 14 additions & 2 deletions src/components/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@ const { isNative } = platform;
export type TextProps = RootTextProps &
PropsWithChildren<
{
[key in "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "h7" | "h8"]?: boolean;
[key in
| "h1"
| "h2"
| "h3"
| "h4"
| "h5"
| "h6"
| "h7"
| "h8"
| "h9"]?: boolean;
} & {
weight?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
italic?: boolean;
Expand Down Expand Up @@ -40,7 +49,8 @@ const StyledText = styled(RootText)<TextProps>`
h5,
h6,
h7,
h8
h8,
h9
}) => {
const fontSize = (() => {
switch (true) {
Expand All @@ -60,6 +70,8 @@ const StyledText = styled(RootText)<TextProps>`
return 9;
case !!h8:
return 8;
case !!h9:
return 6.5;
default:
return 19;
}
Expand Down
133 changes: 101 additions & 32 deletions src/screens/Invoice/Invoice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ import {
CountdownCircleTimer,
Pressable,
Modal,
View
View,
Blur,
Image
} from "@components";
import {
faArrowLeft,
Expand Down Expand Up @@ -1021,20 +1023,83 @@ export const Invoice = () => {
>
{status !== "expired" &&
(isAlive ? (
<QR
value={fullUrl}
size={qrCodeSize}
{...(amlDecision
? {
image: {
source: require("@assets/images/bitcoin-white-border.png")
<>
<QR
value={fullUrl}
size={qrCodeSize}
{...(amlDecision
? {
image: {
source: require("@assets/images/bitcoin-white-border.png")
}
}
}
: {
icon: faGlobe
})}
ecl="M"
/>
: {
icon: faGlobe
})}
ecl="M"
/>
{isNfcLoading && (
<>
<Blur
realBlur
blurRadius={6}
backgroundColor="rgba(0, 0, 0, 0.25)"
/>
<ComponentStack
direction="vertical"
gapSize={8}
style={{
position: "absolute",
width: "100%",
height: "100%",
alignItems: "center",
justifyContent: "center"
}}
>
<Text
h2
style={{ fontSize: 26 }}
color={colors.white}
weight={700}
>
{t("readingBoltCard")}
</Text>
<View
style={{
height: 80,
width: 80,
alignItems: "center",
justifyContent: "center"
}}
>
<Loader
thickness={6}
color={colors.white}
size={80}
/>
<View
style={{
position: "absolute",
height: 58,
width: 58,
backgroundColor: colors.bitcoin,
borderRadius: 100
}}
/>
<Image
style={{
position: "absolute",
width: 52,
height: 52,
transform: [{ translateY: 2 }]
}}
source={require("@assets/images/bolt-card-white.png")}
/>
</View>
</ComponentStack>
</>
)}
</>
) : null)}
{status === "unconfirmed" &&
confirmations !== undefined &&
Expand Down Expand Up @@ -1137,29 +1202,33 @@ export const Invoice = () => {
}
}}
>
{isNfcLoading ? (
<ActivityIndicator
size="large"
color={
isNfcNeedsTap ? colors.primary : colors.white
}
/>
) : (
<S.NFCImage
source={
isNfcNeedsPermission
? require("@assets/images/bolt-card-white.png")
: isNfcNeedsTap
? require("@assets/images/bolt-card-black.png")
: require("@assets/images/bolt-card.png")
}
/>
)}
<S.NFCImage
source={
isNfcNeedsPermission
? require("@assets/images/bolt-card-white.png")
: isNfcNeedsTap
? require("@assets/images/bolt-card-black.png")
: require("@assets/images/bolt-card.png")
}
/>
{isNfcNeedsPermission && (
<S.NFCSwitchContainer>
<S.NFCSwitchContainerCircle />
</S.NFCSwitchContainer>
)}
<Text
style={{
position: "absolute",
bottom: -10.5,
lineHeight: 7,
textAlign: "center"
}}
h9
weight={600}
color={colors.grey}
>
{t("boltcardSupported")}
</Text>
</S.AskButton>
</S.NFCWrapper>
)}
Expand Down
Loading