Skip to content

Commit

Permalink
Fix rebase problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Brown committed Dec 6, 2024
1 parent 4bd1613 commit 3b1dafe
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions src/lib/utils/github/GitHub.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import network from '$lib/stores/wallet/network';
import walletStore from '$lib/stores/wallet/wallet.store';
import type { Octokit } from '@octokit/rest';
import { Buffer } from 'buffer';
import { get } from 'svelte/store';

export type FundingJson = {
drips?: {
Expand Down Expand Up @@ -44,28 +46,12 @@ export default class GitHub {
throw new Error('FUNDING.json not found.');
}

throw new Error(
`Unable to parse the FUNDING.json file. Ensure it exists, is valid JSON, and includes an address for ${network.label}.`,
);
}
}
const fundingJsonOwner =
fundingJson.drips?.[network.name === 'homestead' ? 'ethereum' : network.name].ownedBy;

public async verifyFundingJson(
owner: string,
repo: string,
expectedAddress: string,
): Promise<void> {
const fundingJsonOwner = await this.getFundingJsonAddress(owner, repo);

<<<<<<< HEAD
if (!fundingJsonOwner) {
throw new Error('Invalid FUNDING.json file. Does it exist?');
}
const { address: expectedOwner } = get(walletStore);

if (fundingJsonOwner.toLowerCase() !== expectedAddress?.toLowerCase()) {
=======
if (!fundingJsonOwner || fundingJsonOwner.toLowerCase() !== expectedOwner?.toLowerCase()) {
>>>>>>> e54cf005 (Establish method to fetch funding.json, struggle with typescript)
throw new Error('Invalid FUNDING.json file. Does it have the correct Ethereum address?');
}
}
Expand Down

0 comments on commit 3b1dafe

Please sign in to comment.