mirror of https://github.com/certusone/oyster.git
chore: fix linter warnings
This commit is contained in:
parent
9d30c4b12e
commit
c8a7c726f0
|
@ -66,7 +66,7 @@ export default function MintSourceTokens({
|
|||
else
|
||||
sourceHolders[sourceHolders.length - 1].tokenAmount = parseInt(value);
|
||||
});
|
||||
console.log(sourceHolders);
|
||||
//console.log(sourceHolders);
|
||||
|
||||
if (singleSourceHolder)
|
||||
sourceHolders.push({
|
||||
|
|
|
@ -30,7 +30,7 @@ export function VoterBubbleGraph(props: IVoterBubbleGraph) {
|
|||
'...' +
|
||||
d.name.slice(d.name.length - 3, d.name.length),
|
||||
}));
|
||||
console.log('Data', limitedData);
|
||||
//console.log('Data', limitedData);
|
||||
const format = d3.format(',d');
|
||||
const color = d3
|
||||
.scaleOrdinal()
|
||||
|
@ -51,7 +51,7 @@ export function VoterBubbleGraph(props: IVoterBubbleGraph) {
|
|||
if (ref) {
|
||||
ref.innerHTML = '';
|
||||
const root = pack(limitedData);
|
||||
console.log('Re-rendered');
|
||||
// console.log('Re-rendered');
|
||||
const newSvg = d3
|
||||
.select(ref)
|
||||
.append('svg')
|
||||
|
|
|
@ -61,6 +61,7 @@ export const VoterTable = (props: IVoterTable) => {
|
|||
<a
|
||||
href={`https://explorer.solana.com/address/${key}?cluster=${subdomain}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{breakpoint.xxl && (
|
||||
<span>
|
||||
|
|
|
@ -22,8 +22,6 @@ export function useVotingRecords(proposal: PublicKey) {
|
|||
const { endpoint } = useConnectionConfig();
|
||||
const connection = useConnection();
|
||||
|
||||
const { timelock } = utils.programIds();
|
||||
|
||||
useEffect(() => {
|
||||
if (!proposal) {
|
||||
return;
|
||||
|
@ -33,6 +31,8 @@ export function useVotingRecords(proposal: PublicKey) {
|
|||
const records = await getGovernanceVotingRecords(proposal, endpoint);
|
||||
setVotingRecords(records);
|
||||
|
||||
const { timelock } = utils.programIds();
|
||||
|
||||
return connection.onProgramAccountChange(timelock.programId, info => {
|
||||
if (
|
||||
info.accountInfo.data.length === GovernanceVotingRecordLayout.span
|
||||
|
@ -57,7 +57,7 @@ export function useVotingRecords(proposal: PublicKey) {
|
|||
return () => {
|
||||
sub.then(id => connection.removeProgramAccountChangeListener(id));
|
||||
};
|
||||
}, [proposal]);
|
||||
}, [proposal, connection, endpoint]);
|
||||
|
||||
return votingRecords;
|
||||
}
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
import {
|
||||
PublicKey,
|
||||
SYSVAR_RENT_PUBKEY,
|
||||
TransactionInstruction,
|
||||
} from '@solana/web3.js';
|
||||
import { PublicKey, TransactionInstruction } from '@solana/web3.js';
|
||||
import { utils } from '@oyster/common';
|
||||
import * as BufferLayout from 'buffer-layout';
|
||||
import { CONFIG_NAME_LENGTH, TimelockInstruction } from './timelock';
|
||||
import BN from 'bn.js';
|
||||
import * as Layout from '../utils/layout';
|
||||
import { TimelockInstruction } from './timelock';
|
||||
|
||||
/// 0. `[]` Timelock config key. Needs to be set with pubkey set to PDA with seeds of the
|
||||
/// program account key, governance mint key, council mint key, and timelock program account key.
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
import {
|
||||
PublicKey,
|
||||
SYSVAR_RENT_PUBKEY,
|
||||
TransactionInstruction,
|
||||
} from '@solana/web3.js';
|
||||
import { PublicKey, TransactionInstruction } from '@solana/web3.js';
|
||||
import { utils } from '@oyster/common';
|
||||
import * as BufferLayout from 'buffer-layout';
|
||||
import { CONFIG_NAME_LENGTH, TimelockInstruction } from './timelock';
|
||||
|
|
|
@ -437,7 +437,7 @@ export const TimelockConfigParser = (
|
|||
votingEntryRule: data.votingEntryRule,
|
||||
minimumSlotWaitingPeriod: data.minimumSlotWaitingPeriod,
|
||||
governanceMint: data.governanceMint,
|
||||
councilMint: data.councilMintOption == 1 ? data.councilMint : null,
|
||||
councilMint: data.councilMintOption === 1 ? data.councilMint : null,
|
||||
program: data.program,
|
||||
timeLimit: data.timeLimit,
|
||||
name: utils.fromUTF8Array(data.name).replaceAll('\u0000', ''),
|
||||
|
|
|
@ -4,7 +4,6 @@ import { LABELS } from '../../constants';
|
|||
|
||||
import {
|
||||
hooks,
|
||||
contexts,
|
||||
useWallet,
|
||||
useConnection,
|
||||
deserializeMint,
|
||||
|
|
|
@ -41,6 +41,7 @@ export const ProposalsView = () => {
|
|||
badge: <TokenIcon mintAddress={mint} size={30} />,
|
||||
status: state.info.status,
|
||||
state,
|
||||
key,
|
||||
});
|
||||
});
|
||||
return newListData;
|
||||
|
@ -87,7 +88,7 @@ export const ProposalsView = () => {
|
|||
dataSource={listData}
|
||||
renderItem={item => (
|
||||
<List.Item
|
||||
key={item.title}
|
||||
key={item.key}
|
||||
className="proposal-item"
|
||||
onClick={() => history.push(item.href)}
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue