From 586aa46965b41173bd071d7ca2bdccf70ef10b0c Mon Sep 17 00:00:00 2001 From: Bruno Barbieri <1247834+brunobar79@users.noreply.github.com> Date: Thu, 21 Mar 2024 12:13:39 -0400 Subject: [PATCH] FIx for react native (#12) --- src/utils/ethereum.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/ethereum.ts b/src/utils/ethereum.ts index a2283b7..86b4a3a 100644 --- a/src/utils/ethereum.ts +++ b/src/utils/ethereum.ts @@ -4,7 +4,7 @@ export const normalizeTransactionResponsePayload = ( payload: TransactionResponse, ): TransactionResponse => { // Firefox can't serialize functions - if (navigator.userAgent.toLowerCase().includes('firefox')) { + if (navigator.userAgent?.toLowerCase().includes('firefox')) { // eslint-disable-next-line @typescript-eslint/no-unused-vars const { wait: _, ...cleanedPayload } = payload; return cleanedPayload as TransactionResponse;