mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-07 06:50:09 +00:00
fix some tests
This commit is contained in:
parent
10f88e3b5d
commit
e9c25dbe65
@ -736,9 +736,10 @@ class Logics:
|
||||
valid = cls.create_onchain_payment(
|
||||
order, user, preliminary_amount=context["invoice_amount"]
|
||||
)
|
||||
order.log(
|
||||
f"Suggested mining fee is {order.payout_tx.suggested_mining_fee_rate} Sats/vbyte, the swap fee rate is {order.payout_tx.swap_fee_rate}%"
|
||||
)
|
||||
if order.payout_tx is not None:
|
||||
order.log(
|
||||
f"Suggested mining fee is {order.payout_tx.suggested_mining_fee_rate} Sats/vbyte, the swap fee rate is {order.payout_tx.swap_fee_rate}%"
|
||||
)
|
||||
if not valid:
|
||||
context["swap_allowed"] = False
|
||||
context[
|
||||
|
@ -1012,8 +1012,8 @@ class TradeTest(BaseAPITestCase):
|
||||
invoice = add_invoice("robot", response.json()["earned_rewards"])
|
||||
signed_payout_invoice = sign_message(
|
||||
invoice,
|
||||
passphrase_path=f"tests/robots/{trade.taker_index}/token",
|
||||
private_key_path=f"tests/robots/{trade.taker_index}/enc_priv_key",
|
||||
passphrase_path=f"tests/robots/{trade.maker_index}/token",
|
||||
private_key_path=f"tests/robots/{trade.maker_index}/enc_priv_key",
|
||||
)
|
||||
body = {
|
||||
"invoice": signed_payout_invoice,
|
||||
|
@ -10,11 +10,11 @@ def sign_message(message, private_key_path, passphrase_path):
|
||||
with open(passphrase_path, "r") as f:
|
||||
passphrase = f.read()
|
||||
|
||||
gpg.import_keys(private_key, passphrase=passphrase)
|
||||
import_result = gpg.import_keys(private_key, passphrase=passphrase)
|
||||
|
||||
# keyid=import_result.fingerprints[0]
|
||||
signed_message = gpg.sign(
|
||||
message, passphrase=passphrase, extra_args=["--digest-algo", "SHA512"]
|
||||
message, keyid=import_result.fingerprints[0], passphrase=passphrase,
|
||||
extra_args=["--digest-algo", "SHA512"]
|
||||
)
|
||||
|
||||
# [print(name, getattr(signed_message, name)) for name in dir(signed_message) if not callable(getattr(signed_message, name))]
|
||||
|
Loading…
Reference in New Issue
Block a user