Default top accounts to all accounts

This commit is contained in:
Tyera Eulberg 2020-05-26 10:12:03 -06:00 committed by Michael Vines
parent a15ea32f16
commit 3f12bf6f52
2 changed files with 4 additions and 6 deletions

View File

@ -27,7 +27,7 @@ export default function TopAccountsCard() {
return <ErrorCard text={richList} retry={fetchRichList} />;
}
const { accounts, circulatingSupply: supply } = richList;
const { accounts, totalSupply: supply } = richList;
return (
<div className="card">
@ -40,7 +40,7 @@ export default function TopAccountsCard() {
<th className="text-muted">Rank</th>
<th className="text-muted">Address</th>
<th className="text-muted">Balance (SOL)</th>
<th className="text-muted">% of Circulating Supply</th>
<th className="text-muted">% of Total Supply</th>
<th className="text-muted">Details</th>
</tr>
</thead>
@ -60,7 +60,7 @@ const renderHeader = () => {
<div className="card-header">
<div className="row align-items-center">
<div className="col">
<h4 className="card-header-title">Top 20 Active Accounts</h4>
<h4 className="card-header-title">Largest Accounts</h4>
</div>
</div>
</div>

View File

@ -49,9 +49,7 @@ async function fetch(dispatch: Dispatch, url: string) {
try {
const connection = new Connection(url, "max");
const supply = (await connection.getSupply()).value;
const accounts = (
await connection.getLargestAccounts({ filter: "circulating" })
).value;
const accounts = (await connection.getLargestAccounts()).value;
// Update state if still connecting
dispatch(state => {