File tree Expand file tree Collapse file tree
src/components/nft-dashboard
Balance/components/SendForm
unconfirmed-transactions/components/ReplaceTransaction Expand file tree Collapse file tree Original file line number Diff line number Diff 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.' ) ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import styled, { css } from 'styled-components';
22import { BaseButton } from '@app/components/common/BaseButton/BaseButton' ;
33import { BaseInput } from '@app/components/common/inputs/BaseInput/BaseInput' ;
44interface ResponsiveProps {
5- isMobile : boolean ;
5+ $ isMobile : boolean ;
66}
77export const ContentWrapper = styled . div `
88 display: flex;
@@ -18,7 +18,7 @@ export const FieldDisplay = styled.div`
1818
1919export 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 ` }
You can’t perform that action at this time.
0 commit comments