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/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/*" 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/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", 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 } 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) 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')}