diff --git a/packages/dapp/src/messages/en.json b/packages/dapp/src/messages/en.json index 20d1ecf29..f88da3a1c 100644 --- a/packages/dapp/src/messages/en.json +++ b/packages/dapp/src/messages/en.json @@ -522,7 +522,7 @@ "delete-error": "Failed to delete backup", "delete-google": "Delete from Google Drive", "delete-success": "Successfully deleted backup", - "disable-popups": "Disable Pop-ups", + "disable-popups": "Disable Popups", "export": "Export", "export-desc": "Export encrypted Masca backup to a file.", "export-error": "Failed to export backup", @@ -535,7 +535,7 @@ "import-success": "Successfully imported backup", "not-implemented": "Not implemented yet", "popups": "Permissions", - "popups-desc": "Disabling pop-ups is very dangerous. We recommend setting trusted dapps instead!", + "popups-desc": "Disabling popups is very dangerous. We recommend setting trusted dapps instead!", "title": "Settings", "unknown-error": "Unknown error", "wallet-error": "Failed to get wallet ID" diff --git a/packages/docs/docs/integrate-masca/masca-connector.md b/packages/docs/docs/integrate-masca/masca-connector.md index 9e7ec0ad0..86a6e974a 100644 --- a/packages/docs/docs/integrate-masca/masca-connector.md +++ b/packages/docs/docs/integrate-masca/masca-connector.md @@ -232,9 +232,9 @@ const vpRes = await api.verifyData({ presentation: VP, verbose: true }); ## Snap Settings -`togglePopups` is used to enable/disable the `"Are you sure?"` alerts on any dapp. Pop-ups are enabled by default for user to approve every action. +`togglePopups` is used to enable/disable the `"Are you sure?"` alerts on any dapp. Popups are enabled by default for user to approve every action. -`addTrustedDapp` is used to add a dapp to the list of trusted dapps. Pop-ups do not appear on trusted dapps. This method can be called to add ANY dapp ONLY ON `masca.io`. On any other dapp origin is set automatically (You can only add dapp X on dapp X). Input is a hostname of a dapp +`addTrustedDapp` is used to add a dapp to the list of trusted dapps. Popups do not appear on trusted dapps. This method can be called to add ANY dapp ONLY ON `masca.io`. On any other dapp origin is set automatically (You can only add dapp X on dapp X). Input is a hostname of a dapp `removeTrustedDapp` is used to remove a dapp from the list of trusted dapps. This method can only remove dapps with the same origin (dApp X can only remove dapp X). Input is a hostname of a dapp diff --git a/packages/docs/docs/integrate-masca/rpc-methods.md b/packages/docs/docs/integrate-masca/rpc-methods.md index 07b703b12..6a0cd7a75 100644 --- a/packages/docs/docs/integrate-masca/rpc-methods.md +++ b/packages/docs/docs/integrate-masca/rpc-methods.md @@ -521,7 +521,7 @@ We recommend calling this method in `window.ethereum.on('accountsChanged', handl #### Description -`togglePopups` toggles pop-ups that show up whenever the user tries to save a VC, generate a VP, etc. Pop-ups are enabled by default to keep user in total control of their actions. With pop-ups disabled, a dapp can query user's credentials, etc. without them knowing. We recommend using `addTrustedDapp` instead to only trust specific dapps. +`togglePopups` toggles popups that show up whenever the user tries to save a VC, generate a VP, etc. Popups are enabled by default to keep user in total control of their actions. With popups disabled, a dapp can query user's credentials, etc. without them knowing. We recommend using `addTrustedDapp` instead to only trust specific dapps. ```typescript const response = await ethereum.request({ @@ -562,7 +562,7 @@ const response = await ethereum.request({ #### Description -`addTrustedDapp` adds a dapp to the list of trusted dapps. Trusted dapps do not show pop-ups. Dapps (other than `masca.io`) can only add themselves to the list of trusted dapps. Note that `origin` needs to be a hostname (`masca.io`) and not a full URL (`https://masca.io`) +`addTrustedDapp` adds a dapp to the list of trusted dapps. Trusted dapps do not show popups. Dapps (other than `masca.io`) can only add themselves to the list of trusted dapps. Note that `origin` needs to be a hostname (`masca.io`) and not a full URL (`https://masca.io`) ```typescript const response = await ethereum.request({ diff --git a/packages/snap/src/General.service.ts b/packages/snap/src/General.service.ts index f40a52604..a159e4d3b 100644 --- a/packages/snap/src/General.service.ts +++ b/packages/snap/src/General.service.ts @@ -124,7 +124,7 @@ class GeneralService { }): Promise { const state = StorageService.get(); - // If the user rejects the pop-up, throw an error + // If the user rejects the popup, throw an error if ( !(await UIService.changePermissionDialog({ permission: params.method, @@ -134,7 +134,7 @@ class GeneralService { throw new Error('User rejected permission change.'); } - // If the user accepts the pop-up, change the permission + // If the user accepts the popup, change the permission if (permissionExists(params.originHostname, state)) { state[CURRENT_STATE_VERSION].config.dApp.permissions[ @@ -195,7 +195,7 @@ class GeneralService { state[CURRENT_STATE_VERSION].config.dApp.disablePopups = true; return state[CURRENT_STATE_VERSION].config.dApp.disablePopups; } - throw new Error('User rejected pop-up toggle.'); + throw new Error('User rejected popup toggle.'); } else { state[CURRENT_STATE_VERSION].config.dApp.disablePopups = false; return state[CURRENT_STATE_VERSION].config.dApp.disablePopups; diff --git a/packages/snap/src/UI.service.ts b/packages/snap/src/UI.service.ts index 036c718e9..b62feb2a0 100644 --- a/packages/snap/src/UI.service.ts +++ b/packages/snap/src/UI.service.ts @@ -287,9 +287,9 @@ class UIService { static async togglePopupsDialog() { const uiPanel = panel([ - heading('Toggle Pop-ups'), + heading('Toggle Popups'), ...this.originWrapper, - text('Would you like to turn off pop-ups?'), + text('Would you like to turn off popups?'), divider(), text( 'This can result in a better user experience, but you will not be able to see what the dapp is requesting.' @@ -342,7 +342,7 @@ class UIService { params: { type: 'prompt', content: panel([ - heading('Enter the PIN you received from the issuer'), + heading('Enter the PIN you received from the issuer.'), ...this.originWrapper, ]), placeholder: 'PIN...', @@ -438,7 +438,7 @@ class UIService { const uiPanel = panel([ heading('Change Permission'), ...this.originWrapper, - text('Would you to change the following permissions?'), + text('Would you to change the following permission?'), divider(), text( `**${params.value ? 'Disable' : 'Enable'}** popups for **${ diff --git a/packages/snap/tests/e2e/addTrustedDapp.spec.ts b/packages/snap/tests/e2e/addTrustedDapp.spec.ts index bd5625685..30e0d4a2b 100644 --- a/packages/snap/tests/e2e/addTrustedDapp.spec.ts +++ b/packages/snap/tests/e2e/addTrustedDapp.spec.ts @@ -120,7 +120,7 @@ describe('addTrustedDapp', () => { expect.assertions(1); }); - it('Should not show pop-up if the dapp is already in the list', async () => { + it('Should not show popup if the dapp is already in the list', async () => { const spy = vi.spyOn(UIService, 'addTrustedDappDialog'); const defaultState = getDefaultSnapState(account); diff --git a/packages/snap/tests/e2e/changePermission.spec.ts b/packages/snap/tests/e2e/changePermission.spec.ts index 00ca785e9..ddff15c0d 100644 --- a/packages/snap/tests/e2e/changePermission.spec.ts +++ b/packages/snap/tests/e2e/changePermission.spec.ts @@ -62,7 +62,7 @@ describe('changePermission', () => { expect.assertions(3); }); - it('should not show pop-up if the dapp is already in the list', async () => { + it('should not show popup if the dapp is already in the list', async () => { const spyQuery = vi.spyOn(snapMock.rpcMocks, 'snap_dialog'); const defaultState = getDefaultSnapState(account); diff --git a/packages/snap/tests/e2e/removeTrustedDapp.spec.ts b/packages/snap/tests/e2e/removeTrustedDapp.spec.ts index e537f18e4..45e8027c9 100644 --- a/packages/snap/tests/e2e/removeTrustedDapp.spec.ts +++ b/packages/snap/tests/e2e/removeTrustedDapp.spec.ts @@ -143,7 +143,7 @@ describe('removeTrustedDapp', () => { expect.assertions(3); }); - it('Should show pop-up if the dapp is not in the list', async () => { + it('Should show popup if the dapp is not in the list', async () => { const spy = vi.spyOn(UIService, 'queryAllDialog'); const defaultState = getDefaultSnapState(account); diff --git a/packages/snap/tests/e2e/togglePopups.spec.ts b/packages/snap/tests/e2e/togglePopups.spec.ts index 3b469347a..d85d555c1 100644 --- a/packages/snap/tests/e2e/togglePopups.spec.ts +++ b/packages/snap/tests/e2e/togglePopups.spec.ts @@ -24,7 +24,7 @@ describe('togglePopups', () => { global.ethereum = snapMock as unknown as MetaMaskInpageProvider; }); - it('should enable pop-ups and then disable them', async () => { + it('should enable popups and then disable them', async () => { const res = (await onRpcRequest({ origin: 'http://localhost', request: {