diff --git a/packages/desktop-client/src/components/accounts/TransactionsTable.js b/packages/desktop-client/src/components/accounts/TransactionsTable.js index 3bf19144326b6bfa34fe156e58866cc9d79a7660..2ececa01b885a0f1cc9448ba9195c69302053c4f 100644 --- a/packages/desktop-client/src/components/accounts/TransactionsTable.js +++ b/packages/desktop-client/src/components/accounts/TransactionsTable.js @@ -403,6 +403,7 @@ function PayeeCell({ // Filter out the account we're currently in as it is not a valid transfer accounts = accounts.filter(account => account.id !== accountId); + payees = payees.filter(payee => payee.transfer_acct !== accountId); return ( <CustomCell diff --git a/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.js b/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.js index d826bc1fb3fb9a3318f6828dfc6f6a23006e053b..86904ff98563804e4b435680152975f965c8e8c1 100644 --- a/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.js +++ b/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.js @@ -181,10 +181,19 @@ export default function PayeeAutocomplete({ onUpdate, onSelect, onManagePayees, + accounts, + payees, ...props }) { - let payees = useCachedPayees(); - let accounts = useCachedAccounts(); + let cachedPayees = useCachedPayees(); + if (!payees) { + payees = cachedPayees; + } + + let cachedAccounts = useCachedAccounts(); + if (!accounts) { + accounts = cachedAccounts; + } let [focusTransferPayees, setFocusTransferPayees] = useState( defaultFocusTransferPayees, diff --git a/upcoming-release-notes/1038.md b/upcoming-release-notes/1038.md new file mode 100644 index 0000000000000000000000000000000000000000..8018b0b88dfa20a67bac60f8f9d37a0fc82386ab --- /dev/null +++ b/upcoming-release-notes/1038.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [Miodec] +--- + +Fixed a bug where it was possible to make a transfer to the same account as the one making the transfer.