send_filters refactor

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-05-14 15:35:34 -07:00
parent 040ffdf9f5
commit 8da251dc88
11 changed files with 129 additions and 36 deletions

View File

@@ -0,0 +1,25 @@
//
// TipCounter.swift
// damus
//
// Created by William Casarin on 2022-05-11.
//
import Foundation
class TipCounter {
var tips: [String: Int64] = [:]
var user_tips: [String: Set<String>] = [:]
var our_tips: [String: NostrEvent] = [:]
var our_pubkey: String
enum CountResult {
case already_tipped
case success(Int64)
}
init (our_pubkey: String) {
self.our_pubkey = our_pubkey
}
}