From aa4fa35692c2a446e096250fb41e1c85e8505502 Mon Sep 17 00:00:00 2001 From: WRadoslaw <92513933+WRadoslaw@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:25:10 +0100 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=9B=91=20Stop=20polling=20if=20notifi?= =?UTF-8?q?cations=20recipient=20is=20undefined=20(#5695)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/providers/notifications/notifications.hooks.ts | 2 ++ .../src/providers/notifications/notifications.manager.tsx | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/atlas/src/providers/notifications/notifications.hooks.ts b/packages/atlas/src/providers/notifications/notifications.hooks.ts index 782d2467ed..564b31df69 100644 --- a/packages/atlas/src/providers/notifications/notifications.hooks.ts +++ b/packages/atlas/src/providers/notifications/notifications.hooks.ts @@ -32,6 +32,7 @@ export type UseNotifications = Pick setLastSeenNotificationDate: (data: Date) => void markNotificationsAsRead: (notifications: NotificationRecord[]) => void pageInfo?: GetNotificationsConnectionQuery['notificationsConnection']['pageInfo'] + recipient: RecipientTypeWhereInput | undefined } export const useNotifications = (opts?: Pick): UseNotifications => { @@ -120,6 +121,7 @@ export const useNotifications = (opts?: Pick { - const { fetchMore, unseenNotificationsCounts } = useNotifications() + const { fetchMore, unseenNotificationsCounts, recipient } = useNotifications() useEffect(() => { const id = setInterval(() => { + if (!recipient) { + return + } + unseenNotificationsCounts.fetchMore() fetchMore({ updateQuery: (prev, { fetchMoreResult }) => { @@ -44,7 +48,7 @@ export const NotificationsManager: FC = () => { clearInterval(id) } // eslint-disable-next-line react-hooks/exhaustive-deps - }, [fetchMore, unseenNotificationsCounts.fetchMore]) + }, [fetchMore, unseenNotificationsCounts.fetchMore, !recipient]) return null } From c5d69557e98418e7d96ab0db147718a73a5482dc Mon Sep 17 00:00:00 2001 From: WRadoslaw <92513933+WRadoslaw@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:26:18 +0100 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=90=BB=E2=80=8D=E2=9D=84=EF=B8=8F=20C?= =?UTF-8?q?onsider=20only=20polkadot=20accounts=20from=20wallet=20(#5696)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/providers/wallet/wallet.provider.tsx | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/atlas/src/providers/wallet/wallet.provider.tsx b/packages/atlas/src/providers/wallet/wallet.provider.tsx index d4e0efbfda..2e441567f8 100644 --- a/packages/atlas/src/providers/wallet/wallet.provider.tsx +++ b/packages/atlas/src/providers/wallet/wallet.provider.tsx @@ -29,7 +29,10 @@ export const WalletProvider: FC = ({ children }) => { const setWalletAccounts = useCallback( async (accounts: WalletAccount[]) => { - const mappedAccounts = accounts.map((account) => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const polkadotAccounts = accounts.filter((account: any) => account.type === 'sr25519') + + const mappedAccounts = polkadotAccounts.map((account) => { return { ...account, address: formatJoystreamAddress(account.address), @@ -56,16 +59,17 @@ export const WalletProvider: FC = ({ children }) => { // taken from https://github.com/TalismanSociety/talisman-connect/blob/47cfefee9f1333326c0605c159d6ee8ebfba3e84/libs/wallets/src/lib/base-dotsama-wallet/index.ts#L98-L107 // should be part of future talisman-connect release const accounts = await selectedWallet.extension.accounts.get() - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const accountsWithWallet = accounts.map((account: any) => { - return { - ...account, - address: formatJoystreamAddress(account.address), - source: selectedWallet.extension?.name as string, - wallet: selectedWallet, - signer: selectedWallet.extension?.signer, - } - }) + const accountsWithWallet = accounts + // eslint-disable-next-line @typescript-eslint/no-explicit-any + .map((account: any) => { + return { + ...account, + address: account.address, + source: selectedWallet.extension?.name as string, + wallet: selectedWallet, + signer: selectedWallet.extension?.signer, + } + }) setWalletAccounts(accountsWithWallet) setWallet(selectedWallet) From c0723d296883ea116945894cf21ff3cf0cc76478 Mon Sep 17 00:00:00 2001 From: WRadoslaw Date: Fri, 29 Dec 2023 13:44:51 +0100 Subject: [PATCH 3/5] =?UTF-8?q?=E2=AC=86=EF=B8=8FBump=20version=20and=20ad?= =?UTF-8?q?just=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 11 +++++++++-- packages/atlas/package.json | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edda2071f1..b91332efd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [4.14.3] - 2023-12-08 +## [4.14.5] - 2023-12-29 + +### Fixed + +- Fixed wallet problems when injecting ethereum addresses +- Removed notification polling for anonymous users + +## [4.14.4] - 2023-12-08 ### Fixed - Fixed atlas meta server query -- Fiex basic channel query performance +- Fixed basic channel query performance ## [4.14.3] - 2023-12-08 diff --git a/packages/atlas/package.json b/packages/atlas/package.json index c3bd158547..9d3151a47a 100644 --- a/packages/atlas/package.json +++ b/packages/atlas/package.json @@ -1,7 +1,7 @@ { "name": "@joystream/atlas", "description": "UI for consuming Joystream - a user governed video platform", - "version": "4.14.4", + "version": "4.14.5", "license": "GPL-3.0", "scripts": { "start": "vite", From b76fbfe1fb70c09fb2041cc4c90c425313895f7b Mon Sep 17 00:00:00 2001 From: WRadoslaw Date: Fri, 29 Dec 2023 14:14:24 +0100 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=94=A5=20Update=20YPP=20sync=20reward?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/atlas/atlas.config.yml | 6 +++--- .../views/studio/YppDashboard/tabs/YppDashboardMainTab.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/atlas/atlas.config.yml b/packages/atlas/atlas.config.yml index 2b5103e914..071b7ff48f 100644 --- a/packages/atlas/atlas.config.yml +++ b/packages/atlas/atlas.config.yml @@ -66,7 +66,7 @@ features: - Sizeable subscriber base with high ratio of views for videos. rewards: - 25 - - 3 + - 6 - 12.5 - tier: 'gold' reqs: @@ -74,7 +74,7 @@ features: - Large subscriber base of fans active in the comments section. rewards: - 50 - - 5 + - 10 - 25 - tier: 'diamond' reqs: @@ -82,7 +82,7 @@ features: - Recognized influencer and large follower audience. rewards: - 100 - - 8 + - 16 - 50 rewards: - title: Sign Up to YouTube Partner Program diff --git a/packages/atlas/src/views/studio/YppDashboard/tabs/YppDashboardMainTab.tsx b/packages/atlas/src/views/studio/YppDashboard/tabs/YppDashboardMainTab.tsx index a9bd80e955..39dc8eedd9 100644 --- a/packages/atlas/src/views/studio/YppDashboard/tabs/YppDashboardMainTab.tsx +++ b/packages/atlas/src/views/studio/YppDashboard/tabs/YppDashboardMainTab.tsx @@ -205,7 +205,7 @@ export const YppDashboardMainTab: FC = () => { !currentChannel || !currentChannel.yppStatus.startsWith('Verified') ? currentChannel?.yppStatus.startsWith('Suspended') ? undefined - : 5 + : getTierRewards('diamond')?.videoSync : getTierRewards(yppBackendTierToConfig(currentChannel.yppStatus))?.videoSync } isRangeAmount={!currentChannel || !currentChannel.yppStatus.startsWith('Verified')} From a8d0fba76ad9089de9799213973a0ada11528e1e Mon Sep 17 00:00:00 2001 From: WRadoslaw Date: Fri, 29 Dec 2023 14:14:49 +0100 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=8C=90=20Gleev=20v4.14.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cabba5a319..72fd998b1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "description": "UI for consuming Joystream - a user governed video platform", - "version": "4.14.2", + "version": "4.14.3", "license": "GPL-3.0", "workspaces": [ "packages/*"