@@ -213,14 +213,14 @@ export class ClementineBridgeAdapter extends LiquidityActionAdapter {
213213 private async withdraw ( order : LiquidityManagementOrder ) : Promise < CorrelationId > {
214214 const {
215215 pipeline : {
216- rule : { targetAsset : bitcoinAsset } ,
216+ rule : { targetAsset : citreaAsset } ,
217217 } ,
218218 } = order ;
219219
220- // Validate asset is BTC on Bitcoin
221- if ( bitcoinAsset . type !== AssetType . COIN || bitcoinAsset . blockchain !== this . btcBlockchain ) {
220+ // Validate asset is cBTC on Citrea (we withdraw FROM cBTC TO BTC)
221+ if ( citreaAsset . type !== AssetType . COIN || citreaAsset . blockchain !== this . citreaBlockchain ) {
222222 throw new OrderNotProcessableException (
223- `Clementine withdraw only supports BTC (native coin) on ${ this . btcBlockchain } ` ,
223+ `Clementine withdraw only supports cBTC (native coin) on ${ this . citreaBlockchain } ` ,
224224 ) ;
225225 }
226226
@@ -230,8 +230,8 @@ export class ClementineBridgeAdapter extends LiquidityActionAdapter {
230230 // Validate network consistency on first use
231231 await this . validateNetworkConsistency ( ) ;
232232
233- // Get the corresponding Citrea cBTC asset
234- const citreaAsset = await this . getCitreaAsset ( ) ;
233+ // Get the corresponding Bitcoin BTC asset
234+ const bitcoinAsset = await this . getBtcAsset ( ) ;
235235
236236 // Check cBTC balance on Citrea - must have at least 10 cBTC (fixed bridge amount)
237237 const cbtcBalance = await this . citreaClient . getNativeCoinBalance ( ) ;
@@ -739,10 +739,6 @@ export class ClementineBridgeAdapter extends LiquidityActionAdapter {
739739 return this . network === ClementineNetwork . TESTNET4 ;
740740 }
741741
742- private get btcBlockchain ( ) : Blockchain {
743- return this . isTestnet ? Blockchain . BITCOIN_TESTNET4 : Blockchain . BITCOIN ;
744- }
745-
746742 private get citreaBlockchain ( ) : Blockchain {
747743 return this . isTestnet ? Blockchain . CITREA_TESTNET : Blockchain . CITREA ;
748744 }
@@ -751,10 +747,6 @@ export class ClementineBridgeAdapter extends LiquidityActionAdapter {
751747 return this . isTestnet ? this . assetService . getBitcoinTestnet4Coin ( ) : this . assetService . getBtcCoin ( ) ;
752748 }
753749
754- private getCitreaAsset ( ) : Promise < Asset > {
755- return this . isTestnet ? this . assetService . getCitreaTestnetCoin ( ) : this . assetService . getCitreaCoin ( ) ;
756- }
757-
758750 private getFeeRate ( ) : Promise < number > {
759751 return this . isTestnet
760752 ? this . bitcoinTestnet4FeeService . getRecommendedFeeRate ( )
0 commit comments