Skip to content

Commit

Permalink
Stringify deposit telemetry parameters
Browse files Browse the repository at this point in the history
SDK was updated so deposit parameters are now
`Hex`. To properly display them in Sentry telemetry
hub, they must be converted to string first.
  • Loading branch information
lukasz-zimnoch committed Nov 21, 2023
1 parent 6bc76d8 commit d01c9f6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/hooks/tbtc/useDepositTelemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,22 @@ export const useDepositTelemetry = (network: BitcoinNetwork) => {
network
)

const {
depositor,
blindingFactor,
walletPublicKeyHash,
refundPublicKeyHash,
refundLocktime,
} = deposit

captureMessage(
`Generated deposit [${depositAddress}]`,
{
...deposit,
depositor: depositor.identifierHex,
blindingFactor: blindingFactor.toString(),
walletPublicKeyHash: walletPublicKeyHash.toString(),
refundPublicKeyHash: refundPublicKeyHash.toString(),
refundLocktime: refundLocktime.toString(),
verificationStatus: status,
verificationResponse: response,
},
Expand Down

0 comments on commit d01c9f6

Please sign in to comment.