Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: update instruction components to use span instead of p and … #46

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor: remove console.log statements from send hooks to clean up code
yarre-uk committed Jan 21, 2025
commit 2a795f6b391388ee2a2cc9a69f9f7d672b000732
2 changes: 0 additions & 2 deletions src/hooks/contracts/write/use-send-sol.ts
Original file line number Diff line number Diff line change
@@ -38,8 +38,6 @@ const useSendSol = () => {
const fee = await rawTx.getEstimatedFee(connection);
const solBalance = tokens?.find((token) => token.mint === wSolMint.toBase58())?.amount;

console.log(Number(solBalance), fee, amount * LAMPORTS_PER_SOL);

if (fee && solBalance && Number(solBalance) < fee + amount * LAMPORTS_PER_SOL) {
throw new Error('Insufficient funds');
}
2 changes: 0 additions & 2 deletions src/hooks/contracts/write/use-send.ts
Original file line number Diff line number Diff line change
@@ -70,8 +70,6 @@ const useSend = () => {
const fee = await rawTx.getEstimatedFee(connection);
const solBalance = tokens?.find((token) => token.mint === wSolMint.toBase58())?.amount;

console.log('fee', fee, 'solBalance', solBalance, 'amount', amount);

if (fee && solBalance && Number(solBalance) < fee) {
throw new Error('Insufficient funds');
}

Unchanged files with check annotations Beta

if (publicKey) {
setIsOpen(false);
}
}, [publicKey]);

Check warning on line 52 in src/components/common/header/connect-wallet-button.tsx

GitHub Actions / main

React Hook useEffect has a missing dependency: 'setIsOpen'. Either include it or remove the dependency array
if (publicKey) {
return (
);
Button.displayName = 'Button';
export { Button, buttonVariants };

Check warning on line 44 in src/components/ui/button.tsx

GitHub Actions / main

Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components