From a04fe153be124bc0df7f5aaa3d0ccbfb295da352 Mon Sep 17 00:00:00 2001 From: Matthew To Date: Tue, 12 Mar 2024 12:12:48 +0800 Subject: [PATCH 1/2] fix: unhandled event --- src/pages/dapp/browser/useIPCProvider.ts | 7 ------- src/pages/dapp/types.ts | 9 +-------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/pages/dapp/browser/useIPCProvider.ts b/src/pages/dapp/browser/useIPCProvider.ts index 0ad809e77..3bf6d8375 100644 --- a/src/pages/dapp/browser/useIPCProvider.ts +++ b/src/pages/dapp/browser/useIPCProvider.ts @@ -555,13 +555,6 @@ export const useIPCProvider = (props: IUseIPCProviderProps) => { } } break; - case 'openLinkInDefaultBrowser': - { - const { url } = event.object; - const { shell } = window.require('electron'); - shell.openExternal(url); - } - break; default: break; } diff --git a/src/pages/dapp/types.ts b/src/pages/dapp/types.ts index c513ec21b..c1d6c23a8 100644 --- a/src/pages/dapp/types.ts +++ b/src/pages/dapp/types.ts @@ -22,7 +22,6 @@ export namespace DappBrowserIPC { export type EventName = | 'addEthereumChain' | 'ecRecover' - | 'openLinkInDefaultBrowser' | 'requestAccounts' | 'signMessage' | 'signPersonalMessage' @@ -142,12 +141,7 @@ export namespace DappBrowserIPC { chainId: string; } } - export interface OpenLinkInDefaultBrowserEvent extends BaseEvent { - name: 'openLinkInDefaultBrowser'; - object: { - url: string; - } - } + export type Event = | SignTransactionEvent @@ -160,7 +154,6 @@ export namespace DappBrowserIPC { | WatchAssetEvent | AddEthereumChainEvent | SwitchEthereumChainEvent - | OpenLinkInDefaultBrowserEvent | TokenApprovalEvent; } From d1ddd46feac292d9668b6145d98b05edf1ba04c9 Mon Sep 17 00:00:00 2001 From: Matthew To Date: Tue, 12 Mar 2024 13:08:24 +0800 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 618fd04da..091588aaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file. *Unreleased* *Released* +## [v1.5.0] - 2024-03-12 +### Additions +- Security enhancement on DApp Browser ## [v1.4.9] - 2024-03-07 ### Additions - Security enhancement on DApp Browser diff --git a/package.json b/package.json index e2af56094..87225273a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chain-desktop-wallet", - "version": "1.4.9", + "version": "1.5.0", "description": "Crypto.com DeFi Desktop Wallet App", "repository": "github:crypto-com/chain-desktop-wallet", "author": "Crypto.com ",