diff --git a/metamask-android-sdk/src/main/java/io/metamask/androidsdk/CommunicationClient.kt b/metamask-android-sdk/src/main/java/io/metamask/androidsdk/CommunicationClient.kt index 9dadb3d4..5bea4220 100644 --- a/metamask-android-sdk/src/main/java/io/metamask/androidsdk/CommunicationClient.kt +++ b/metamask-android-sdk/src/main/java/io/metamask/androidsdk/CommunicationClient.kt @@ -300,8 +300,9 @@ internal class CommunicationClient(context: Context, callback: EthereumEventCall } EthereumMethod.METAMASK_BATCH.value -> { val result = data.optString("result") - val results: List = Gson().fromJson(result, object : TypeToken>() {}.type) - completeRequest(id, Result.Success.Items(results)) + val results: List = Gson().fromJson(result, object : TypeToken>() {}.type) + val sanitisedResults = results.filterNotNull() + completeRequest(id, Result.Success.Items(sanitisedResults)) } else -> { val result = data.optString("result")