From f43f8088e57ff80f76b9a247570543e37e19a3fa Mon Sep 17 00:00:00 2001 From: Ayanami Date: Thu, 9 Jun 2022 02:27:56 +0900 Subject: [PATCH] Fixed TypeError bug --- src/Transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Transaction.js b/src/Transaction.js index 72c3bb2..c37d928 100644 --- a/src/Transaction.js +++ b/src/Transaction.js @@ -299,7 +299,7 @@ class Transaction { } _handleRpcError(e, method) { - if (e.error.error) { + if (e.error?.error) { // Sometimes ethers wraps known errors, unwrap it in this case e = e.error }