From 86874e3a0869f21a40f690b64fa55a42fb140a29 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Wed, 24 Jul 2024 10:53:32 -0300 Subject: [PATCH] feat: create createZapSplitsIfNotExists() function --- src/utils/zap-split.ts | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/utils/zap-split.ts b/src/utils/zap-split.ts index 33cd9c4e..54fe04a5 100644 --- a/src/utils/zap-split.ts +++ b/src/utils/zap-split.ts @@ -1,5 +1,9 @@ +import { Conf } from '@/config.ts'; import { NSchema as n, NStore } from '@nostrify/nostrify'; -import { isNumberFrom1To100 } from '@/utils.ts'; +import { isNumberFrom1To100, nostrNow } from '@/utils.ts'; +import { Storages } from '@/storages.ts'; +import { AdminSigner } from '@/signers/AdminSigner.ts'; +import { handleEvent } from '@/pipeline.ts'; type Pubkey = string; type ExtraMessage = string; @@ -33,3 +37,25 @@ export async function getZapSplits(store: NStore, pubkey: string): Promise