Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/mail/paymentRequest.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import request from './request'
import i18n from 'i18n'
import moment from 'moment'
import formatDate from '../modules/util/formatDate'
import formatDate from '../utils/formatDate'
import emailTemplate from './templates/base-content'
import { tableContentEmailTemplate } from './templates/table-content'
import currencyInfo from '../modules/util/currency-info'
import { handleAmount } from '../modules/util/handle-amount/handle-amount'
import currencyInfo from '../utils/currency-info'
import { handleAmount } from '../utils/handle-amount/handle-amount'

type CurrencyKey = keyof typeof currencyInfo

Expand Down
4 changes: 2 additions & 2 deletions src/mail/payout.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import i18n from 'i18n'
import request from './request'
import { handleAmount } from '../modules/util/handle-amount/handle-amount'
import { handleAmount } from '../utils/handle-amount/handle-amount'
import moment from 'moment'
import { tableContentEmailTemplate } from './templates/table-content'
import currencyInfo from '../modules/util/currency-info'
import currencyInfo from '../utils/currency-info'

const PayoutMail: any = {
payoutCreated: async function (user: any, payout: any) {
Expand Down
2 changes: 1 addition & 1 deletion src/mail/templates/issue/claim.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import i18n from 'i18n'
import request from '../../request'
import { tableContentEmailTemplate, type ActionButton } from '../table-content'
import currencyInfo from '../../../modules/util/currency-info'
import currencyInfo from '../../../utils/currency-info'

const ClaimMail: any = {
notifyUnclaimedBounties: async function (user: any, issue: any, pullRequest: any) {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/orders/orderRefund.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import models from '../../models'
import PaymentMail from '../../mail/payment'
import requestPromise from 'request-promise'
import { handleAmount } from '../util/handle-amount/handle-amount'
import { handleAmount } from '../../utils/handle-amount/handle-amount'
import stripeModule from '../../client/payment/stripe'
const stripe = stripeModule()

Expand Down
2 changes: 1 addition & 1 deletion src/modules/payouts/payoutRequest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import models from '../../models'
import Stripe from '../../client/payment/stripe'
import { handleAmount } from '../util/handle-amount/handle-amount'
import { handleAmount } from '../../utils/handle-amount/handle-amount'

const stripe = Stripe()

Expand Down
2 changes: 1 addition & 1 deletion src/modules/users/userBankAccountCreate.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import models from '../../models'
import stripeModule from '../../client/payment/stripe'
const stripe = stripeModule()
import { currencyMap } from '../util/currency-map'
import { currencyMap } from '../../utils/currency-map'

const currentModels = models as any

Expand Down
2 changes: 1 addition & 1 deletion src/modules/walletOrders/walletOrderBuilds.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import stripe from '../../client/payment/stripe'
import models from '../../models'
import { createOrUpdateCustomer } from '../util/customer'
import { createOrUpdateCustomer } from '../../utils/customer'

const currentModels = models as any
const stripeInstance = stripe()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Models from '../../../../models'
import PaymentRequestMail from '../../../../mail/paymentRequest'
import Stripe from '../../../../client/payment/stripe'
import { handleAmount } from '../../../util/handle-amount/handle-amount'
import { handleAmount } from '../../../../utils/handle-amount/handle-amount'

const stripe = Stripe()
const models = Models as any
Expand Down
2 changes: 1 addition & 1 deletion src/modules/webhooks/checkoutSessionCompleted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if (process.env.NODE_ENV !== 'production') {
}
import Stripe from '../../client/payment/stripe'
import Models from '../../models'
import { handleAmount } from '../util/handle-amount/handle-amount'
import { handleAmount } from '../../utils/handle-amount/handle-amount'
import PaymentRequestMail from '../../mail/paymentRequest'

const stripe = Stripe()
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/sync/sync_payment_requests.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Stripe from '../../client/payment/stripe'
import Models from '../../models'
import { UUIDV4 } from 'sequelize'
import { handleAmount } from '../../modules/util/handle-amount/handle-amount'
import { handleAmount } from '../../utils/handle-amount/handle-amount'

const models = Models as any

Expand Down
2 changes: 1 addition & 1 deletion src/services/payments/disputes/disputeService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DisputeDataCreated, DisputeDataWithdrawn, DisputeDataClosed } from './t
import PaymentRequestMail from '../../../mail/paymentRequest'
import { findOrCreatePaymentRequestBalance } from '../../../queries/payment-request/payment-request-balance'
import { findPaymentRequestPayment } from '../../../queries/payment-request/payment-request-payment'
import { handleAmount } from '../../../modules/util/handle-amount/handle-amount'
import { handleAmount } from '../../../utils/handle-amount/handle-amount'

const stripe = Stripe()
const models = Models as any
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/modules/util/customer.ts → src/utils/customer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import stripeModule from '../../client/payment/stripe'
import stripeModule from '../client/payment/stripe'
const stripe = stripeModule()
import models from '../../models'
import models from '../models'

const currentModels = models as any

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/handle-amount.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect } from 'chai'
import { handleAmount } from '../src/modules/util/handle-amount/handle-amount'
import { handleAmount } from '../src/utils/handle-amount/handle-amount'

describe('Amount Conversion', () => {
it('should convert cents to decimal', () => {
Expand Down