Skip to content

Commit 7a7ed17

Browse files
authored
Fix territory edits (#2403)
1 parent 44992fd commit 7a7ed17

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

api/paidAction/territoryCreate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const paymentMethods = [
1414

1515
export async function getCost ({ billingType, uploadIds }, { models, me }) {
1616
const { totalFees } = await uploadFees(uploadIds, { models, me })
17-
return satsToMsats(TERRITORY_PERIOD_COST(billingType) + totalFees)
17+
return satsToMsats(BigInt(TERRITORY_PERIOD_COST(billingType)) + totalFees)
1818
}
1919

2020
export async function perform ({ invoiceId, ...data }, { me, cost, tx }) {

api/resolvers/upload.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ export async function uploadFees (s3Keys, { models, me }) {
6666
nUnpaid,
6767
uploadFeesMsats
6868
}] = await models.$queryRaw`SELECT * FROM upload_fees(${me?.id ?? USER_ID.anon}::INTEGER, ${s3Keys}::INTEGER[])`
69-
const uploadFees = msatsToSats(uploadFeesMsats)
69+
const uploadFees = BigInt(msatsToSats(uploadFeesMsats))
7070
const totalFeesMsats = BigInt(nUnpaid) * uploadFeesMsats
71-
const totalFees = msatsToSats(totalFeesMsats)
71+
const totalFees = BigInt(msatsToSats(totalFeesMsats))
7272
return { bytes24h, bytesUnpaid, nUnpaid, uploadFees, totalFees, totalFeesMsats }
7373
}
7474

0 commit comments

Comments
 (0)