From 1e2657190801998f2574a2a7d946961e9e96c082 Mon Sep 17 00:00:00 2001 From: Ryan Ghods Date: Thu, 7 Dec 2023 15:31:28 -0800 Subject: [PATCH] eip712 util: remove ethers logger (#436) * remove ethers logger * simplify type import --- src/utils/eip712/defaults.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/utils/eip712/defaults.ts b/src/utils/eip712/defaults.ts index 0ebc3fb3..90d5585a 100644 --- a/src/utils/eip712/defaults.ts +++ b/src/utils/eip712/defaults.ts @@ -1,9 +1,4 @@ -import { Logger } from "@ethersproject/logger"; -import { ethers, zeroPadValue } from "ethers"; - -import type { TypedDataField } from "@ethersproject/abstract-signer"; - -const logger = new Logger("defaults"); +import { ethers, zeroPadValue, TypedDataField } from "ethers"; const baseDefaults: Record = { integer: 0, @@ -50,7 +45,7 @@ export class DefaultGetter { const defaultValue = this.getDefaultValue(name); this.defaultValues[name] = defaultValue; if (!isNullish(defaultValue)) { - logger.throwError( + throw new Error( `Got non-empty value for type ${name} in default generator: ${defaultValue}`, ); } @@ -107,6 +102,6 @@ export class DefaultGetter { ); } - return logger.throwArgumentError(`unknown type: ${type}`, "type", type); + throw new Error(`unknown type: ${type}`); } }