Skip to content

Commit

Permalink
fix(dcellar-web-ui): fix send toAccount initial error
Browse files Browse the repository at this point in the history
  • Loading branch information
devinxl committed Sep 13, 2023
1 parent 3305ec9 commit 2749edc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/dcellar-web-ui/src/modules/wallet/Send/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ export const Send = () => {
initFormRef.current = true;
}, [paymentAccounts, dispatch, from, ownerAccount, to, isLoadingPaymentAccounts]);

const isDisableToAccount = fromAccount?.address !== loginAccount;
const isDisableToAccount = !isEmpty(fromAccount) && fromAccount.address !== loginAccount;
useEffect(() => {
if (!isDisableToAccount || isEmpty(ownerAccount) || !initFormRef.current) return;
dispatch(setToAccount(ownerAccount));
isDisableToAccount && dispatch(setToAccount(ownerAccount));
}, [dispatch, isDisableToAccount, ownerAccount]);

const onModalClose = () => {
Expand Down

0 comments on commit 2749edc

Please sign in to comment.