Skip to content

Commit

Permalink
Merge pull request #128 from lidofinance/feature/si-1315-rework-modal
Browse files Browse the repository at this point in the history
[fix] ledger close modal on success
  • Loading branch information
alx-khramov authored Mar 15, 2024
2 parents 44747bb + 12a13a8 commit 5eb40c3
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 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

## 3.0.2

### Patch Changes

- 8873ffb: fixed leger modal not closing main modal

## 3.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": "3.0.1",
"version": "3.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 @@ -16,12 +16,12 @@ export const ConnectLedger: FC<ConnectLedgerProps> = (props) => {
const { openModalAsync } = useReefKnotModal();
const onClickLedger = metrics?.events?.click?.handlers.onClickLedger;

const handleConnect = useCallback(() => {
const handleConnect = useCallback(async () => {
onBeforeConnect?.();
onClickLedger?.();

return openModalAsync({ type: 'ledger' });
}, [onBeforeConnect, onClickLedger, openModalAsync]);
const result = await openModalAsync({ type: 'ledger' });
if (result.success) onConnect?.();
}, [onBeforeConnect, onClickLedger, openModalAsync, onConnect]);

return (
<ConnectButton
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

## 3.0.2

### Patch Changes

- Updated dependencies [8873ffb]
- @reef-knot/connect-wallet-modal@3.0.2

## 3.0.1

### 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": "3.0.1",
"version": "3.0.2",
"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": "3.0.1",
"@reef-knot/connect-wallet-modal": "3.0.2",
"@reef-knot/core-react": "3.0.0",
"@reef-knot/web3-react": "3.0.0",
"@reef-knot/ui-react": "1.0.8",
Expand Down

0 comments on commit 5eb40c3

Please sign in to comment.