Skip to content

Commit

Permalink
add address book integration to send CAT tx (#1916)
Browse files Browse the repository at this point in the history
  • Loading branch information
ronanlong authored Jul 20, 2023
1 parent 80dc27d commit a420c4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 0 additions & 2 deletions packages/wallets/src/components/WalletSend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ type SendCardProps = {

type SendTransactionData = {
address: string;
addressAuto: string;
amount: string;
fee: string;
memo: string;
Expand Down Expand Up @@ -69,7 +68,6 @@ export default function WalletSend(props: SendCardProps) {
const methods = useForm<SendTransactionData>({
defaultValues: {
address: '',
addressAuto: '',
amount: '',
fee: '',
memo: '',
Expand Down
11 changes: 5 additions & 6 deletions packages/wallets/src/components/cat/WalletCATSend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import isNumeric from 'validator/es/lib/isNumeric';

import useWallet from '../../hooks/useWallet';
import useWalletState from '../../hooks/useWalletState';
import AddressBookAutocomplete from '../AddressBookAutocomplete';
import CreateWalletSendTransactionResultDialog from '../WalletSendTransactionResultDialog';

type Props = {
Expand Down Expand Up @@ -187,15 +188,13 @@ export default function WalletCATSend(props: Props) {
<Card>
<Grid spacing={2} container>
<Grid xs={12} item>
<TextField
<AddressBookAutocomplete
name="address"
getType="address"
freeSolo
variant="filled"
color="secondary"
fullWidth
disabled={isSubmitting}
label={<Trans>Address / Puzzle hash</Trans>}
data-testid="WalletCATSend-address"
required
disabled={isSubmitting}
/>
</Grid>
<Grid xs={12} md={6} item>
Expand Down

0 comments on commit a420c4e

Please sign in to comment.