-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Added - Update Channel Payouts Proposal. - Self-imposed governance blacklisting support.
- Loading branch information
Showing
89 changed files
with
13,442 additions
and
6,206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { useEffect, useState } from 'react' | ||
import { firstValueFrom } from 'rxjs' | ||
|
||
import { useApi } from '@/api/hooks/useApi' | ||
|
||
import { encodeAddress } from '../model/encodeAddress' | ||
|
||
interface Props { | ||
skip?: boolean | ||
} | ||
|
||
const cache: string[] = [] | ||
|
||
export const useVotingOptOutAccounts = ({ skip }: Props = {}): string[] => { | ||
const { api } = useApi() | ||
const [addresses, setAddresses] = useState<string[]>(cache) | ||
|
||
useEffect(() => { | ||
if (skip || !api || cache.length) return | ||
|
||
firstValueFrom(api.query.referendum.accountsOptedOut.keys()).then((result: any) => { | ||
setAddresses(result.map((key: any) => encodeAddress(key.args[0]))) | ||
}) | ||
}, [api?.isConnected]) | ||
|
||
return addresses | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { encodeAddress as encode } from '@polkadot/util-crypto' | ||
|
||
const JOYSTREAM_SS58_PREFIX = 126 | ||
|
||
export const encodeAddress = (key: Parameters<typeof encode>[0]) => encode(key, JOYSTREAM_SS58_PREFIX) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
a6318b0
There was a problem hiding this comment.
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:
dao – ./
dao-git-main-joystream.vercel.app
dao-joystream.vercel.app
dao.joystream.org
pioneerapp.xyz