This commit is contained in:
boufni95 2023-11-19 16:27:01 +01:00
parent 8f8261f797
commit 111f869bb5
9 changed files with 2326 additions and 2383 deletions

View file

@ -500,7 +500,7 @@ export type MethodsOverride = {
AddAppInvoice_Override?: (httpRes:Response, handlerRes:Types.NewInvoiceResponse) => Promise<void>
AddAppUserInvoice_Override?: (httpRes:Response, handlerRes:Types.NewInvoiceResponse) => Promise<void>
GetAppUser_Override?: (httpRes:Response, handlerRes:Types.AppUser) => Promise<void>
PayAppUserInvoice_Override?: (httpRes:Response, handlerRes:Types.PayAppUserInvoiceResponse) => Promise<void>
PayAppUserInvoice_Override?: (httpRes:Response, handlerRes:Types.PayInvoiceResponse) => Promise<void>
SendAppUserToAppUserPayment_Override?: (httpRes:Response) => Promise<void>
SendAppUserToAppPayment_Override?: (httpRes:Response) => Promise<void>
GetAppUserLNURLInfo_Override?: (httpRes:Response, handlerRes:Types.LnurlPayInfoResponse) => Promise<void>

View file

@ -221,7 +221,7 @@ export default (params: ClientParams) => ({
}
return { status: 'ERROR', reason: 'invalid response' }
},
PayAppUserInvoice: async (request: Types.PayAppUserInvoiceRequest): Promise<ResultError | ({ status: 'OK' }& Types.PayAppUserInvoiceResponse)> => {
PayAppUserInvoice: async (request: Types.PayAppUserInvoiceRequest): Promise<ResultError | ({ status: 'OK' }& Types.PayInvoiceResponse)> => {
const auth = await params.retrieveAppAuth()
if (auth === null) throw new Error('retrieveAppAuth() returned null')
let finalRoute = '/api/app/invoice/pay'
@ -230,7 +230,7 @@ export default (params: ClientParams) => ({
if (data.status === 'OK') {
const result = data
if(!params.checkResult) return { status: 'OK', ...result }
const error = Types.PayAppUserInvoiceResponseValidate(result)
const error = Types.PayInvoiceResponseValidate(result)
if (error === null) { return { status: 'OK', ...result } } else return { status: 'ERROR', reason: error.message }
}
return { status: 'ERROR', reason: 'invalid response' }

File diff suppressed because it is too large Load diff