Skip to content

Commit

Permalink
Merge pull request #201 from lidofinance/feature/si-1707-research-use…
Browse files Browse the repository at this point in the history
…-the-matomo-metric-on-the-ledger-connection

fix: ledger hid connect metrics
  • Loading branch information
manneredboor authored Nov 28, 2024
2 parents 86ba24a + 0afa3dc commit a847134
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
6 changes: 6 additions & 0 deletions packages/connect-wallet-modal/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @reef-knot/connect-wallet-modal

## 6.0.2

### Patch Changes

- Ledger HID metrics fixed

## 6.0.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/connect-wallet-modal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reef-knot/connect-wallet-modal",
"version": "6.0.1",
"version": "6.0.2",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ export const ConnectLedger: FC<ConnectLedgerProps> = (props) => {

const { openModalAsync } = useReefKnotModal();
const metricsOnClick = metrics?.events?.click?.handlers[walletId];
const metricsOnConnect = metrics?.events?.connect?.handlers[walletId];

const handleConnect = useCallback(async () => {
metricsOnClick?.();
const result = await openModalAsync({ type: 'ledger' });
if (result.success) onConnect?.();
}, [openModalAsync, onConnect, metricsOnClick]);
if (result.success) {
onConnect?.();
metricsOnConnect?.();
}
}, [openModalAsync, onConnect, metricsOnClick, metricsOnConnect]);

return (
<ConnectButtonBase
Expand Down
7 changes: 7 additions & 0 deletions packages/reef-knot/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# reef-knot

## 6.0.4

### Patch Changes

- Updated dependencies
- @reef-knot/connect-wallet-modal@6.0.2

## 6.0.3

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/reef-knot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reef-knot",
"version": "6.0.3",
"version": "6.0.4",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
Expand Down Expand Up @@ -41,7 +41,7 @@
"lint": "eslint --ext ts,tsx,js,mjs ."
},
"dependencies": {
"@reef-knot/connect-wallet-modal": "6.0.1",
"@reef-knot/connect-wallet-modal": "6.0.2",
"@reef-knot/core-react": "5.1.0",
"@reef-knot/web3-react": "5.0.0",
"@reef-knot/ui-react": "2.1.5",
Expand Down

0 comments on commit a847134

Please sign in to comment.