Browse Source

dont forward boost sats to self

dependabot/npm_and_yarn/ini-1.3.7
Evan Feenstra 4 years ago
parent
commit
f01723a0ea
  1. 2
      dist/src/network/receive.js
  2. 2
      dist/src/network/receive.js.map
  3. 2
      src/network/receive.ts

2
dist/src/network/receive.js

@ -140,7 +140,7 @@ function onReceive(payload) {
const ogMsg = yield models_1.models.Message.findOne({ where: {
uuid: payload.message.replyUuid,
} });
if (ogMsg) {
if (ogMsg && ogMsg.sender && ogMsg.sender !== 1) {
const amtToForward = payload.message.amount - (chat.pricePerMessage || 0) - (chat.escrowAmount || 0);
if (amtToForward > 0) {
forwardSatsToContact(chat, ogMsg.sender, amtToForward, payload.message.replyUuid);

2
dist/src/network/receive.js.map

File diff suppressed because one or more lines are too long

2
src/network/receive.ts

@ -126,7 +126,7 @@ async function onReceive(payload){
const ogMsg = await models.Message.findOne({where:{
uuid: payload.message.replyUuid,
}})
if(ogMsg) {
if(ogMsg && ogMsg.sender && ogMsg.sender!==1) {
const amtToForward = payload.message.amount - (chat.pricePerMessage||0) - (chat.escrowAmount||0)
if(amtToForward>0) {
forwardSatsToContact(chat,ogMsg.sender,amtToForward,payload.message.replyUuid)

Loading…
Cancel
Save