chore: fix linter warnings

This commit is contained in:
Sebastian.Bor 2021-04-22 21:59:41 +01:00
parent 9d30c4b12e
commit c8a7c726f0
9 changed files with 13 additions and 22 deletions

View File

@ -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({

View File

@ -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')

View File

@ -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>

View File

@ -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;
}

View File

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

View File

@ -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';

View File

@ -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', ''),

View File

@ -4,7 +4,6 @@ import { LABELS } from '../../constants';
import {
hooks,
contexts,
useWallet,
useConnection,
deserializeMint,

View File

@ -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)}
>