Track fiat amount in TPoS invoices. (#1384)
This commit is contained in:
parent
d30a6dc5c1
commit
9693e5932b
2 changed files with 3 additions and 2 deletions
|
|
@ -500,6 +500,7 @@
|
|||
.post('/tpos/api/v1/tposs/' + this.tposId + '/invoices', null, {
|
||||
params: {
|
||||
amount: this.sat,
|
||||
memo: this.amountFormatted,
|
||||
tipAmount: this.tipAmountSat
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ async def api_tpos_delete(
|
|||
|
||||
@tpos_ext.post("/api/v1/tposs/{tpos_id}/invoices", status_code=HTTPStatus.CREATED)
|
||||
async def api_tpos_create_invoice(
|
||||
tpos_id: str, amount: int = Query(..., ge=1), tipAmount: int = 0
|
||||
tpos_id: str, amount: int = Query(..., ge=1), memo: str = "", tipAmount: int = 0
|
||||
) -> dict:
|
||||
|
||||
tpos = await get_tpos(tpos_id)
|
||||
|
|
@ -75,7 +75,7 @@ async def api_tpos_create_invoice(
|
|||
payment_hash, payment_request = await create_invoice(
|
||||
wallet_id=tpos.wallet,
|
||||
amount=amount,
|
||||
memo=f"{tpos.name}",
|
||||
memo=f"{memo} to {tpos.name}" if memo else f"{tpos.name}",
|
||||
extra={
|
||||
"tag": "tpos",
|
||||
"tipAmount": tipAmount,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue