Skip to content

Commit

Permalink
fix: lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
shrutipanjwani committed Sep 17, 2024
1 parent 3ab2622 commit 280c0c3
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions src/app/[netname]/bounty/[id]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ type Props = {
params: { id: string; netname: string };
};

function weiToEther(weiValue: string | number | bigint): string {
const etherValue = Number(weiValue) / 1e18;
return etherValue.toFixed(6);
}
// function weiToEther(weiValue: string | number | bigint): string {
// const etherValue = Number(weiValue) / 1e18;
// return etherValue.toFixed(6);
// }

export async function generateMetadata({ params }: Props): Promise<Metadata> {
try {
Expand All @@ -23,7 +23,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
try {
token = params.netname;
} catch (error) {
console.log('params?.netname open graph error: ', error);
// console.log('params?.netname open graph error: ', error);
return {};
}
let currency = 'degen';
Expand Down Expand Up @@ -69,7 +69,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
},
};
} catch (error) {
console.log('layout open graph error: ', error);
// console.log('layout open graph error: ', error);
return {};
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/[netname]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
"poidh - pics or it didn't happen - fully onchain bounties + collectible NFTs - start your collection today on Arbitrum, Base, or Degen Chain",
};
} catch (error) {
console.log('layout open graph error: ', error);
// console.log('layout open graph error: ', error);
return {};
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/bounty/[id]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
}

// Log fetched data for debugging
console.log('Fetched bountyData:', bountyData);
// console.log('Fetched bountyData:', bountyData);

if (!bountyData.amount) {
throw new Error('Bounty amount is null or undefined');
Expand Down Expand Up @@ -75,7 +75,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
},
};
} catch (error) {
console.log('layout open graph error: ', error);
// console.log('layout open graph error: ', error);
return {};
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/context/WalletProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const WalletProvider: React.FC<WalletProviderProps> = ({ children }) => {
const account = accounts[0];
setWalletAddress(account);
} catch (error) {
console.log(error);
// console.log(error);
}
} else {
setWalletAddress('No wallet');
Expand Down
2 changes: 1 addition & 1 deletion src/app/context/web3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const getContract = async (signer: any) => {
export const getContractRead = async () => {
const provider = await getProvider();
const currentChain = chainStatusStore.currentChain;
console.log('getContractRead', currentChain.name);
// console.log('getContractRead', currentChain.name);
return new Contract(currentChain.contracts.mainContract, ABI, provider);
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/account/AccountInfoShare.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ const AccountInfo = () => {
}, [completedBounties]);

useEffect(() => {
console.log('claims:');
// console.log('claims:');
const bountyIds = completedClaims.map((claim) => claim.bountyId);
let totalAmount = BigInt(0);
Promise.all(
Expand Down
4 changes: 2 additions & 2 deletions src/components/bounty/BountyInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const BountyInfo = ({ bountyId }: { bountyId: string }) => {
toast.success('Bounty canceled successfully!');
} catch (error) {
// Refactor Change -- Remove This
console.error('Error canceling bounty:', error);
// console.error('Error canceling bounty:', error);
const errorCode = (error as unknown as ErrorInfo)?.info?.error?.code;
if (errorCode === 4001) {
toast.error('Transaction denied by user.');
Expand All @@ -82,7 +82,7 @@ const BountyInfo = ({ bountyId }: { bountyId: string }) => {
toast.success('Bounty canceled successfully!');
} catch (error) {
// Refactor Change -- Remove This
console.error('Error canceling:', error);
// console.error('Error canceling:', error);
const errorCode = (error as unknown as ErrorInfo)?.info?.error?.code;
if (errorCode === 4001) {
toast.error('Transaction denied by user.');
Expand Down
8 changes: 4 additions & 4 deletions src/components/bounty/BountyProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ export const BountyProvider = ({

getParticipants(bountyId)
.then((openBounty) => {
console.log('openBounty.addresses:');
// console.log('openBounty.addresses:');

console.log(openBounty.addresses);
// console.log(openBounty.addresses);
setIsMultiplayer(openBounty.addresses.length > 0);

setIsOwnerContributor(
Expand All @@ -85,8 +85,8 @@ export const BountyProvider = ({
setIsVoting(currentVotingClaim === 0);
})();

console.log('current voting:');
console.log(isVoting);
// console.log('current voting:');
// console.log(isVoting);
}
}, [bountyId, currentUser]);

Expand Down

0 comments on commit 280c0c3

Please sign in to comment.