From 8eee46e669b9be268270bfba4f9799135bc85967 Mon Sep 17 00:00:00 2001 From: Adw8 Date: Fri, 9 Aug 2024 13:41:07 +0530 Subject: [PATCH] Use replacer for displaying pubkey --- src/screens/ApproveTransaction.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/screens/ApproveTransaction.tsx b/src/screens/ApproveTransaction.tsx index 83229dd..c6d2912 100644 --- a/src/screens/ApproveTransaction.tsx +++ b/src/screens/ApproveTransaction.tsx @@ -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 ( <> @@ -278,7 +285,7 @@ const ApproveTransaction = ({ route }: ApproveTransactionProps) => { - {JSON.stringify(transactionMessage, null, 2)} + {JSON.stringify(transactionMessage, replacer, 2)} <>