-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
US-1878 Added MMKV as default WC storage. Added signTypedData request (…
…#769) * US-1878 Added MMKV as default WC storage. Added signTypedData request * Updated WC packages. MMKV removed console.logs. * Removed unsupported eth_signTypedData_v4 method * Removed console.log
- Loading branch information
1 parent
9d8306f
commit c9244a2
Showing
10 changed files
with
290 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { useTranslation } from 'react-i18next' | ||
import { StyleSheet } from 'react-native' | ||
|
||
import { Typography } from 'src/components' | ||
import { castStyle } from 'shared/utils' | ||
|
||
interface Props { | ||
message: string | ||
} | ||
|
||
export const SignMessageComponent = ({ message }: Props) => { | ||
const { t } = useTranslation() | ||
|
||
return ( | ||
<Typography type={'h3'} style={styles.typographyRowStyle}> | ||
{t('Message')}: {message.toString() || ''} | ||
</Typography> | ||
) | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
typographyRowStyle: castStyle.text({ | ||
marginBottom: 20, | ||
}), | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { ScrollView } from 'react-native' | ||
import { SignTypedDataArgs } from '@rsksmart/rif-wallet-core/dist/types' | ||
|
||
import { Typography } from 'src/components' | ||
|
||
import { requestStyles as styles } from './styles' | ||
|
||
interface Props { | ||
payload: SignTypedDataArgs | ||
} | ||
export const SignTypedDataComponent = ({ payload }: Props) => { | ||
const [domain, , messageData] = payload | ||
return ( | ||
<ScrollView> | ||
<Typography type={'h2'} style={styles.typographyRowStyle}> | ||
Domain: | ||
</Typography> | ||
<Typography type="h3" style={styles.typographyRowStyle}> | ||
Name: {domain.name} | ||
</Typography> | ||
<Typography type="h3" style={styles.typographyRowStyle}> | ||
Version: {domain.version} | ||
</Typography> | ||
<Typography type="h3" style={styles.typographyRowStyle}> | ||
ChainId: {domain.chainId} | ||
</Typography> | ||
<Typography type="h3" style={styles.typographyRowStyle}> | ||
Verifying Contract: {domain.verifyingContract} | ||
</Typography> | ||
|
||
<Typography type={'h2'} style={styles.typographyRowStyle}> | ||
Message: | ||
</Typography> | ||
<Typography type="h3" style={styles.typographyRowStyle}> | ||
From: {messageData.from.name} ({messageData.from.wallet}) | ||
</Typography> | ||
<Typography type="h3" style={styles.typographyRowStyle}> | ||
To: {messageData.to.name} ({messageData.to.wallet}) | ||
</Typography> | ||
|
||
<Typography type={'h2'} style={styles.typographyRowStyle}> | ||
Contents: | ||
</Typography> | ||
<Typography type="h3" style={styles.typographyRowStyle}> | ||
{messageData.contents} | ||
</Typography> | ||
</ScrollView> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { StyleSheet } from 'react-native' | ||
|
||
import { castStyle } from 'shared/utils' | ||
|
||
export const requestStyles = StyleSheet.create({ | ||
typographyHeaderStyle: castStyle.text({ | ||
marginBottom: 40, | ||
}), | ||
typographyRowStyle: castStyle.text({ | ||
marginBottom: 20, | ||
}), | ||
}) |
Oops, something went wrong.