From d4bef5f951925f001566c2824ecfaa2460f60c09 Mon Sep 17 00:00:00 2001 From: Kevin Vitale Date: Fri, 9 Sep 2022 12:54:28 -0400 Subject: [PATCH] [LATTICE] errors thrown should be objects --- main/signers/lattice/Lattice/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/signers/lattice/Lattice/index.ts b/main/signers/lattice/Lattice/index.ts index ff3aa6383..147943844 100644 --- a/main/signers/lattice/Lattice/index.ts +++ b/main/signers/lattice/Lattice/index.ts @@ -109,7 +109,7 @@ export default class Lattice extends Signer { return paired } catch (e) { - const errorMessage = this.handleError('could not connect to Lattice', e as string) + const errorMessage = this.handleError('could not connect to Lattice', (e as Error).message) this.emit('error') @@ -153,7 +153,7 @@ export default class Lattice extends Signer { return hasActiveWallet } catch (e) { - const errorMessage = this.handleError('could not pair to Lattice', e as string) + const errorMessage = this.handleError('could not pair to Lattice', (e as Error).message) this.emit('error') @@ -204,7 +204,7 @@ export default class Lattice extends Signer { }) } - const errorMessage = this.handleError('could not derive addresses', e as string) + const errorMessage = this.handleError('could not derive addresses', (e as Error).message) this.emit('error') throw new Error(errorMessage)