Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions cmd/litcli/ln.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,23 @@ func fundChannel(c *cli.Context) error {
}

assetFound := false
totalAmount := uint64(0)
for _, rpcAsset := range assets.Assets {
if !bytes.Equal(rpcAsset.AssetGenesis.AssetId, assetIDBytes) {
continue
}

if rpcAsset.Amount < requestedAmount {
continue
totalAmount += rpcAsset.Amount
if totalAmount >= requestedAmount {
assetFound = true
break
}

assetFound = true
}

if !assetFound {
return fmt.Errorf("asset with ID %x not found or no UTXO with "+
"at least amount %d is available", assetIDBytes,
requestedAmount)
return fmt.Errorf("asset with ID %x not found or no combined "+
"UTXOs with at least amount %d is available",
assetIDBytes, requestedAmount)
}

resp, err := tchrpcClient.FundChannel(
Expand Down
9 changes: 6 additions & 3 deletions docs/release-notes/release-notes-0.13.995.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@
### Taproot Assets

* A few bugs related to TAP channel liquidity were fixed, sending very small or
very big asset amounts is now possible. See [tapd PR](https://github.com/lightninglabs/taproot-assets/pull/1120).
* `ListBalances` now supports the `include_leased` flag, which will include leased
asset balances in the response.
very big asset amounts is now possible.
See [tapd PR](https://github.com/lightninglabs/taproot-assets/pull/1120).
* `ListBalances` now supports the `include_leased` flag, which will include
leased asset balances in the response.
* [The sanity checks for `fundchannel` now allow for composite
UTXOs.](https://github.com/lightninglabs/lightning-terminal/pull/865)

# Autopilot

Expand Down
Loading