refactor(zap split): rename amount to weight

This commit is contained in:
P. Reis
2024-08-05 14:33:47 -03:00
parent 25bbeceb8d
commit 0a3ed4e160
3 changed files with 7 additions and 7 deletions

View File

@@ -183,8 +183,8 @@ const createStatusController: AppController = async (c) => {
if (lnurl && zap_split) {
let totalSplit = 0;
for (const pubkey in zap_split) {
totalSplit += zap_split[pubkey].amount;
tags.push(['zap', pubkey, Conf.relay, zap_split[pubkey].amount.toString()]);
totalSplit += zap_split[pubkey].weight;
tags.push(['zap', pubkey, Conf.relay, zap_split[pubkey].weight.toString()]);
}
if (totalSplit) {
tags.push(['zap', author?.pubkey as string, Conf.relay, Math.max(0, 100 - totalSplit).toString()]);