fix(boltz): sanitize invoice description (#2731)
Boltz rejects nbsp char (produced by JS Intl.NumberFormat api), so simply replace it with normal space
This commit is contained in:
parent
76b01695a0
commit
512c85592f
1 changed files with 3 additions and 1 deletions
|
|
@ -95,8 +95,10 @@ class BoltzWallet(Wallet):
|
||||||
wallet_id=self.wallet_id,
|
wallet_id=self.wallet_id,
|
||||||
accept_zero_conf=True,
|
accept_zero_conf=True,
|
||||||
external_pay=True,
|
external_pay=True,
|
||||||
description=memo,
|
|
||||||
)
|
)
|
||||||
|
if memo is not None:
|
||||||
|
# boltz rejects nbsp char (produced by JS Intl.NumberFormat api)
|
||||||
|
request.description = memo.replace("\xa0", " ")
|
||||||
response: boltzrpc_pb2.CreateReverseSwapResponse
|
response: boltzrpc_pb2.CreateReverseSwapResponse
|
||||||
try:
|
try:
|
||||||
response = await self.rpc.CreateReverseSwap(request, metadata=self.metadata)
|
response = await self.rpc.CreateReverseSwap(request, metadata=self.metadata)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue