Skip to content

Commit

Permalink
Merge pull request #1347 from Tonomy-Foundation/testnet
Browse files Browse the repository at this point in the history
Master release: Fixed tooltip misalignment and qr scanner not working immediatly
  • Loading branch information
sadiabbasi authored Jan 8, 2025
2 parents 3ea82c9 + dd24897 commit 45918f0
Show file tree
Hide file tree
Showing 8 changed files with 184 additions and 158 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tonomy-id",
"version": "0.145.2",
"version": "0.147.0",
"type": "commonjs",
"scripts": {
"eas-build-pre-install": "corepack enable",
Expand Down Expand Up @@ -40,7 +40,7 @@
"@react-navigation/native-stack": "^6.11.0",
"@sentry/react-native": "~5.24.3",
"@sinonjs/text-encoding": "^0.7.3",
"@tonomy/tonomy-id-sdk": "0.25.0-development.2",
"@tonomy/tonomy-id-sdk": "0.25.0",
"@veramo/core": "^6.0.0",
"@walletconnect/core": "^2.17.2",
"@walletconnect/react-native-compat": "^2.17.2",
Expand Down
9 changes: 8 additions & 1 deletion src/components/QRCodeScanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ export default function QRCodeScanner(props: Props) {
const [torchOn, setTorchOn] = useState(false);
const [permission, requestPermission] = useCameraPermissions();
const errorStore = useErrorStore();
const [cameraActive, setCameraActive] = useState(false);

useFocusEffect(
useCallback(() => {
setTorchOn(false);
setCameraActive(true);

const getBarCodeScannerPermissions = async () => {
try {
Expand All @@ -88,14 +90,19 @@ export default function QRCodeScanner(props: Props) {
};

getBarCodeScannerPermissions();

return () => {
setCameraActive(false);
setTorchOn(false);
};
}, [errorStore, permission?.granted, requestPermission])
);

const toggleFlashLight = () => setTorchOn(!torchOn);

return (
<>
{permission?.granted ? (
{permission?.granted && cameraActive ? (
<View style={styles.QRContainer}>
<ScannerOverlay isFlashlightOn={torchOn} onPress={toggleFlashLight} />
<CameraBarcodeScanner onBarCodeScanned={props.onScan} enableTorch={torchOn} />
Expand Down
6 changes: 4 additions & 2 deletions src/components/Transaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,10 @@ export function TransactionFee({ transactionFee }: { transactionFee: Transaction
else if (isNegligible) {
return (
<TouchableOpacity onPress={() => refMessage.current?.open()} style={{ marginLeft: 2 }}>
<Text>negligible</Text>
<WarningCircle width={15} height={15} color={theme.colors.success} />
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<Text>negligible </Text>
<WarningCircle width={15} height={15} color={theme.colors.success} />
</View>
</TouchableOpacity>
);
} else {
Expand Down
12 changes: 7 additions & 5 deletions src/containers/SSOLoginContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import useErrorStore from '../store/errorStore';
import { useNavigation } from '@react-navigation/native';
import { Images } from '../assets';
import Debug from 'debug';
import { SafeAreaView } from 'react-native-safe-area-context';

const debug = Debug('tonomy-id:containers:SSOLoginContainer');

Expand Down Expand Up @@ -192,11 +193,12 @@ export default function SSOLoginContainer({ payload, platform }: { payload: stri
<LayoutComponent
body={
<View style={styles.container}>
<Image
style={[styles.logo, commonStyles.marginBottom]}
source={Images.GetImage('logo1024')}
></Image>

<SafeAreaView>
<Image
style={[styles.logo, commonStyles.marginBottom]}
source={Images.GetImage('logo1024')}
></Image>
</SafeAreaView>
{username && <TH1 style={commonStyles.textAlignCenter}>{username}</TH1>}

{ssoApp && (
Expand Down
Loading

0 comments on commit 45918f0

Please sign in to comment.