Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,9 @@
"description": "Learn more about how this works"
},
"connectWalletKeyService_text_consentP2": {
"message": "By agreeing, you consent to us:"
"message": "By agreeing, you provide us consent to automatically access your wallet to securely add a key."
},
"connectWalletKeyService_text_consentP3": {
"message": "Automatically & securely adding a key to your wallet, and"
},
"connectWalletKeyService_text_consentP4": {
"message": "Sharing your browser and extension names with your wallet."
},
"connectWalletKeyService_text_consent_no_access_funds": {
"message": "Please note, this process does not involve accessing or handling your funds."
},
"connectWalletKeyService_label_consentAccept": {
Expand Down Expand Up @@ -324,8 +318,8 @@
"postInstallConsent_text_dataShared_yourWallet_title": {
"message": "With your wallet provider:"
},
"postInstallConsent_text_dataShared_yourWallet_keyName": {
"message": " If you choose automatic key addition, the extension shares:"
"postInstallConsent_text_dataShared_yourWallet_wa": {
"message": "Your wallet address."
},
"postInstallConsent_text_dataShared_yourWallet_keyConsent": {
"message": "Note: You will always be asked for consent before any connection."
Expand Down
10 changes: 3 additions & 7 deletions src/background/services/keyAutoAdd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,14 @@ type OnPortMessageListener = Parameters<
export class KeyAutoAddService {
private browser: Cradle['browser'];
private storage: Cradle['storage'];
private appName: Cradle['appName'];
private browserName: Cradle['browserName'];
private t: Cradle['t'];

constructor({
browser,
storage,
appName,
browserName,
t,
}: Pick<Cradle, 'browser' | 'storage' | 'appName' | 'browserName' | 't'>) {
Object.assign(this, { browser, storage, appName, browserName, t });
}: Pick<Cradle, 'browser' | 'storage' | 't'>) {
Object.assign(this, { browser, storage, t });
}

async addPublicKeyToWallet(
Expand All @@ -63,7 +59,7 @@ export class KeyAutoAddService {
publicKey,
keyId,
walletAddressUrl: walletAddress.id,
nickName: `${this.appName} Extension - ${this.browserName}`,
nickName: 'Web Monetization',
keyAddUrl,
},
onTabOpen,
Expand Down
8 changes: 0 additions & 8 deletions src/background/services/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ export class WalletService {
private events: Cradle['events'];
private browser: Cradle['browser'];
private logger: Cradle['logger'];
private appName: Cradle['appName'];
private browserName: Cradle['browserName'];
private t: Cradle['t'];

constructor({
Expand All @@ -51,8 +49,6 @@ export class WalletService {
events,
browser,
logger,
appName,
browserName,
t,
}: Cradle) {
Object.assign(this, {
Expand All @@ -62,8 +58,6 @@ export class WalletService {
events,
browser,
logger,
appName,
browserName,
t,
});
}
Expand Down Expand Up @@ -440,8 +434,6 @@ export class WalletService {
const keyAutoAdd = new KeyAutoAddService({
browser: this.browser,
storage: this.storage,
appName: this.appName,
browserName: this.browserName,
t: this.t,
});
this.events.emit('request_popup_close');
Expand Down
22 changes: 4 additions & 18 deletions src/pages/app/pages/PostInstallConsent.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import { Redirect } from 'wouter';
import { getBrowserName, isConsentRequired } from '@/shared/helpers';
import { isConsentRequired } from '@/shared/helpers';
import { getResponseOrThrow } from '@/shared/messages';
import { useBrowser, useMessage, useTranslation } from '@/app/lib/context';
import { useMessage, useTranslation } from '@/app/lib/context';
import { dispatch, useAppState } from '@/app/lib/store';
import { Button } from '@/pages/shared/components/ui/Button';
import { InfoCircle } from '@/pages/shared/components/Icons';
Expand Down Expand Up @@ -57,14 +57,6 @@ const Main = () => {

function DataShared() {
const t = useTranslation();
const browser = useBrowser();

const browserName = getBrowserName(browser, navigator.userAgent);
const [extensionName, setExtensionName] = React.useState('');
React.useEffect(() => {
const { name } = browser.runtime.getManifest();
setExtensionName(name);
}, [browser]);

return (
<div className="space-y-2">
Expand All @@ -76,13 +68,7 @@ function DataShared() {
{t('postInstallConsent_text_dataShared_yourWallet_title')}
</h4>
<ul className="list-disc ml-4">
<li>
{t('postInstallConsent_text_dataShared_yourWallet_keyName')}
<ul className="list-disc ml-4">
<li>Browser name: {browserName}</li>
<li>Extension name: {extensionName}</li>
</ul>
</li>
<li>{t('postInstallConsent_text_dataShared_websiteWallets_wa')}</li>
<li>
{t('postInstallConsent_text_dataShared_yourWallet_headers')}
<InformationTooltip
Expand All @@ -98,13 +84,13 @@ function DataShared() {
{t('postInstallConsent_text_dataShared_websiteWallets_title')}
</h4>
<ul className="list-disc ml-4">
<li>{t('postInstallConsent_text_dataShared_websiteWallets_wa')}</li>
<li>
{t('postInstallConsent_text_dataShared_websiteWallets_headers')}
<InformationTooltip
text={t('postInstallConsent_text_dataShared_headers')}
/>
</li>
<li>{t('postInstallConsent_text_dataShared_websiteWallets_wa')}</li>
</ul>
</div>
</div>
Expand Down
10 changes: 2 additions & 8 deletions src/pages/shared/components/AutoKeyAddConsent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,9 @@ export const AutoKeyAddConsent = ({ onAccept, onDecline, intent }: Props) => {
</a>
</p>

<div className="space-y-2 pt-12 text-medium text-left">
<div className="space-y-2 pt-12 text-medium">
<p>{t('connectWalletKeyService_text_consentP2')}</p>
<ul className="list-disc px-2 pb-4">
<li>{t('connectWalletKeyService_text_consentP3')}</li>
<li>{t('connectWalletKeyService_text_consentP4')}</li>
</ul>
<p className="text-center">
{t('connectWalletKeyService_text_consent_no_access_funds')}
</p>
<p>{t('connectWalletKeyService_text_consentP3')}</p>
</div>

<div className="mx-auto flex w-3/4 justify-around gap-4">
Expand Down
Loading