Skip to content

Commit

Permalink
Merge pull request #664 from threshold-network/fix-telemetry-params
Browse files Browse the repository at this point in the history
Stringify deposit telemetry parameters

SDK was updated so deposit parameters are now `Hex`. To properly display them in
the Sentry telemetry hub, they must be converted to a string first.
  • Loading branch information
michalsmiarowski authored Nov 21, 2023
2 parents 25fd0c8 + 934d1b8 commit e6ed52e
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 e6ed52e

Please sign in to comment.