From 3249ce096031d0cb745730fcda088505af7c5d07 Mon Sep 17 00:00:00 2001 From: "Hoang Nguyen (Tino)" Date: Wed, 25 Sep 2024 17:18:58 +0700 Subject: [PATCH] chore: remove unused messages, bump version (#16) --- packages/connect/package.json | 2 +- .../src/connectors/ronin-wallet/RoninWalletConnector.ts | 2 +- packages/connect/src/types/connector-error.ts | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/connect/package.json b/packages/connect/package.json index 1c86886..19ad95f 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -1,6 +1,6 @@ { "name": "@sky-mavis/tanto-connect", - "version": "0.0.1-alpha.2", + "version": "0.0.1-alpha.3", "description": "Tanto Connect", "main": "dist/cjs/index.js", "module": "dist/mjs/index.js", diff --git a/packages/connect/src/connectors/ronin-wallet/RoninWalletConnector.ts b/packages/connect/src/connectors/ronin-wallet/RoninWalletConnector.ts index e07cd20..a82a92d 100644 --- a/packages/connect/src/connectors/ronin-wallet/RoninWalletConnector.ts +++ b/packages/connect/src/connectors/ronin-wallet/RoninWalletConnector.ts @@ -43,7 +43,7 @@ export class RoninWalletConnector extends BaseConnector { return connectResults; } catch (err) { if ((err as any as { code: number; message: string })?.code === 4001) { - throw new ConnectorError(ConnectorErrorType.USER_REJECTED_SESSION_REQUEST, err); + throw new ConnectorError(ConnectorErrorType.USER_REJECTED_REQUEST, err); } throw new ConnectorError(ConnectorErrorType.CONNECT_FAILED, err); } diff --git a/packages/connect/src/types/connector-error.ts b/packages/connect/src/types/connector-error.ts index 0d9dbc5..a4bc320 100644 --- a/packages/connect/src/types/connector-error.ts +++ b/packages/connect/src/types/connector-error.ts @@ -1,11 +1,8 @@ export enum ConnectorErrorType { PROVIDER_NOT_FOUND = 'ProviderNotFound', - WALLET_IS_LOCKED = 'WalletIsLocked', CONNECT_FAILED = 'ConnectFailed', - USER_REJECTED_SESSION_REQUEST = 'UserRejectedSessionRequest', - INVALID_PARAMS = 'InvalidParams', + USER_REJECTED_REQUEST = 'UserRejectedRequest', NOT_INSTALLED = 'NotInstalled', - UNKNOWN = 'Unknown', SWITCH_CHAIN_NOT_SUPPORTED = 'SwitchChainNotSupported', }