Commit graph

8 commits

Author SHA1 Message Date
Slyghtning
9e97992e18
assets: validate accepted RFQ asset rates
Validate the bid rate before returning an accepted asset sell quote.
This prevents malformed rates from reaching downstream quote arithmetic,
where nil or non-positive values can panic. Cover valid and malformed
responses with table-driven tests.
2026-08-03 10:05:05 +02:00
Slyghtning
cfbade1239
assets: reject malformed RFQ asset rates
Validate the rate pointer and decimal coefficient before converting
asset units. Return errors for nil, malformed, non-positive, and
oversized-scale rates instead of allowing nil dereferences or
division-by-zero panics. Add regression tests for each case.
2026-08-03 10:05:05 +02:00
Slyghtning
dc39d63d8d
assets: avoid locking cache during RPC
Restrict the asset-name cache mutex to map access so a slow
QueryAssetStats call cannot block cached readers. Use an RWMutex for
independent cache reads and add a concurrent regression test.
2026-08-03 10:05:05 +02:00
Slyghtning
c7d5e466cd
assets: validate RFQ timeout conversion
Convert the configured duration once during client creation. Round
positive fractional durations up to the whole seconds accepted by tapd.
Reject zero, negative, and overflowing values, and cover the conversion
boundaries with unit tests.
2026-08-03 10:05:05 +02:00
Boris Nagaev
378825414b
assets: make tapd macaroon path network-aware
Build the default tapd admin macaroon path from the configured Bitcoin
network while preserving explicit path overrides. Add regression tests for
tapd credential loading and network-specific path selection.
2026-07-18 00:43:17 -05:00
Boris Nagaev
338a6ef9f1
build: fix dependency security alerts 2026-07-16 13:08:01 -05:00
sputn1ck
9f7249f14f
asset: add function to get asset price 2025-03-25 15:27:52 +01:00
sputn1ck
9d49804429
assetclient: fix wrong fee limit 2025-01-22 15:40:57 +01:00