This commit is contained in:
k00b 2025-01-04 19:31:00 -06:00
parent a04647d304
commit 529b5d1fef
1 changed files with 8 additions and 2 deletions

View File

@ -1053,10 +1053,16 @@ export default {
}
},
Item: {
sats: async (item, args, { models }) => {
sats: async (item, args, { models, me }) => {
if (me?.id === item.userId) {
return msatsToSats(BigInt(item.msats))
}
return msatsToSats(BigInt(item.msats) + BigInt(item.mePendingMsats || 0) + BigInt(item.mePendingMcredits || 0))
},
credits: async (item, args, { models }) => {
credits: async (item, args, { models, me }) => {
if (me?.id === item.userId) {
return msatsToSats(BigInt(item.mcredits))
}
return msatsToSats(BigInt(item.mcredits) + BigInt(item.mePendingMcredits || 0))
},
commentSats: async (item, args, { models }) => {