From a8116df2dc7695dac592cb557f6cfc6616471c6d Mon Sep 17 00:00:00 2001 From: Luphia Chang Date: Tue, 20 Jun 2023 21:30:11 +0800 Subject: [PATCH] Hotfix for signTypedData --- index.d.ts | 2 -- package.json | 2 +- src/index.ts | 8 ++------ 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/index.d.ts b/index.d.ts index 31f1ef6..24cbd92 100644 --- a/index.d.ts +++ b/index.d.ts @@ -3,7 +3,6 @@ import IBlockchain from "./src/interfaces/iblockchain"; import IConnector from "./src/interfaces/iconnector"; import IEnv from "./src/interfaces/ienv"; import IJSON from "./src/interfaces/ijson"; -import WalletConnect from "@walletconnect/core"; declare class Lunar { private static instance: Lunar; @@ -20,7 +19,6 @@ declare class Lunar { public isConnected: boolean; public address: string; public blockchain: IBlockchain; - public walletConnect: WalletConnect | undefined; public constructor(); public resetEvents(): void; diff --git a/package.json b/package.json index 2677f03..1961be0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cafeca/lunar", - "version": "0.5.8", + "version": "0.5.9", "description": "Blockchain Connect Module", "main": "dist/index.js", "files": [ diff --git a/src/index.ts b/src/index.ts index 88b20a3..47b535d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,8 +9,6 @@ import { recoverAddress } from './libs/common'; import IJSON from './interfaces/ijson'; import { EventEmitter } from 'events'; import { keccak256 } from '@cafeca/keccak'; -import WalletConnect from "@walletconnect/core"; -// import { version } from '../package.json'; declare global { interface Window { Lunar: any; } @@ -23,12 +21,10 @@ declare global { export class Lunar { private static instance: Lunar; - // static version = `v${version}`; - public static version = `v0.5.8`; + public static version = `v0.5.9`; public static Blockchains = Blockchains; public static Wallets = Wallets; public static keccak256 = keccak256; - public walletConnect: WalletConnect|undefined; public static getInstance(): Lunar { if (!Lunar.instance) { @@ -60,7 +56,6 @@ export class Lunar { constructor() { this.connector = ConnectorFactory.create(); - this.walletConnect = new WalletConnect(); } public resetEvents() { @@ -195,6 +190,7 @@ export class Lunar { try { result = await this.connector?.signTypedData(params) || '0x'; } catch (error) { + throw error; // ++ ToDo: finish in v0.6.0 } return result;