Use replacer for displaying pubkey

This commit is contained in:
Adw8 2024-08-09 13:41:07 +05:30
parent 9b838bab53
commit 4835bf47e5

View File

@ -253,6 +253,13 @@ const ApproveTransaction = ({ route }: ApproveTransactionProps) => {
navigation.navigate('Home');
};
const replacer = (key: string, value: any): any => {
if (value instanceof Uint8Array) {
return Buffer.from(value).toString('hex');
}
return value;
};
return (
<>
<ScrollView contentContainerStyle={styles.approveTransaction}>
@ -278,7 +285,7 @@ const ApproveTransaction = ({ route }: ApproveTransactionProps) => {
</Text>
<View style={styles.messageBody}>
<Text variant="bodyLarge">
{JSON.stringify(transactionMessage, null, 2)}
{JSON.stringify(transactionMessage, replacer, 2)}
</Text>
</View>
<>