Skip to content

Commit 07bf2e6

Browse files
chore: remove unnecessary console.logs
1 parent 1241f55 commit 07bf2e6

File tree

9 files changed

+6
-24
lines changed

9 files changed

+6
-24
lines changed

source/pages/Send/SendTransaction.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,14 @@ export const SendTransaction = () => {
201201
alert.removeAll();
202202
alert.error(t('send.cantCompleteTxs'));
203203

204-
if (isExternal) setTimeout(console.log, 4000);
204+
if (isExternal) setTimeout(window.close, 4000);
205205
else setLoading(false);
206206
return error;
207207
}
208208
} else {
209209
alert.removeAll();
210210
alert.error(t('send.enoughFunds'));
211-
if (isExternal) setTimeout(console.log, 2000);
211+
if (isExternal) setTimeout(window.close, 2000);
212212
}
213213
};
214214

@@ -230,7 +230,7 @@ export const SendTransaction = () => {
230230
logError('error getting fees', 'Transaction', e);
231231
alert.removeAll();
232232
alert.error(t('send.txWillFail'), e);
233-
setTimeout(console.log, 3000);
233+
setTimeout(window.close, 3000);
234234
}
235235
};
236236

source/scripts/Background/controllers/DAppController.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ const DAppController = (): IDAppController => {
194194
id: PaliEvents,
195195
data: { method: string; params: any }
196196
): Promise<void> => {
197-
console.log({ id, data });
198197
new Promise<void>((resolve, reject) => {
199198
try {
200199
const hosts = Object.keys(_dapps) as unknown as string;

source/scripts/Background/controllers/message-handler/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export const onMessage = async (
4545
sender: chrome.runtime.MessageSender
4646
) => {
4747
const { host } = new URL(sender.url);
48-
console.log({ sender });
4948

5049
try {
5150
const response = await _messageHandler(host, message);

source/scripts/Background/controllers/message-handler/requests.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,6 @@ export const enable = async (
471471
data: { chain, chainId },
472472
});
473473

474-
console.log({ dAppActiveAddress });
475-
476474
if (!dAppActiveAddress)
477475
throw cleanErrorStack(ethErrors.provider.userRejectedRequest());
478476

source/scripts/Background/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ chrome.runtime.onMessage.addListener(
247247
);
248248

249249
chrome.runtime.onConnect.addListener(async (port) => {
250-
console.log({ port });
251250
if (port.name === 'pali') {
252251
handleIsOpen(true);
253252
}

source/scripts/ContentScript/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const sendToBackground = (
1515
};
1616

1717
const handleEthInjection = (message: any) => {
18-
console.log({ message });
1918
const isInjected = message?.isInjected;
2019

2120
if (typeof isInjected !== 'undefined') {
@@ -58,7 +57,7 @@ const start = () => {
5857
window.addEventListener(
5958
'message',
6059
(event) => {
61-
console.log({ event }, 'MESSAGE LISTENER' + '');
60+
console.debug({ event }, 'MESSAGE LISTENER');
6261
if (event.source !== window) return;
6362
if (!event.data) return;
6463

@@ -79,7 +78,7 @@ const start = () => {
7978
);
8079

8180
chrome.runtime.onMessage.addListener((message, sender) => {
82-
console.log({ message, sender }, 'START LISTENER');
81+
console.debug({ message, sender }, 'START LISTENER');
8382
});
8483
};
8584

source/scripts/ContentScript/inject/paliProviderEthereum.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ export class PaliInpageProviderEth extends BaseProvider {
9090
(event: any) => {
9191
const { method, params } = JSON.parse(event.detail);
9292

93-
console.log({ event }, 'event');
9493
switch (method) {
9594
case 'pali_accountsChanged':
9695
this._handleAccountsChanged(params);
@@ -271,7 +270,6 @@ export class PaliInpageProviderEth extends BaseProvider {
271270
currentAccounts: unknown[] | null,
272271
isEthAccounts = false
273272
): void {
274-
console.log({ currentAccounts });
275273
if (currentAccounts === null) {
276274
this._state.accounts = currentAccounts as any;
277275

@@ -343,7 +341,6 @@ export class PaliInpageProviderEth extends BaseProvider {
343341
* @emits PaliInpageProvider#connect
344342
*/
345343
private _handleConnect(chainId: string) {
346-
console.log({ chainId });
347344
if (!this._state.isConnected) {
348345
this._state.isConnected = true;
349346
this.emit('connect', { chainId });

source/scripts/ContentScript/inject/paliProviderSyscoin.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class PaliInpageProviderSys extends BaseProvider {
5151
const initialState = state as Parameters<
5252
PaliInpageProviderSys['_initializeState']
5353
>[0];
54-
console.log({ state, initialState });
54+
5555
this._initializeState(initialState);
5656
})
5757
.catch((error) =>
@@ -165,8 +165,6 @@ export class PaliInpageProviderSys extends BaseProvider {
165165
const { xpub, blockExplorerURL, isUnlocked, isBitcoinBased } =
166166
initialState;
167167

168-
console.log({ xpub, blockExplorerURL, isUnlocked, isBitcoinBased });
169-
170168
// EIP-1193 connect
171169
this._handleConnectedXpub(xpub);
172170
this._handleActiveBlockExplorer(blockExplorerURL);
@@ -230,7 +228,6 @@ export class PaliInpageProviderSys extends BaseProvider {
230228
xpub,
231229
isUnlocked,
232230
}: { isUnlocked?: boolean; xpub?: string | null } = {}) {
233-
console.log({ xpub, isUnlocked });
234231
if (typeof isUnlocked !== 'boolean') {
235232
console.error(
236233
'Pali: Received invalid isUnlocked parameter. Please report this bug.'

source/scripts/Provider/EthProvider.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,6 @@ export const EthProvider = (host: string, network?: INetwork) => {
215215
method,
216216
params
217217
);
218-
console.log({
219-
method,
220-
params,
221-
ethWeb3Provider: ethereumTransaction.web3Provider,
222-
requestResult,
223-
});
224218
return requestResult;
225219
} catch (error) {
226220
console.log({ requestError: error, method, params });

0 commit comments

Comments
 (0)