Skip to content

Commit

Permalink
[Chore] Remove unused 'faucet' service from chain logic (thirdweb-dev…
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsdls authored Aug 11, 2024
1 parent 40fbe9a commit c316174
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
6 changes: 0 additions & 6 deletions apps/dashboard/src/app/(dashboard)/(chain)/chainlist/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@ async function getChainsToRender(params: SearchParams) {
// if the chain does not have all of the services in the filter, return false to filter it out
if (
!urlServiceArray.every((service) => {
// TODO improve this
// We don't have "faucet" added in services array, so for now we just check if it's testnet or not
if (service === "faucet") {
return chain.testnet;
}

return chain.services.find((s) => s.enabled && s.service === service);
})
) {
Expand Down
1 change: 0 additions & 1 deletion apps/dashboard/src/app/(dashboard)/(chain)/types/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export type ChainSupportedService =
| "engine"
| "account-abstraction"
| "pay"
| "faucet"
| "rpc-edge"
| "chainsaw";

Expand Down
4 changes: 1 addition & 3 deletions apps/dashboard/src/components/buttons/MismatchButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,7 @@ function NoFundsDialogContent(props: {
{props.chain.id === localhost.id ? (
// localhost case
<GetLocalHostTestnetFunds />
) : chainWithServiceInfoQuery.data.services.find(
(x) => x.enabled && x.service === "faucet",
) ? (
) : chainWithServiceInfoQuery.data.testnet ? (
// faucet case
<GetFundsFromFaucet chain={chainWithServiceInfoQuery.data} />
) : chainWithServiceInfoQuery.data.services.find(
Expand Down

0 comments on commit c316174

Please sign in to comment.