Skip to content

Commit 05ffe8d

Browse files
arhtudormorariuliacimpeanumgavrilaradumojic
authored
Select provider (#285)
* 0.1.7 (#281) * Refactored sign transactions panel internal components (#267) * Update styles * Refactored sign transactions footer * Refactored copy button * Refactored button component * Refactored tooltip component * Refactored spinner icon component * Refactored arrow right component * Updated copy button * Updated styles * Refactored sign transactions overview * Refactored sign-transactions-advanced and sign-transactions-header * Updated styles * Fixed test * Updated changelog * Updated files * Fixes after review * Eslint and prettierrc fixes (#270) * Eslint fixes * Prettierrc fixes * Updated changelog * Added minimize/maximize toasts (#272) * Added min/max toasts * Update changelog * Replace icon * Fixed trimmed address not showing in address-table (#273) * Fixed addresses not showing * Fix issue with trimWrapperVisible * Fixed unlockPanelFooter styles * Updated Trim * Updated Trim * Updated changelog --------- Co-authored-by: Gavrila Andrei <andrei.gavrila@multiversx.com> * Refactored side panel components (#271) * Update styles * Refactored sign transactions footer * Refactored copy button * Refactored button component * Refactored tooltip component * Refactored spinner icon component * Refactored arrow right component * Updated copy button * Updated styles * Refactored sign transactions overview * Refactored sign-transactions-advanced and sign-transactions-header * Updated styles * Updated styles * Fixed test * Updated changelog * Updated changelog * Updated files * Fixes after review * Fixes after review * Updates files location * Refactored side-panel-header comp * Refactored side-panel comp * Refactored side-panel-swipper styles * Refactored side panel swiper component. * Updated components * Updated styles * Updated changelog * Fixed test * Fixes after review * Refactored transaction list item (#274) * Refactored styles * Refactored transaction-list-item component * Updated changelog * Fixed tests * Fixes after review * Upgraded version * Fixed copy button (#276) * Fixed copy button * Upgraded version * Sync development with main (#278) * 0.1.5 (#275) * Refactored sign transactions panel internal components (#267) * Update styles * Refactored sign transactions footer * Refactored copy button * Refactored button component * Refactored tooltip component * Refactored spinner icon component * Refactored arrow right component * Updated copy button * Updated styles * Refactored sign transactions overview * Refactored sign-transactions-advanced and sign-transactions-header * Updated styles * Fixed test * Updated changelog * Updated files * Fixes after review * Eslint and prettierrc fixes (#270) * Eslint fixes * Prettierrc fixes * Updated changelog * Added minimize/maximize toasts (#272) * Added min/max toasts * Update changelog * Replace icon * Fixed trimmed address not showing in address-table (#273) * Fixed addresses not showing * Fix issue with trimWrapperVisible * Fixed unlockPanelFooter styles * Updated Trim * Updated Trim * Updated changelog --------- Co-authored-by: Gavrila Andrei <andrei.gavrila@multiversx.com> * Refactored side panel components (#271) * Update styles * Refactored sign transactions footer * Refactored copy button * Refactored button component * Refactored tooltip component * Refactored spinner icon component * Refactored arrow right component * Updated copy button * Updated styles * Refactored sign transactions overview * Refactored sign-transactions-advanced and sign-transactions-header * Updated styles * Updated styles * Fixed test * Updated changelog * Updated changelog * Updated files * Fixes after review * Fixes after review * Updates files location * Refactored side-panel-header comp * Refactored side-panel comp * Refactored side-panel-swipper styles * Refactored side panel swiper component. * Updated components * Updated styles * Updated changelog * Fixed test * Fixes after review * Refactored transaction list item (#274) * Refactored styles * Refactored transaction-list-item component * Updated changelog * Fixed tests * Fixes after review * Upgraded version --------- Co-authored-by: Gavrila Andrei <andrei.gavrila@multiversx.com> * Updated changelog --------- Co-authored-by: Gavrila Andrei <andrei.gavrila@multiversx.com> * Fixed compatibility issue on stencil/core (#279) * Updated package version * Updated changelog * Updated lockfile * Upgraded version --------- Co-authored-by: Gavrila Andrei <andrei.gavrila@multiversx.com> Co-authored-by: Tudor Morar <tudor.morar@multiversx.com> * v0.1.8 (#283) - fix SidePanel WalletConnect issues - (temp) fix sdk-dapp 5.5.1 breaking changes - update publish script - pnpm test fix * Add provider selection handling to unlock panel - Subscribed to SELECT_PROVIDER event to handle provider selection. - Implemented handleProviderSelection method to initiate login with the selected provider. - Updated unsubscribe functions to include the new subscription. * Update CHANGELOG * Update CHANGELOG * Update version --------- Co-authored-by: Iulia Cimpeanu <72752718+iuliacimpeanu@users.noreply.github.com> Co-authored-by: Gavrila Andrei <andrei.gavrila@multiversx.com> Co-authored-by: Radu Mojic <radu.mojic@multiversx.com>
1 parent c657c83 commit 05ffe8d

File tree

8 files changed

+52
-44
lines changed

8 files changed

+52
-44
lines changed

.github/workflows/npm-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: actions/setup-node@v4
2323
with:
2424
node-version: 22
25-
registry-url: https://registry.npmjs.org/
25+
registry-url: 'https://registry.npmjs.org'
2626
- name: Setup pnpm
2727
run: npm install -g pnpm
2828
- name: Install Chrome for Puppeteer
@@ -52,7 +52,7 @@ jobs:
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5353
if: ${{ steps.package.outputs.is-prerelease == 'false' }}
5454
run: |
55-
RELEASE_TAG=v${{ steps.package.outputs.version }}
55+
RELEASE_TAG=v$(node -p "require('./package.json').version")
5656
echo "Creating release for version: $RELEASE_TAG"
5757
5858
changelog_content=$(awk "/^## \[\[?${RELEASE_TAG#v}[^\]]*\]/{flag=1; next} /^## \[/{flag=0} flag" CHANGELOG.md)
@@ -73,10 +73,10 @@ jobs:
7373
env:
7474
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
7575
if: ${{ steps.package.outputs.is-prerelease == 'true'}}
76-
run: echo ${{ steps.package.outputs.is-prerelease}} && npm publish --tag next --no-git-checks
76+
run: echo ${{ steps.package.outputs.is-prerelease}} && npm publish --tag next
7777

7878
- name: Publish to npmjs
7979
env:
8080
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
8181
if: ${{ steps.package.outputs.is-prerelease == 'false' }}
82-
run: npm publish --no-git-checks
82+
run: npm publish

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
11+
## [[0.1.9](https://github.com/multiversx/mx-sdk-dapp-ui/pull/286)] - 2026-01-13
12+
13+
- [Added provider selection handling to unlock panel](https://github.com/multiversx/mx-sdk-dapp-ui/pull/285)
1014
- [Remove pagination webcomponent](https://github.com/multiversx/mx-sdk-dapp-ui/pull/282)
1115

16+
## [[0.1.8](https://github.com/multiversx/mx-sdk-dapp-ui/pull/283)] - 2025-12-30
17+
18+
- [Fix publish script, fix WalletConnect issues](https://github.com/multiversx/mx-sdk-dapp-ui/pull/283)
1219

1320
## [[0.1.7](https://github.com/multiversx/mx-sdk-dapp-ui/pull/281)] - 2025-12-11
1421

1522
- [Fixed compatibility issue on stencil/core](https://github.com/multiversx/mx-sdk-dapp-ui/pull/279)
1623

1724
## [[0.1.6](https://github.com/multiversx/mx-sdk-dapp-ui/pull/277)] - 2025-12-09
1825

26+
- [Fixed compatibility issue on stencil/core](https://github.com/multiversx/mx-sdk-dapp-ui/pull/279)
27+
28+
## [[0.1.6](https://github.com/multiversx/mx-sdk-dapp-ui/pull/277)] - 2025-12-09
29+
1930
- [Sync development with main](https://github.com/multiversx/mx-sdk-dapp-ui/pull/278)
2031
- [Fixed copy button](https://github.com/multiversx/mx-sdk-dapp-ui/pull/276)
2132

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MultiversX UI library for Front-End DApps
1+
# MultiversX UI library for Front-End dApps
22

33
MultiversX Front-End Library for JavaScript and TypeScript (written in TypeScript).
44

@@ -50,13 +50,7 @@ It outputs both web components (working out of the box) and React components (yo
5050
### React Components import
5151

5252
```tsx
53-
export {
54-
MvxCopyButton,
55-
MvxExplorerLink,
56-
MvxFormatAmount,
57-
MvxTransactionsTable,
58-
MvxUnlockButton,
59-
} from '@multiversx/sdk-dapp-ui/react';
53+
export { MvxCopyButton, MvxExplorerLink, MvxFormatAmount, MvxTransactionsTable } from '@multiversx/sdk-dapp-ui/react';
6054
```
6155

6256
The library is divided into three main categories of components:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@multiversx/sdk-dapp-ui",
3-
"version": "0.1.7",
3+
"version": "0.1.9",
44
"description": "A library to hold UI components for a dApp on the MultiversX blockchain",
55
"author": "MultiversX",
66
"license": "MIT",

src/common/SidePanel/SidePanel.tsx

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,12 @@ interface SidePanelPropsType {
1717
onBack?: () => void;
1818
}
1919

20-
export function SidePanel({
21-
isOpen = false,
22-
panelClassName,
23-
panelTitle,
24-
hasBackButton,
25-
showHeader = true,
26-
onClose,
27-
onBack
28-
}: SidePanelPropsType, children: JSX.Element) {
20+
export function SidePanel(
21+
{ isOpen = false, panelClassName, panelTitle, hasBackButton, showHeader = true, onClose, onBack }: SidePanelPropsType,
22+
children: JSX.Element,
23+
) {
2924
if (isOpen !== undefined) {
30-
handleSidePanelOpenChange(isOpen, (shouldAnimate) => {
25+
handleSidePanelOpenChange(isOpen, shouldAnimate => {
3126
state.shouldAnimate = shouldAnimate;
3227
});
3328
}
@@ -56,32 +51,25 @@ export function SidePanel({
5651
onClick={handleOverlayClick}
5752
class={classNames([styles.sidePanelWrapper], { [styles.sidePanelWrapperVisible]: shouldAnimate })}
5853
>
59-
<SidePanelSwiper
60-
open={shouldAnimate}
61-
onSheetDismiss={onClose}
62-
>
54+
<SidePanelSwiper open={shouldAnimate} onSheetDismiss={onClose}>
6355
<div
6456
id={sidePanelIdentifier}
6557
class={classNames([styles.sidePanel], { [styles.sidePanelVisible]: shouldAnimate }, panelClassName)}
6658
>
67-
{showHeader && (
68-
<SidePanelHeader
69-
panelTitle={panelTitle}
70-
panelClassName={panelClassName}
71-
hasLeftButton={hasBackButton}
72-
onRightButtonClick={handleCloseClick}
73-
onLeftButtonClick={handleBackClick}
74-
/>
75-
)}
76-
77-
<div
78-
class={styles.sidePanelContent}
79-
>
80-
{children}
59+
<div>
60+
{showHeader && (
61+
<SidePanelHeader
62+
panelTitle={panelTitle}
63+
panelClassName={panelClassName}
64+
hasLeftButton={hasBackButton}
65+
onRightButtonClick={handleCloseClick}
66+
onLeftButtonClick={handleBackClick}
67+
/>
68+
)}
8169
</div>
70+
<div class={styles.sidePanelContent}>{children}</div>
8271
</div>
8372
</SidePanelSwiper>
8473
</div>
8574
);
8675
}
87-

src/components/functional/unlock-panel/unlock-panel.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ export class UnlockPanel {
5252
UnlockPanelEventsEnum.CANCEL_IN_PROVIDER,
5353
this.handleResetLoginState,
5454
);
55+
const unsubSelectProvider = this.eventBus.subscribe(
56+
UnlockPanelEventsEnum.SELECT_PROVIDER,
57+
this.handleProviderSelection,
58+
);
5559

56-
this.unsubscribeFunctions.push(unsubDataUpdate, unsubCancelInProvider);
60+
this.unsubscribeFunctions.push(unsubDataUpdate, unsubCancelInProvider, unsubSelectProvider);
5761
this.connectionMonitor.connect();
5862
}
5963

@@ -67,6 +71,13 @@ export class UnlockPanel {
6771
this.allowedProviders = [];
6872
}
6973

74+
private readonly handleProviderSelection = ({ providerType }: { providerType: IProviderBase['type'] }) => {
75+
const provider = this.allowedProviders.find(p => p.type === providerType);
76+
if (provider) {
77+
this.handleLogin(provider);
78+
}
79+
};
80+
7081
private isExtensionInstalled(currentProvider: IProviderBase['type']) {
7182
return currentProvider === ProviderTypeEnum.extension && getIsExtensionAvailable();
7283
}

src/components/functional/unlock-panel/unlock-panel.types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IProviderBase } from "types/provider.types";
1+
import type { IProviderBase } from 'types/provider.types';
22

33
// Extend the Window interface globally to include custom properties
44
export interface ExtendedWindow extends Window {
@@ -24,6 +24,7 @@ export enum UnlockPanelEventsEnum {
2424
LOGIN = 'LOGIN',
2525
CANCEL_LOGIN = 'CANCEL_LOGIN',
2626
CANCEL_IN_PROVIDER = 'CANCEL_IN_PROVIDER',
27+
SELECT_PROVIDER = 'SELECT_PROVIDER',
2728
/**
2829
* User clicks Close button inside mounted provider
2930
*/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from '../TransactionListItem/transactionListItem.types';
2+
3+
// This file is a temporary workaround to maintain backward compatibility with sdk-dapp v5.5.1.

0 commit comments

Comments
 (0)