Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Shenshin <[email protected]>
  • Loading branch information
AlexanderShenshin committed Apr 28, 2024
1 parent 21b76d2 commit 473c895
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
18 changes: 10 additions & 8 deletions example/src/components/views/QRCodeView.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Buffer } from '@craftzdog/react-native-buffer'
import React, { useState } from 'react'
import { StyleSheet, View, Text, Platform, Image } from 'react-native'
import { Buffer } from "@craftzdog/react-native-buffer"
import QRCode from 'react-native-qrcode-svg'

const styles = StyleSheet.create({
Expand Down Expand Up @@ -33,16 +33,18 @@ export const QRCodeView: React.FC<Props> = ({ value, size }) => {
const onQRGenerationError = () => {
setIsInvalidQR(true)
}

return (
<View style={styles.container}>
{
{
// TODO: Remove this after Android/iOS QR content inconsistency fixed
Platform.OS === 'ios'
? <Image source={{ uri: getBase64Uri(value) }} width={size} height={size} resizeMode='contain' />
: <QRCode ecl="L" value={value} size={size} onError={onQRGenerationError} />
}
{ isInvalidQR && <Text style={styles.errorMessage}>{'QR generation error'}</Text> }
Platform.OS === 'ios' ? (
<Image source={{ uri: getBase64Uri(value) }} width={size} height={size} resizeMode="contain" />
) : (
<QRCode ecl="L" value={value} size={size} onError={onQRGenerationError} />
)
}
{isInvalidQR && <Text style={styles.errorMessage}>{'QR generation error'}</Text>}
</View>
)
}
4 changes: 2 additions & 2 deletions example/src/screens/ProximityPresentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ export const ProximityPresentation: React.FC<Props> = () => {
</Text>
</View>
<View style={{ height: qrContainerSize, width: qrContainerSize, ...styles.qrContainer }}>
{ qrCodeContent && <QRCodeView value={qrCodeContent} size={qrSize} /> }
{qrCodeContent && <QRCodeView value={qrCodeContent} size={qrSize} />}
</View>
<View style={styles.bottomIconContainer}>
{ isAndroid && <Text style={styles.secondaryHeaderText}>Or use the NFC</Text> }
{isAndroid && <Text style={styles.secondaryHeaderText}>Or use the NFC</Text>}
<Icon style={{ marginTop: 8 }} name={bottomIconName} color={'black'} size={64} />
</View>
</SafeAreaView>
Expand Down
5 changes: 2 additions & 3 deletions src/EudiWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ export abstract class EudiWallet {
sendSessionTerminationMessage: boolean = true,
useTransportSpecificSessionTermination: boolean = false,
): void {
if(Platform.OS === 'android') {
if (Platform.OS === 'android') {
EudiWalletModule.stopPresentation(sendSessionTerminationMessage, useTransportSpecificSessionTermination)
}
else {
} else {
EudiWalletModule.stopPresentation()
}
}
Expand Down

0 comments on commit 473c895

Please sign in to comment.