Skip to content

Commit

Permalink
Prevent setting original amount without currency
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-koan committed Aug 17, 2023
1 parent 4101ad9 commit 0d56c16
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web/src/components/transactions/AmountEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ export const AmountEditor: Component<{
)

const doUpdate = async () => {
if (props.field === "originalAmount" && !newCurrencyCode()) {
toast.error("Please select a currency")
return
}

let currency = props.transaction.currency

if (props.field === "originalAmount") {
Expand Down

0 comments on commit 0d56c16

Please sign in to comment.