mirror of
https://github.com/basicswap/basicswap.git
synced 2026-06-10 13:01:41 +02:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3af05ea5c0 | |||
| 136b311dc6 | |||
| df672d4056 | |||
| f536f8962e | |||
| ce5ffe92b4 | |||
| 32bdd11853 | |||
| 5e7dbbb22f |
@@ -28,7 +28,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.12"]
|
||||
python-version: ["3.14"]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
name = "basicswap"
|
||||
|
||||
__version__ = "0.16.3"
|
||||
__version__ = "0.16.4"
|
||||
|
||||
+34
-20
@@ -8421,12 +8421,10 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
||||
# Verify amount
|
||||
vout = getVoutByAddress(initiate_txn, p2sh)
|
||||
|
||||
out_value = make_int(initiate_txn["vout"][vout]["value"])
|
||||
out_value: int = make_int(initiate_txn["vout"][vout]["value"])
|
||||
ensure(
|
||||
out_value == int(bid.amount),
|
||||
"Incorrect output amount in initiate txn {}: {} != {}.".format(
|
||||
initiate_txnid_hex, out_value, int(bid.amount)
|
||||
),
|
||||
f"Incorrect output amount in initiate txn {self.logIDT(initiate_txnid_hex)}: {out_value} != {bid.amount}",
|
||||
)
|
||||
|
||||
bid.initiate_tx.conf = initiate_txn["confirmations"]
|
||||
@@ -8454,20 +8452,20 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
||||
)
|
||||
index = None
|
||||
if found:
|
||||
if (
|
||||
"value" in found
|
||||
and found["value"] is not None
|
||||
and found["value"] != int(bid.amount)
|
||||
):
|
||||
if "index" not in found:
|
||||
self.setBidError(
|
||||
bid,
|
||||
"Incorrect output amount in initiate txn {}: {} != {}.".format(
|
||||
initiate_txnid_hex, found["value"], int(bid.amount)
|
||||
),
|
||||
f"Swap output index not found for initiate txn {self.logIDT(initiate_txnid_hex)}",
|
||||
)
|
||||
return True
|
||||
txo_value: int = found.get("value", None)
|
||||
if txo_value != bid.amount:
|
||||
self.setBidError(
|
||||
bid,
|
||||
f"Incorrect output amount in initiate txn {self.logIDT(initiate_txnid_hex)}: {txo_value} != {bid.amount}",
|
||||
)
|
||||
return True
|
||||
bid.initiate_tx.conf = found["depth"]
|
||||
if "index" in found:
|
||||
index = found["index"]
|
||||
tx_height = found["height"]
|
||||
|
||||
@@ -8554,6 +8552,21 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
||||
vout=participate_txvout,
|
||||
)
|
||||
if found:
|
||||
participate_txid_hex: str = found.get(
|
||||
"txid",
|
||||
None if participate_txid is None else participate_txid.hex(),
|
||||
)
|
||||
# Double check value
|
||||
txo_value: int = found.get("value", None)
|
||||
if (
|
||||
txo_value != bid.amount_to
|
||||
and bid.debug_ind != DebugTypes.MAKE_INVALID_PTX
|
||||
):
|
||||
self.setBidError(
|
||||
bid,
|
||||
f"Incorrect output amount in participate txn {self.logIDT(participate_txid_hex)}: {txo_value} != {bid.amount_to}",
|
||||
)
|
||||
return True
|
||||
index = found.get("index", participate_txvout)
|
||||
if bid.participate_tx.conf != found["depth"]:
|
||||
save_bid = True
|
||||
@@ -8561,15 +8574,16 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
||||
bid.participate_tx.conf is None
|
||||
and bid.participate_tx.state != TxStates.TX_SENT
|
||||
):
|
||||
txid = found.get(
|
||||
"txid",
|
||||
None if participate_txid is None else participate_txid.hex(),
|
||||
)
|
||||
self.log.debug(
|
||||
f"Found bid {self.log.id(bid_id)} participate txn {self.log.id(txid)} in chain {ci_to.coin_name()}."
|
||||
f"Found bid {self.log.id(bid_id)} participate txn {self.logIDT(participate_txid_hex)} in chain {ci_to.coin_name()}."
|
||||
)
|
||||
self.addParticipateTxn(
|
||||
bid_id, bid, coin_to, txid, index, found["height"]
|
||||
bid_id,
|
||||
bid,
|
||||
coin_to,
|
||||
participate_txid_hex,
|
||||
index,
|
||||
found["height"],
|
||||
)
|
||||
|
||||
# Only update tx state if tx hasn't already been seen
|
||||
@@ -8587,7 +8601,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
||||
|
||||
if bid.participate_tx.conf is not None:
|
||||
self.log.debug(
|
||||
f"participate txid {self.log.id(bid.participate_tx.txid)} confirms {bid.participate_tx.conf}."
|
||||
f"Participate txid {self.logIDT(bid.participate_tx.txid)} confirms {bid.participate_tx.conf}."
|
||||
)
|
||||
if (
|
||||
bid.participate_tx.conf
|
||||
|
||||
@@ -135,15 +135,15 @@
|
||||
(define-public basicswap
|
||||
(package
|
||||
(name "basicswap")
|
||||
(version "0.16.2")
|
||||
(version "0.16.4")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/basicswap/basicswap")
|
||||
(commit "ced017ab3a3234c68d3d8f773cf9ceb187a39adb")))
|
||||
(commit "136b311dc68f11b9c12ebd6877c5f718d705603a")))
|
||||
(sha256
|
||||
(base32
|
||||
"0manck3zlf05by08b825ynqk7q1byzgy7p3i8chpg413mqkx7q5r"))
|
||||
"0ikr8ik9rklvafd1j8zj0y38vric02qhmj7pvp3kvzbmd2fxx95p"))
|
||||
(file-name (git-file-name name version))))
|
||||
(build-system pyproject-build-system)
|
||||
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ description = "Simple atomic swap system"
|
||||
keywords = ["crypto", "cryptocurrency", "particl", "bitcoin", "monero", "wownero"]
|
||||
readme = "README.md"
|
||||
license = {file = "LICENSE"}
|
||||
requires-python = ">=3.9"
|
||||
requires-python = ">=3.11"
|
||||
classifiers = [
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
@@ -36,7 +36,7 @@ dev = [
|
||||
"pre-commit",
|
||||
"pytest",
|
||||
"ruff",
|
||||
"black==25.11.0",
|
||||
"black==26.3.1",
|
||||
"selenium",
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user