File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -120,22 +120,23 @@ func fundChannel(c *cli.Context) error {
120120 }
121121
122122 assetFound := false
123+ totalAmount := uint64 (0 )
123124 for _ , rpcAsset := range assets .Assets {
124125 if ! bytes .Equal (rpcAsset .AssetGenesis .AssetId , assetIDBytes ) {
125126 continue
126127 }
127128
128- if rpcAsset .Amount < requestedAmount {
129- continue
129+ totalAmount += rpcAsset .Amount
130+ if totalAmount >= requestedAmount {
131+ assetFound = true
132+ break
130133 }
131-
132- assetFound = true
133134 }
134135
135136 if ! assetFound {
136- return fmt .Errorf ("asset with ID %x not found or no UTXO with " +
137- "at least amount %d is available" , assetIDBytes ,
138- requestedAmount )
137+ return fmt .Errorf ("asset with ID %x not found or no combined " +
138+ "UTXOs with at least amount %d is available" ,
139+ assetIDBytes , requestedAmount )
139140 }
140141
141142 resp , err := tchrpcClient .FundChannel (
Original file line number Diff line number Diff line change 1919### Taproot Assets
2020
2121* A few bugs related to TAP channel liquidity were fixed, sending very small or
22- very big asset amounts is now possible. See [ tapd PR] ( https://github.com/lightninglabs/taproot-assets/pull/1120 ) .
23- * ` ListBalances ` now supports the ` include_leased ` flag, which will include leased
24- asset balances in the response.
22+ very big asset amounts is now possible.
23+ See [ tapd PR] ( https://github.com/lightninglabs/taproot-assets/pull/1120 ) .
24+ * ` ListBalances ` now supports the ` include_leased ` flag, which will include
25+ leased asset balances in the response.
26+ * [ The sanity checks for ` fundchannel ` now allow for composite
27+ UTXOs.] ( https://github.com/lightninglabs/lightning-terminal/pull/865 )
2528
2629# Autopilot
2730
You can’t perform that action at this time.
0 commit comments