Skip to content
Closed
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
5 changes: 5 additions & 0 deletions packages/adapters/bitcoin/src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,15 @@ export class BitcoinAdapter extends AdapterBlueprint<BitcoinConnector> {
): Promise<AdapterBlueprint.SignMessageResult> {
const connector = params.provider as BitcoinConnector

console.log('>> Bitcoin Adapter: Connector', connector)

if (!connector) {
throw new Error('BitcoinAdapter:signMessage - connector is undefined')
}

console.log('>> Bitcoin Adapter: Signing Message')
console.log('>> Bitcoin Adapter: Connector.signMessage', connector.signMessage)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Bitcoin Adapter Contains Unnecessary Debug Logs

The signMessage method in the Bitcoin adapter includes several console.log debugging statements. These appear to be temporary logs, as indicated by the PR title "DO NOT MERGE - BTC logs", and shouldn't be part of the final codebase.

Fix in Cursor Fix in Web


Comment on lines +311 to +319
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console.log statements should not be committed to production code. Consider using a proper logging framework or removing these statements before merging.

Suggested change
console.log('>> Bitcoin Adapter: Connector', connector)
if (!connector) {
throw new Error('BitcoinAdapter:signMessage - connector is undefined')
}
console.log('>> Bitcoin Adapter: Signing Message')
console.log('>> Bitcoin Adapter: Connector.signMessage', connector.signMessage)
if (!connector) {
throw new Error('BitcoinAdapter:signMessage - connector is undefined')
}

Copilot uses AI. Check for mistakes.
Comment on lines +311 to +319
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console.log statements should not be committed to production code. Consider using a proper logging framework or removing these statements before merging.

Suggested change
console.log('>> Bitcoin Adapter: Connector', connector)
if (!connector) {
throw new Error('BitcoinAdapter:signMessage - connector is undefined')
}
console.log('>> Bitcoin Adapter: Signing Message')
console.log('>> Bitcoin Adapter: Connector.signMessage', connector.signMessage)
if (!connector) {
throw new Error('BitcoinAdapter:signMessage - connector is undefined')
}

Copilot uses AI. Check for mistakes.
const signature = await connector.signMessage({
message: params.message,
address: params.address
Expand Down
7 changes: 7 additions & 0 deletions packages/appkit/src/client/appkit-base-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@
return ids.some(id => Boolean(window.ethereum?.[String(id)]))
},
signMessage: async (message: string) => {
console.log('>> Signing Message')

Check failure on line 709 in packages/appkit/src/client/appkit-base-client.ts

View workflow job for this annotation

GitHub Actions / code_style (lint)

Unexpected console statement
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console.log statements should not be committed to production code. Consider using a proper logging framework or removing these statements before merging.

Copilot uses AI. Check for mistakes.
const namespace = ChainController.state.activeChain
const adapter = this.getAdapter(ChainController.state.activeChain)

Expand All @@ -717,12 +718,18 @@
throw new Error('signMessage: adapter not found')
}

console.log('>> Adapter', adapter)

Check failure on line 721 in packages/appkit/src/client/appkit-base-client.ts

View workflow job for this annotation

GitHub Actions / code_style (lint)

Unexpected console statement
console.log('>> Namespace', namespace)

Check failure on line 722 in packages/appkit/src/client/appkit-base-client.ts

View workflow job for this annotation

GitHub Actions / code_style (lint)

Unexpected console statement

const address = this.getAddress(namespace)
console.log('>> Address', address)

Check failure on line 725 in packages/appkit/src/client/appkit-base-client.ts

View workflow job for this annotation

GitHub Actions / code_style (lint)

Unexpected console statement
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console.log statements should not be committed to production code. Consider using a proper logging framework or removing these statements before merging.

Suggested change
console.log('>> Address', address)
LoggerUtil.debug('>> Address', address)

Copilot uses AI. Check for mistakes.

if (!address) {
throw new Error('signMessage: address not found')
}

console.log('>> Provider', ProviderController.getProvider(namespace))

Check failure on line 731 in packages/appkit/src/client/appkit-base-client.ts

View workflow job for this annotation

GitHub Actions / code_style (lint)

Unexpected console statement
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console.log statements should not be committed to production code. Consider using a proper logging framework or removing these statements before merging.

Suggested change
console.log('>> Provider', ProviderController.getProvider(namespace))

Copilot uses AI. Check for mistakes.

const result = await adapter?.signMessage({
message,
address,
Expand Down
Loading