Skip to content

Commit

Permalink
feat(app): update claim missing delegator rewards page (#364)
Browse files Browse the repository at this point in the history
* feat(app): update claim missing delegator rewards page

* Fix subsidy claim page content

* rename subsidy page
  • Loading branch information
kingsleydon authored Dec 8, 2023
1 parent b5a7cbf commit e7b40f6
Show file tree
Hide file tree
Showing 7 changed files with 204 additions and 55 deletions.
Binary file removed apps/app/assets/b5.png
Binary file not shown.
Binary file added apps/app/assets/b8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/app/assets/vault_cheat_reimbursements.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions apps/app/components/DashboardCarousel.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import b2 from '@/assets/b2.png'
import b3 from '@/assets/b3.png'
import b4 from '@/assets/b4.png'
import b5 from '@/assets/b5.png'
import b6 from '@/assets/b6.png'
import b7 from '@/assets/b7.png'
import b8 from '@/assets/b8.jpg'
import ArrowBackIos from '@mui/icons-material/ArrowBackIos'
import ArrowForwardIos from '@mui/icons-material/ArrowForwardIos'
import {Box, IconButton, LinearProgress, Stack} from '@mui/material'
Expand All @@ -13,6 +13,11 @@ import {useMemo, useState, type FC} from 'react'
import {useSnapCarousel} from 'react-snap-carousel'

const contents: Array<{name: string; imageUrl: string; href: string}> = [
{
name: 'Claim subsidies',
href: '/khala/subsidy',
imageUrl: b8.src,
},
{
name: 'Launch Gemini Tokenomic on Phala',
href: 'https://khala.subsquare.io/democracy/referendum/89',
Expand All @@ -23,11 +28,6 @@ const contents: Array<{name: string; imageUrl: string; href: string}> = [
href: 'https://phala.world/marketplace',
imageUrl: b6.src,
},
{
name: 'Claim missing delegator rewards',
href: '/claim-missing-delegator-rewards',
imageUrl: b5.src,
},
{
name: 'Vaults feature',
href: 'https://medium.com/phala-network/vaults-simplifying-and-optimizing-your-phala-delegations-368469608ea7',
Expand Down
33 changes: 33 additions & 0 deletions apps/app/hooks/useAssetBalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,37 @@ const useAssetBalance = (
return data
}

// const useAssetBalanceList = (account: string, assetIds: number[]) => {
// const api = usePolkadotApi()
// const assetsMetadata = useAssetsMetadata()
// const {data} = useQuery(
// [
// 'assetBalanceList',
// api?.runtimeChain,
// assetsMetadata == null,
// account,
// assetIds,
// ],
// async () => {
// if (api == null || account == null) {
// return null
// }
// const res = await api.query.assets.account.multi(
// assetIds.map((assetId) => [assetId, account]),
// )
// return res.map((item, index) => {
// const assetId = assetIds[index]
// const assetMetadata = assetsMetadata?.[assetId]
// if (assetMetadata == null) return null
// const unwrapped = item.unwrapOr({balance: 0})
// return new Decimal(unwrapped.balance.toString()).div(
// Decimal.pow(10, assetMetadata.decimals),
// )
// })
// },
// )

// return data
// }

export default useAssetBalance
Loading

3 comments on commit e7b40f6

@vercel
Copy link

@vercel vercel bot commented on e7b40f6 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

subbridge – ./apps/subbridge

subbridge.vercel.app
subbridge-git-main-phala.vercel.app
www.subbridge.io
subbridge-phala.vercel.app
subbridge.io

@vercel
Copy link

@vercel vercel bot commented on e7b40f6 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

index – ./apps/index

index-git-main-phala.vercel.app
index-phala.vercel.app
phala-index.vercel.app
index.phala.network

@vercel
Copy link

@vercel vercel bot commented on e7b40f6 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

analytics – ./apps/analytics

analytics-plum.vercel.app
analytics-phala.vercel.app
analytics-git-main-phala.vercel.app
analytics.phala.network

Please sign in to comment.