Skip to content

Commit

Permalink
chore: add send error log (#3832)
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvoskamp authored Feb 12, 2025
1 parent 73fbd0f commit 64a03e1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .changeset/gentle-snakes-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@reown/appkit-core': patch
'@reown/appkit-adapter-bitcoin': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-adapter-solana': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'@reown/appkit-cli': patch
'@reown/appkit-common': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
'@reown/appkit-scaffold-ui': patch
'@reown/appkit-siwe': patch
'@reown/appkit-siwx': patch
'@reown/appkit-ui': patch
'@reown/appkit-wallet': patch
'@reown/appkit-wallet-button': patch
---

Add error message to SEND_ERROR event
2 changes: 2 additions & 0 deletions packages/core/src/controllers/SendController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,12 @@ export const SendController = {
})
this.resetSend()
} catch (error) {
const errorMessage = error instanceof Error ? error.message : 'Unknown error'
EventsController.sendEvent({
type: 'track',
event: 'SEND_ERROR',
properties: {
message: errorMessage,
isSmartAccount:
AccountController.state.preferredAccountType ===
W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT,
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/utils/TypeUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,7 @@ export type Event =
address?: string
event: 'SEND_ERROR'
properties: {
message: string
isSmartAccount: boolean
network: string
token: string
Expand Down

0 comments on commit 64a03e1

Please sign in to comment.