fix: cancel cashout txs

This commit is contained in:
José Oliveira 2021-08-13 14:16:21 +01:00 committed by Josh Harvey
parent e5ab87c2a5
commit e952682917
4 changed files with 70 additions and 29 deletions

View file

@ -19,6 +19,7 @@ const bills = require('../bills')
const anonymous = require('../../constants').anonymousCustomer
const serverVersion = require('../../../package.json').version
const cashOutTx = require('../../cash-out/cash-out-tx')
const transactions = require('../transactions')
const funding = require('../funding')
const forex = require('../../forex')
@ -344,6 +345,7 @@ const typeDefs = gql`
deletePromoCode(codeId: ID!): PromoCode
toggleClearNotification(id: ID!, read: Boolean!): Notification
clearAllNotifications: Notification
cancelCashOutTransaction(id: ID): Transaction
}
`
@ -440,7 +442,8 @@ const resolvers = {
createPromoCode: (...[, { code, discount }]) => promoCodeManager.createPromoCode(code, discount),
deletePromoCode: (...[, { codeId }]) => promoCodeManager.deletePromoCode(codeId),
toggleClearNotification: (...[, { id, read }]) => notifierQueries.setRead(id, read),
clearAllNotifications: () => notifierQueries.markAllAsRead()
clearAllNotifications: () => notifierQueries.markAllAsRead(),
cancelCashOutTransaction: (...[, { id }]) => cashOutTx.cancel(id)
}
}