string -> number
This commit is contained in:
parent
fa238b3234
commit
5532fbdb0f
3 changed files with 8 additions and 8 deletions
|
|
@ -1044,7 +1044,7 @@ const sendSpontaneousPayment = async (to, amount, memo, feeLimit) => {
|
||||||
logger.info('Will now send payment through lightning')
|
logger.info('Will now send payment through lightning')
|
||||||
|
|
||||||
const payment = await sendPaymentV2Invoice({
|
const payment = await sendPaymentV2Invoice({
|
||||||
feeLimit: feeLimit.toString(),
|
feeLimit,
|
||||||
payment_request: orderResponse.response
|
payment_request: orderResponse.response
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,9 @@ export interface PaymentV2 {
|
||||||
|
|
||||||
status: 'UNKNOWN' | 'IN_FLIGHT' | 'SUCCEEDED' | 'FAILED'
|
status: 'UNKNOWN' | 'IN_FLIGHT' | 'SUCCEEDED' | 'FAILED'
|
||||||
|
|
||||||
fee_sat: string
|
fee_sat: number
|
||||||
|
|
||||||
fee_msat: string
|
fee_msat: number
|
||||||
|
|
||||||
creation_time_ns: string
|
creation_time_ns: string
|
||||||
|
|
||||||
|
|
@ -85,7 +85,7 @@ interface _SendPaymentV2Request {
|
||||||
|
|
||||||
payment_request: string
|
payment_request: string
|
||||||
|
|
||||||
fee_limit_sat: string
|
fee_limit_sat: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SendPaymentV2Request = Partial<_SendPaymentV2Request>
|
export type SendPaymentV2Request = Partial<_SendPaymentV2Request>
|
||||||
|
|
@ -93,7 +93,7 @@ export type SendPaymentV2Request = Partial<_SendPaymentV2Request>
|
||||||
export interface SendPaymentKeysendParams {
|
export interface SendPaymentKeysendParams {
|
||||||
amt: string
|
amt: string
|
||||||
dest: string
|
dest: string
|
||||||
feeLimit: string
|
feeLimit: number
|
||||||
finalCltvDelta?: number
|
finalCltvDelta?: number
|
||||||
maxParts?: number
|
maxParts?: number
|
||||||
timeoutSeconds?: number
|
timeoutSeconds?: number
|
||||||
|
|
@ -101,7 +101,7 @@ export interface SendPaymentKeysendParams {
|
||||||
|
|
||||||
export interface SendPaymentInvoiceParams {
|
export interface SendPaymentInvoiceParams {
|
||||||
amt?: string
|
amt?: string
|
||||||
feeLimit: string
|
feeLimit: number
|
||||||
max_parts?: number
|
max_parts?: number
|
||||||
payment_request: string
|
payment_request: string
|
||||||
timeoutSeconds?: number
|
timeoutSeconds?: number
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ const isValidSendPaymentKeysendParams = sendPaymentKeysendParams => {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof feeLimit !== 'string') {
|
if (typeof feeLimit !== 'number') {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -189,7 +189,7 @@ const isValidSendPaymentInvoiceParams = sendPaymentInvoiceParams => {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof feeLimit !== 'string') {
|
if (typeof feeLimit !== 'number') {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue