Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌐 Gleev v4.14.3 #23

Merged
merged 5 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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/*"
Expand Down
6 changes: 3 additions & 3 deletions packages/atlas/atlas.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,23 @@ features:
- Sizeable subscriber base with high ratio of views for videos.
rewards:
- 25
- 3
- 6
- 12.5
- tier: 'gold'
reqs:
- Great quality of content.
- Large subscriber base of fans active in the comments section.
rewards:
- 50
- 5
- 10
- 25
- tier: 'diamond'
reqs:
- Top tier professional quality.
- Recognized influencer and large follower audience.
rewards:
- 100
- 8
- 16
- 50
rewards:
- title: Sign Up to YouTube Partner Program
Expand Down
2 changes: 1 addition & 1 deletion packages/atlas/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export type UseNotifications = Pick<QueryResult<GetNotificationsConnectionQuery>
setLastSeenNotificationDate: (data: Date) => void
markNotificationsAsRead: (notifications: NotificationRecord[]) => void
pageInfo?: GetNotificationsConnectionQuery['notificationsConnection']['pageInfo']
recipient: RecipientTypeWhereInput | undefined
}

export const useNotifications = (opts?: Pick<QueryHookOptions, 'notifyOnNetworkStatusChange'>): UseNotifications => {
Expand Down Expand Up @@ -120,6 +121,7 @@ export const useNotifications = (opts?: Pick<QueryHookOptions, 'notifyOnNetworkS
unseenNotificationsCounts,
setLastSeenNotificationDate,
markNotificationsAsRead,
recipient,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ import { atlasConfig } from '@/config'
import { useNotifications } from './notifications.hooks'

export const NotificationsManager: FC = () => {
const { fetchMore, unseenNotificationsCounts } = useNotifications()
const { fetchMore, unseenNotificationsCounts, recipient } = useNotifications()

useEffect(() => {
const id = setInterval(() => {
if (!recipient) {
return
}

unseenNotificationsCounts.fetchMore()
fetchMore({
updateQuery: (prev, { fetchMoreResult }) => {
Expand Down Expand Up @@ -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
}
26 changes: 15 additions & 11 deletions packages/atlas/src/providers/wallet/wallet.provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ export const WalletProvider: FC<PropsWithChildren> = ({ 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),
Expand All @@ -56,16 +59,17 @@ export const WalletProvider: FC<PropsWithChildren> = ({ 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')}
Expand Down
Loading