File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
src/modules/subscriptions Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -77,15 +77,15 @@ export class SubscriptionsController {
7777 object . amount ,
7878 object . target_currency ,
7979 ) ;
80+ } else {
81+ await this . subscriptionService . handleRelayCheckout (
82+ object . id ,
83+ metadata . pubkey ,
84+ metadata . planId ,
85+ object . amount ,
86+ object . target_currency ,
87+ ) ;
8088 }
81-
82- await this . subscriptionService . handleRelayCheckout (
83- object . id ,
84- metadata . pubkey ,
85- metadata . planId ,
86- object . amount ,
87- object . target_currency ,
88- ) ;
8989 }
9090
9191 return { success : true } ;
Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ export class SubscriptionsService {
5050 hexToBytes ( this . apiConfig . getNostrConfig . privateKey ) ,
5151 this . apiConfig . getNostrConfig . relays ,
5252 ) ;
53+
54+ this . seedRedis ( ) ;
5355 }
5456
5557 private async getSubscriptionPlan ( planId : string ) {
@@ -146,6 +148,8 @@ export class SubscriptionsService {
146148 await this . subscriptionRepository . save ( subscription ) ;
147149 await this . createInvoiceRecord ( checkoutSessionId , totalAmount , unit ) ;
148150 await this . notifyUser ( SubscriptionTemplate . welcomeRelay ( ) . content , pubkey ) ;
151+
152+ return true ;
149153 }
150154
151155 async handleNip05Checkout (
@@ -166,6 +170,8 @@ export class SubscriptionsService {
166170
167171 await this . createInvoiceRecord ( checkoutSessionId , totalAmount , unit ) ;
168172 await this . notifyUser ( SubscriptionTemplate . welcomeNip05 ( res . fullIdentifier ) . content , pubkey ) ;
173+
174+ return true ;
169175 }
170176
171177 async seedRedis ( ) {
You can’t perform that action at this time.
0 commit comments