| 569 | } |
| 570 | |
| 571 | bool amount_asset_is_main(struct amount_asset *amount) |
| 572 | { |
| 573 | /* If we're not on elements, there is only one asset. */ |
| 574 | if (!chainparams->is_elements) |
| 575 | return true; |
| 576 | |
| 577 | /* If we are on elements we better check against the chainparams. */ |
| 578 | return memeq(amount->asset, sizeof(amount->asset), |
| 579 | chainparams->fee_asset_tag, sizeof(amount->asset)); |
| 580 | } |
| 581 | |
| 582 | /* Convert from a generic asset to the fee-paying asset if possible. */ |
| 583 | struct amount_sat amount_asset_to_sat(struct amount_asset *amount) |
no test coverage detected