Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Brown committed Dec 6, 2024
1 parent b8383f0 commit 4bd1613
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@
const { ownerName, repoName } = $context.project?.source ?? unreachable();
fundingJson = (await github.fetchFundingJson(ownerName, repoName)) || {};
[code, highlight] = getChangedTemplate(fundingJson, address, network);
// eslint-disable-next-line no-console
console.log(fundingJson);
}
onMount(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { FundingJson } from '$lib/utils/github/GitHub';

const NUM_SPACES = 2;

export const getChangedTemplate = (
Expand Down Expand Up @@ -26,7 +28,7 @@ export const getChangedTemplate = (
return [asJSON, [start, end]];
};

export const objectTemplate = (address: string, network = 'ethereum') => {
export const objectTemplate = (address: string, network = 'ethereum'): FundingJson => {
return {
drips: {
[network]: {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/utils/github/GitHub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import network from '$lib/stores/wallet/network';
import type { Octokit } from '@octokit/rest';
import { Buffer } from 'buffer';

type DripsJson = {
export type FundingJson = {
drips?: {
[key: string]: {
ownedBy: string;
Expand Down Expand Up @@ -70,7 +70,7 @@ export default class GitHub {
}
}

public async fetchFundingJson(owner: string, repo: string): Promise<DripsJson | null> {
public async fetchFundingJson(owner: string, repo: string): Promise<FundingJson | null> {
try {
const { data } = await this.octokit.repos.getContent({
owner,
Expand Down

0 comments on commit 4bd1613

Please sign in to comment.