Skip to content

Commit 0cf9867

Browse files
committed
clean up
1 parent 109f67b commit 0cf9867

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/components/nft-dashboard/Balance/components/SendForm/SendForm.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ const SendForm: React.FC<SendFormProps> = ({ onSend }) => {
5353

5454
// Debounced effect to calculate transaction size when the amount changes, with JWT
5555
useEffect(() => {
56+
5657
const debounceTimeout = setTimeout(() => {
5758
const fetchTransactionSize = async () => {
58-
if (isValidAddress(formData.address)) {
59+
if (isValidAddress(formData.address) && isDetailsOpen) {
5960
//this should use bech32 regex
6061
try {
6162
// Ensure user is authenticated
@@ -117,13 +118,12 @@ const SendForm: React.FC<SendFormProps> = ({ onSend }) => {
117118
setFeeRate(fee); // Update the new fee when it changes
118119
}, []);
119120

120-
121+
121122
function validateBech32Address(address: string) {
122123
try {
123124
const decoded = bech32.decode(address);
124125
const validPrefixes = ['bc', 'tb']; // 'bc' for mainnet, 'tb' for testnet
125126
if (validPrefixes.includes(decoded.prefix)) {
126-
console.log('Address is valid Bech32.');
127127
return true;
128128
} else {
129129
console.log('Invalid prefix.');

src/components/nft-dashboard/unconfirmed-transactions/components/ReplaceTransaction/ReplaceTransaction.styles.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import styled, { css } from 'styled-components';
22
import { BaseButton } from '@app/components/common/BaseButton/BaseButton';
33
import { BaseInput } from '@app/components/common/inputs/BaseInput/BaseInput';
44
interface ResponsiveProps {
5-
isMobile: boolean;
5+
$isMobile: boolean;
66
}
77
export const ContentWrapper = styled.div`
88
display: flex;
@@ -18,7 +18,7 @@ export const FieldDisplay = styled.div`
1818

1919
export const ValueWrapper = styled.div<ResponsiveProps>`
2020
${(props) =>
21-
props.isMobile &&
21+
props.$isMobile &&
2222
css`
2323
width: 100%;
2424
`}
@@ -50,14 +50,14 @@ export const ButtonRow = styled.div`
5050
justify-content: center;
5151
pading: 0.5rem 2rem;
5252
`;
53-
export const FeeInput = styled(BaseInput)<{ isMobile: boolean }>`
53+
export const FeeInput = styled(BaseInput)<{ $isMobile: boolean }>`
5454
5555
5656
padding: 1rem;
5757
background-color: var(--additional-background-color);
5858
border-radius: 0.5rem;
5959
${(props) =>
60-
props.isMobile &&
60+
props.$isMobile &&
6161
css`
6262
width: 100%;
6363
`}

0 commit comments

Comments
 (0)