mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-09 07:41:35 +00:00
fix some tests
This commit is contained in:
parent
10f88e3b5d
commit
e9c25dbe65
@ -736,6 +736,7 @@ class Logics:
|
|||||||
valid = cls.create_onchain_payment(
|
valid = cls.create_onchain_payment(
|
||||||
order, user, preliminary_amount=context["invoice_amount"]
|
order, user, preliminary_amount=context["invoice_amount"]
|
||||||
)
|
)
|
||||||
|
if order.payout_tx is not None:
|
||||||
order.log(
|
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}%"
|
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}%"
|
||||||
)
|
)
|
||||||
|
@ -1012,8 +1012,8 @@ class TradeTest(BaseAPITestCase):
|
|||||||
invoice = add_invoice("robot", response.json()["earned_rewards"])
|
invoice = add_invoice("robot", response.json()["earned_rewards"])
|
||||||
signed_payout_invoice = sign_message(
|
signed_payout_invoice = sign_message(
|
||||||
invoice,
|
invoice,
|
||||||
passphrase_path=f"tests/robots/{trade.taker_index}/token",
|
passphrase_path=f"tests/robots/{trade.maker_index}/token",
|
||||||
private_key_path=f"tests/robots/{trade.taker_index}/enc_priv_key",
|
private_key_path=f"tests/robots/{trade.maker_index}/enc_priv_key",
|
||||||
)
|
)
|
||||||
body = {
|
body = {
|
||||||
"invoice": signed_payout_invoice,
|
"invoice": signed_payout_invoice,
|
||||||
|
@ -10,11 +10,11 @@ def sign_message(message, private_key_path, passphrase_path):
|
|||||||
with open(passphrase_path, "r") as f:
|
with open(passphrase_path, "r") as f:
|
||||||
passphrase = f.read()
|
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(
|
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))]
|
# [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