Default top accounts to all accounts
This commit is contained in:
parent
a15ea32f16
commit
3f12bf6f52
|
@ -27,7 +27,7 @@ export default function TopAccountsCard() {
|
||||||
return <ErrorCard text={richList} retry={fetchRichList} />;
|
return <ErrorCard text={richList} retry={fetchRichList} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { accounts, circulatingSupply: supply } = richList;
|
const { accounts, totalSupply: supply } = richList;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="card">
|
<div className="card">
|
||||||
|
@ -40,7 +40,7 @@ export default function TopAccountsCard() {
|
||||||
<th className="text-muted">Rank</th>
|
<th className="text-muted">Rank</th>
|
||||||
<th className="text-muted">Address</th>
|
<th className="text-muted">Address</th>
|
||||||
<th className="text-muted">Balance (SOL)</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>
|
<th className="text-muted">Details</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -60,7 +60,7 @@ const renderHeader = () => {
|
||||||
<div className="card-header">
|
<div className="card-header">
|
||||||
<div className="row align-items-center">
|
<div className="row align-items-center">
|
||||||
<div className="col">
|
<div className="col">
|
||||||
<h4 className="card-header-title">Top 20 Active Accounts</h4>
|
<h4 className="card-header-title">Largest Accounts</h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -49,9 +49,7 @@ async function fetch(dispatch: Dispatch, url: string) {
|
||||||
try {
|
try {
|
||||||
const connection = new Connection(url, "max");
|
const connection = new Connection(url, "max");
|
||||||
const supply = (await connection.getSupply()).value;
|
const supply = (await connection.getSupply()).value;
|
||||||
const accounts = (
|
const accounts = (await connection.getLargestAccounts()).value;
|
||||||
await connection.getLargestAccounts({ filter: "circulating" })
|
|
||||||
).value;
|
|
||||||
|
|
||||||
// Update state if still connecting
|
// Update state if still connecting
|
||||||
dispatch(state => {
|
dispatch(state => {
|
||||||
|
|
Loading…
Reference in New Issue