Skip to content

Commit

Permalink
fix(mobile): [Transaction] new transaction amount should be negative (#…
Browse files Browse the repository at this point in the history
…104)

* feat(api): [Transaction] Paginate transactions by date instead of createdAt

* fix(mobile): new transaction amount should be negative

---------

Co-authored-by: Quốc Khánh <khanh@quocs.com>
  • Loading branch information
bkdev98 and Quốc Khánh committed Jul 13, 2024
1 parent 89bd5eb commit d077cae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/mobile/mutations/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { z } from 'zod'
export async function createTransaction(data: TransactionFormValues) {
const hc = await getHonoClient()
const result = await hc.v1.transactions.$post({
json: data,
json: {
...data,
amount: -data.amount,
},
})

if (result.ok) {
Expand Down

0 comments on commit d077cae

Please sign in to comment.