Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
turbocrime committed Mar 26, 2024
1 parent 0adfbfe commit a58c883
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions apps/minifront/src/components/ibc/ibc-in-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,15 @@ import { Button } from '@penumbra-zone/ui/components/ui/button';
import { useLoaderData } from 'react-router-dom';
import { IbcLoaderResponse } from './ibc-loader';
import { useStore } from '../../state';
import { filterBalancesPerChain, ibcSelector, ibcValidationErrors } from '../../state/ibc';
import { filterBalancesPerChain, ibcSelector } from '../../state/ibc';
import InputToken from '../shared/input-token';
import { BalancesResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb';
import { SelectAccount } from '@penumbra-zone/ui/components/ui/select-account';
import { getAddrByIndex } from '../../fetchers/address';

export const IbcInForm = () => {
const assetBalances = useLoaderData() as IbcLoaderResponse;
const {
sendIbcWithdraw,
destinationChainAddress,
setDestinationChainAddress,
amount,
setAmount,
selection,
setSelection,
chain,
} = useStore(ibcSelector);
const { amount, setAmount, selection, chain } = useStore(ibcSelector);
const filteredBalances = filterBalancesPerChain(assetBalances, chain);
const validationErrors = useStore(ibcValidationErrors);

return (
<Card light>
Expand All @@ -34,6 +23,10 @@ export const IbcInForm = () => {
//void sendIbcDeposit();
}}
>
<div className='hidden'>
{/* account selector distorts the parent container for some reason*/}
<SelectAccount getAddrByIndex={getAddrByIndex} />
</div>
<ChainSelector />
<InputToken
label='Amount to shield'
Expand All @@ -45,9 +38,7 @@ export const IbcInForm = () => {
if (Number(e.target.value) < 0) return;
setAmount(e.target.value);
}}
setSelection={function (selection: BalancesResponse): void {
// no
}}
setSelection={() => null}
balances={filteredBalances}
/>
<Button type='submit' variant='gradient'>
Expand Down

0 comments on commit a58c883

Please sign in to comment.