Skip to content

Commit

Permalink
fix: mpay error could not find a route error
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Apr 11, 2024
1 parent ae3fac3 commit 0bf3f06
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
3 changes: 1 addition & 2 deletions docker/build.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""Script for building and pushing the Boltz Docker images."""

import json
import sys
from argparse import ArgumentParser
Expand All @@ -10,7 +11,6 @@

@dataclass
class BuildArgument:

"""Argument of the "docker build" command."""

name: str
Expand All @@ -19,7 +19,6 @@ class BuildArgument:

@dataclass
class Image:

"""The tags and build arguments of a Docker image."""

tag: str
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -39,7 +39,7 @@
"prepublishOnly": "npm run compile && rm -f dist/package.json",
"python:install": "cd tools && poetry install",
"python:proto": "cd tools && poetry run python -m grpc_tools.protoc -I plugins/hold/protos --python_out=plugins/hold/protos --pyi_out=plugins/hold/protos --grpc_python_out=plugins/hold/protos plugins/hold/protos/hold.proto && poetry run python -m grpc_tools.protoc -I plugins/mpay/protos --python_out=plugins/mpay/protos --pyi_out=plugins/mpay/protos --grpc_python_out=plugins/mpay/protos plugins/mpay/protos/mpay.proto",
"python:lint": "cd tools && poetry run ruff . ../docker",
"python:lint": "cd tools && poetry run ruff check . ../docker",
"python:format": "cd tools && poetry run ruff format . ../docker",
"python:test": "cd tools && poetry run pytest"
},
Expand Down
1 change: 1 addition & 0 deletions tools/miner_fee.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""Calculate the miner fee of a transaction."""

from argparse import ArgumentParser
from dataclasses import dataclass
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions tools/otp.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""Generates OTP tokens."""

from argparse import ArgumentParser

import pyotp
Expand Down
5 changes: 4 additions & 1 deletion tools/plugins/mpay/pay/channels.py
Expand Up @@ -85,7 +85,10 @@ def get_route(
riskfactor=0,
)
except RpcError as e:
if "message" in e.error and e.error["message"].startswith("Shortest route was"):
if "message" in e.error and (
e.error["message"].startswith("Shortest route was")
or e.error["message"] == "Could not find a route"
):
raise NoRouteError from None

raise
Expand Down
4 changes: 2 additions & 2 deletions tools/pyproject.toml
Expand Up @@ -36,8 +36,8 @@ line-length = 100
select = ["ALL"]
ignore = [
"T201", "D101", "D211", "D213", "INP001", "BLE001", "FBT001", "FBT002", "FBT003", "S605",
"TD002", "TD003", "ANN101", "D102", "D103", "D107", "D100", "SLOT000", "S101", "FIX002",
"PLR2004", "ARG001", "PLR0913", "D104", "FA102", "COM812", "UP032", "ISC001", "A003"
"TD002", "TD003", "ANN101", "D102", "D103", "D107", "D100", "SLOT000", "S101", "FIX002", "S311",
"PLR2004", "ARG001", "PLR0913", "D104", "FA102", "COM812", "UP032", "ISC001", "A003", "D203"
]

[tool.ruff.format]
Expand Down
1 change: 1 addition & 0 deletions tools/sse.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""Listen to Server-Send events via the CLI."""

from argparse import ArgumentParser

from sseclient import SSEClient
Expand Down

0 comments on commit 0bf3f06

Please sign in to comment.