From 9526289f7669c4e79f2ec85b6eff0409633f3694 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Fri, 27 Jan 2023 18:31:31 -0500 Subject: [PATCH] tests: more robust checking of insufficient funds errors. --- src.ts/_tests/test-providers-errors.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src.ts/_tests/test-providers-errors.ts b/src.ts/_tests/test-providers-errors.ts index 19ad3ce7a..744c02e53 100644 --- a/src.ts/_tests/test-providers-errors.ts +++ b/src.ts/_tests/test-providers-errors.ts @@ -236,7 +236,9 @@ describe("Test Provider Blockchain Errors", function() { }); console.log(tx); }, (error) => { - return isError(error, "INSUFFICIENT_FUNDS"); + return (isError(error, "INSUFFICIENT_FUNDS") && + typeof(error.transaction.from) === "string" && + error.transaction.from.toLowerCase() === w.address.toLowerCase()); }); }); }