Skip to content

Commit

Permalink
🪢 Merge main into dev (#3986)
Browse files Browse the repository at this point in the history
  • Loading branch information
thesan authored Dec 19, 2022
2 parents d2d2d28 + d3fe8a2 commit b6a5d3e
Show file tree
Hide file tree
Showing 15 changed files with 120 additions and 201 deletions.
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Changelog

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).

## [Unreleased]

## [1.0.0] - 2022-12-16

### Added
- Mainnet network in the setting.
- Documentation link to the [Joystrem Handbook](https://joystream.gitbook.io/testnet-workspace) for each working group.
- Refresh auto-conf network button.
- RPC blockheight and latest processed block in settings.

### Changed
- The token denomination to `JOY`.
- Rename the Gateway working group to App.
- The favicon to the Pioneer logo.
- Rename the `ui` package to `@joystream/pioneer`.
- Depend on npm published version of `@joystream/[email protected]` and `@joystream/metadata-protobuf@^2`.
- Update to `yarn@3`.
- Clarify the `MoveFundsModal` copy.
- Reply to post from a modal.

### Removed
- Testnet banner.

### Fixed
- Large election relealing stage (long term fix).
- Recovering the stake locked when applying to an opening.
- Some broken [Joystrem Handbook](https://joystream.gitbook.io/testnet-workspace) links.
- Replace placeholder text on vesting tooltips.
- Broken text on the insufficient funds modal.
- Proposal discussion order.
- On boarding flow before connecting to the RPC node.
- Some CI false positive.

## [0.1.1] - 2022-12-02

[unreleased]: https://github.com/Joystream/pioneer/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/Joystream/pioneer/compare/v0.1.1...v1.0.0
[0.1.1]: https://github.com/Joystream/pioneer/commits/v0.1.1
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@joystream/pioneer",
"version": "0.1.0",
"version": "1.0.0",
"license": "GPL-3.0-only",
"scripts": {
"build": "node --max_old_space_size=4096 ./build.js",
Expand Down
2 changes: 0 additions & 2 deletions packages/ui/src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Redirect, Route, Switch } from 'react-router-dom'

import '@/services/i18n'

import { FMBanner } from '@/app/components/FMBanner'
import { ImageReportNotification } from '@/app/components/ImageReportNotification'
import { OnBoardingOverlay } from '@/app/components/OnboardingOverlay/OnBoardingOverlay'
import { CouncilModule } from '@/app/pages/Council/CouncilModule'
Expand Down Expand Up @@ -78,7 +77,6 @@ export const App = () => {
<ExtensionNotification />
<ImageReportNotification />
</NotificationsHolder>
<FMBanner />
</Providers>
)
}
Expand Down
12 changes: 7 additions & 5 deletions packages/ui/src/app/assets/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
138 changes: 0 additions & 138 deletions packages/ui/src/app/components/FMBanner.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion packages/ui/src/app/constants/currency.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const CurrencyName = {
integerValue: 'tJOY',
integerValue: 'JOY',
} as const
77 changes: 44 additions & 33 deletions packages/ui/src/app/pages/Profile/MyAccounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,43 @@ import { Statistics, TokenValueStat } from '@/common/components/statistics'

import { MyProfileTabs } from './components/MyProfileTabs'

const hints = {
total: {
title: 'Total balance',
tooltipText: 'Total balance from all connected accounts. This includes transferable and locked balance.',
},
transferable: {
title: 'Total transferable balance',
tooltipText:
'Total Balance less locked balance. Transferable balance can be used for signing transactions on the network.',
},
locked: {
title: 'Total locked balance',
tooltipLinkURL: 'https://joystream.gitbook.io/joystream-handbook/key-concepts/staking#locks',
tooltipText:
'Staking, or bonding, is the act of locking up funds under some terms so that they are not transferable and otherwise not entirely usable as they otherwise would be. The terms, referred to as unstaking terms describe the circumstances under which the funds may begin to cease being staked. The way staking is implemented is with the use of account.',
},
recoverable: {
title: 'Total recoverable balance',
tooltipText:
'Recoverable balance encapsulates all tokens that can be recovered, following the termination of the process where they were previously staked. Example: Vote has been casted for a candidate in council elections. That candidate lost the election and now the stake that was put behind the voting power for such candidate can be recovered, meaning locked balance will be reduced by such amount, while transferable balance will increase for the amount of staking lock.',
},
vestingTotal: {
title: 'Total initial vesting',
tooltipText:
'Total Initial vesting is the amount of tokens that are allocated to this account in the Genesis block, or via vesting transfer. From the very beginning this amount is fully locked, and some gets unlocked in accordance to vesting schedule. This is a sum of locked and all historically unlocked funds.',
},
vestingLocked: {
title: 'Total Locked in Vesting',
tooltipText:
'Total locked in vesting encapsulates all of the tokens from genesis allocation and vesting transfers that are subject to the vesting schedules. This amount gets reduced with every block in accordance to multiple combined vesting schedules each corresponding to a related vesting transfer which can be with its own terms.',
},
claimable: {
title: 'Total Vested Claimable',
tooltipText: 'Vested tokens are locked for a period of time. This is the amount that has been unlocked already.',
},
}

export const MyAccounts = () => {
const { total, transferable, locked, recoverable, vestingTotal, vestedClaimable, vestingLocked } =
useMyTotalBalances()
Expand All @@ -27,40 +64,14 @@ export const MyAccounts = () => {
</PageHeaderWrapper>
{!shouldHideStatistics && (
<Statistics>
<TokenValueStat
title="Total balance"
tooltipText="Total balance from all connected accounts. This includes transferable and locked balance."
value={total}
/>
<TokenValueStat
title="Total transferable balance"
tooltipText="Total Balance less locked balance. Transferable balance can be used for signing transactions on the network."
value={transferable}
/>
<TokenValueStat
title="Total locked balance"
tooltipText="Staking, or bonding, is the act of locking up funds under some terms so that they are not transferable and otherwise not entirely usable as they otherwise would be. The terms, referred to as unstaking terms describe the circumstances under which the funds may begin to cease being staked. The way staking is implemented is with the use of account."
tooltipLinkURL="https://joystream.gitbook.io/testnet-workspace/system/accounts-and-staking#locks"
value={locked}
/>
<TokenValueStat
title="Total recoverable balance"
tooltipText="Recoverable balance encapsulates all tokens that can be recovered, following the termination of the process where they were previously staked. Example: Vote has been casted for a candidate in council elections. That candidate lost the election and now the stake that was put behind the voting power for such candidate can be recovered, meaning locked balance will be reduced by such amount, while transferable balance will increase for the amount of staking lock."
value={recoverable}
/>
{vestingTotal.gtn(0) && (
<TokenValueStat title="Total initial vesting" tooltipText="Lorem ipsum..." value={vestingTotal} />
)}
{vestingTotal.gtn(0) && (
<TokenValueStat title="Total Locked in Vesting" tooltipText="Lorem ipsum..." value={vestingLocked} />
)}
<TokenValueStat {...hints.total} value={total} />
<TokenValueStat {...hints.transferable} value={transferable} />
<TokenValueStat {...hints.locked} value={locked} />
<TokenValueStat {...hints.recoverable} value={recoverable} />
{vestingTotal.gtn(0) && <TokenValueStat {...hints.vestingTotal} value={vestingTotal} />}
{vestingTotal.gtn(0) && <TokenValueStat {...hints.vestingLocked} value={vestingLocked} />}
{vestingTotal.gtn(0) && (
<TokenValueStat
title="Total Vested Claimable"
tooltipText="Vested tokens are locked for a period of time. This is the amount that has been unlocked already."
value={vestedClaimable}
inline
>
<TokenValueStat {...hints.claimable} value={vestedClaimable} inline>
{vestedClaimable.gtn(0) && <ClaimVestingButton />}
</TokenValueStat>
)}
Expand Down
3 changes: 2 additions & 1 deletion packages/ui/src/common/utils/validation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { AnyObjectSchema, ValidationError } from 'yup'
import Reference from 'yup/lib/Reference'
import { AnyObject } from 'yup/lib/types'

import { CurrencyName } from '@/app/constants/currency'
import { Loading } from '@/common/components/Loading'
import { formatJoyValue } from '@/common/model/formatters'

Expand Down Expand Up @@ -152,7 +153,7 @@ export const validStakingAmount = (): Yup.TestConfig<any, AnyObject> => ({
const minStake: BN | undefined = this.options.context?.minStake
if (minStake && minStake.gt(stake)) {
return this.createError({
message: 'Minimal stake amount is ${min} tJOY',
message: 'Minimal stake amount is ${min} ' + CurrencyName.integerValue,
params: { min: formatJoyValue(minStake) },
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const PostInsufficientFundsModal = ({
requiredAmount,
postDeposit,
}: PostInsufficientFundsModalProps) => {
const { t } = useTranslation()
const { t } = useTranslation('accounts')
const { hideModal } = useModal()
const { active } = useMyMemberships()
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const ProposalDiscussions = ({ thread, proposalId }: Props) => {
</Tooltip>
</Badge>
</DiscussionsHeader>
{discussionPosts.sort(Comparator<ForumPost>(true, 'createdAtBlock').string).map((post, index) => {
{discussionPosts.sort(Comparator<ForumPost>(true, 'createdAt').string).map((post, index) => {
return (
<PostListItem
isFirstItem={index === 0}
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/services/i18n/dict/en/accounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"feeInfo1": "Unfortunately, you don't have enough Tokens on your Controller account. You need at least ",
"feeInfo2": " for the transaction fee",
"transferable": "Transferable balance",
"addJoy": "Add tJOY to Controller Account"
"addJoy": "Add JOY to Controller Account"
}
}
}
Loading

2 comments on commit b6a5d3e

@vercel
Copy link

@vercel vercel bot commented on b6a5d3e Dec 19, 2022

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:

pioneer-2-storybook – ./

pioneer-2-storybook-joystream.vercel.app
pioneer-2-storybook.vercel.app
pioneer-2-storybook-git-dev-joystream.vercel.app

@vercel
Copy link

@vercel vercel bot commented on b6a5d3e Dec 19, 2022

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:

pioneer-2 – ./

pioneer-2.vercel.app
pioneer-2-git-dev-joystream.vercel.app
pioneer-2-joystream.vercel.app

Please sign in to comment.