From e931d9fcca38f118e9c0ff0b9dc2babc0d27aecf Mon Sep 17 00:00:00 2001 From: Ilias Trichopoulos Date: Mon, 29 Jan 2024 13:08:41 +0800 Subject: [PATCH 1/3] Revert "Fix many React warnings due to styled-components" This reverts commit 8ab1894a409c8454e04c043216589edf24123f73. Closes #319 --- .changeset/honest-books-kiss.md | 5 ++ apps/desktop-wallet/src/App.tsx | 8 +-- .../src/components/AddressBadge.tsx | 33 +++++----- .../src/components/AddressRow.tsx | 2 +- apps/desktop-wallet/src/components/Amount.tsx | 17 +++--- .../src/components/AppHeader.tsx | 2 +- apps/desktop-wallet/src/components/Badge.tsx | 16 ++--- apps/desktop-wallet/src/components/Button.tsx | 18 +++--- .../components/Buttons/ShortcutButtons.tsx | 24 ++++---- .../src/components/DefaultAddressSwitch.tsx | 6 +- .../src/components/DeltaPercentage.tsx | 8 +-- .../src/components/ExpandableSection.tsx | 10 ++-- apps/desktop-wallet/src/components/IOList.tsx | 10 +--- .../src/components/Inputs/AddressSelect.tsx | 30 +++++----- .../src/components/Inputs/CompactToggle.tsx | 2 +- .../src/components/Inputs/Input.tsx | 18 +++--- .../src/components/Inputs/MultiSelect.tsx | 2 +- .../src/components/Inputs/Select.tsx | 60 +++++++++---------- .../components/Inputs/SelectOptionAddress.tsx | 4 +- .../components/Inputs/WalletPassphrase.tsx | 6 +- .../src/components/Inputs/index.tsx | 10 ++-- .../desktop-wallet/src/components/NavItem.tsx | 8 +-- .../src/components/NetworkSwitch.tsx | 2 +- .../PageComponents/PageContainers.tsx | 10 ++-- .../src/components/PageComponents/SideBar.tsx | 2 +- apps/desktop-wallet/src/components/Popup.tsx | 22 +++---- apps/desktop-wallet/src/components/TabBar.tsx | 18 +++--- apps/desktop-wallet/src/components/Table.tsx | 16 ++--- .../src/components/TableTabBar.tsx | 6 +- .../src/components/TransactionList.tsx | 14 ++--- .../src/components/TransactionalInfo.tsx | 28 ++++----- .../src/modals/AddressDetailsModal.tsx | 6 +- .../src/modals/CenteredModal.tsx | 12 ++-- .../src/modals/NewAddressModal.tsx | 2 +- .../src/modals/NotificationsModal.tsx | 2 +- .../src/modals/SendModals/AddressInputs.tsx | 2 +- .../modals/SendModals/CheckAddressesBox.tsx | 2 +- .../SettingsModal/DevToolsSettingsSection.tsx | 8 +-- .../SettingsModal/EditWalletNameModal.tsx | 2 +- .../SettingsModal/GeneralSettingsSection.tsx | 8 +-- .../SettingsModal/NetworkSettingsSection.tsx | 2 +- .../SettingsModal/WalletsSettingsSection.tsx | 8 +-- .../src/modals/SettingsModal/index.tsx | 4 +- apps/desktop-wallet/src/modals/SideModal.tsx | 2 +- .../src/modals/TransactionDetailsModal.tsx | 12 ++-- .../src/modals/WalletConnectModal.tsx | 2 +- .../AddressesPage/AddressGridRow.tsx | 2 +- .../AddressesPage/ContactsTabContent.tsx | 4 +- .../AddressesPage/TabContent.tsx | 2 +- .../OverviewPage/AmountsOverviewPanel.tsx | 18 +++--- .../UnlockedWallet/OverviewPage/index.tsx | 2 +- .../UnlockedWallet/TransfersPage/index.tsx | 4 +- .../UnlockedWallet/UnlockedWalletLayout.tsx | 24 ++++---- 53 files changed, 273 insertions(+), 274 deletions(-) create mode 100644 .changeset/honest-books-kiss.md diff --git a/.changeset/honest-books-kiss.md b/.changeset/honest-books-kiss.md new file mode 100644 index 000000000..88a9b28bc --- /dev/null +++ b/.changeset/honest-books-kiss.md @@ -0,0 +1,5 @@ +--- +'alephium-desktop-wallet': patch +--- + +Fix address hash overlap introduced in 2.2.1 diff --git a/apps/desktop-wallet/src/App.tsx b/apps/desktop-wallet/src/App.tsx index 19e72dfc6..45e976eec 100644 --- a/apps/desktop-wallet/src/App.tsx +++ b/apps/desktop-wallet/src/App.tsx @@ -230,7 +230,7 @@ const App = () => { {splashScreenVisible && setSplashScreenVisible(false)} />} - + @@ -249,15 +249,15 @@ const App = () => { export default App -const AppContainer = styled.div<{ $showDevIndication: boolean }>` +const AppContainer = styled.div<{ showDevIndication: boolean }>` display: flex; flex-direction: column; flex: 1; background-color: ${({ theme }) => theme.bg.secondary}; - ${({ $showDevIndication, theme }) => - $showDevIndication && + ${({ showDevIndication, theme }) => + showDevIndication && css` border: 5px solid ${theme.global.valid}; `}; diff --git a/apps/desktop-wallet/src/components/AddressBadge.tsx b/apps/desktop-wallet/src/components/AddressBadge.tsx index 188620bbc..14ee28cdf 100644 --- a/apps/desktop-wallet/src/components/AddressBadge.tsx +++ b/apps/desktop-wallet/src/components/AddressBadge.tsx @@ -29,8 +29,8 @@ import { makeSelectContactByAddress, selectAddressByHash } from '@/storage/addre interface AddressBadgeProps { addressHash: AddressHash - $truncate?: boolean - $withBorders?: boolean + truncate?: boolean + withBorders?: boolean hideStar?: boolean hideColorIndication?: boolean disableA11y?: boolean @@ -48,10 +48,11 @@ const AddressBadge = ({ hideColorIndication, disableA11y = false, disableCopy, - $truncate, + truncate, appendHash = false, displayHashUnder = false, - $withBorders + showFull, + withBorders }: AddressBadgeProps) => { const { t } = useTranslation() const address = useAppSelector((s) => selectAddressByHash(s, addressHash)) @@ -61,11 +62,11 @@ const AddressBadge = ({ return ( {contact ? ( -