@@ -224,7 +224,7 @@ export class DefaultRedeemAPI implements RedeemAPI {
224224 private oracleAPI : OracleAPI ,
225225 private transactionAPI : TransactionAPI ,
226226 private systemAPI : SystemAPI
227- ) { }
227+ ) { }
228228
229229 async request (
230230 amount : MonetaryAmount < WrappedCurrency > ,
@@ -280,13 +280,8 @@ export class DefaultRedeemAPI implements RedeemAPI {
280280 btcTxId : string
281281 ) : Promise < SubmittableExtrinsic < "promise" , ISubmittableResult > > {
282282 const parsedRequestId = ensureHashEncoded ( this . api , redeemId ) ;
283- const txInclusionDetails = await getTxProof ( this . electrsAPI , btcTxId ) ;
284- return this . api . tx . redeem . executeRedeem (
285- parsedRequestId ,
286- txInclusionDetails . merkleProof ,
287- txInclusionDetails . transaction ,
288- txInclusionDetails . lengthBound ,
289- ) ;
283+ const fullTxProof = await getTxProof ( this . electrsAPI , btcTxId ) ;
284+ return this . api . tx . redeem . executeRedeem ( parsedRequestId , fullTxProof ) ;
290285 }
291286
292287 async execute ( requestId : string , btcTxId : string ) : Promise < ExtrinsicData > {
@@ -333,9 +328,10 @@ export class DefaultRedeemAPI implements RedeemAPI {
333328 }
334329
335330 async getMaxBurnableTokens ( collateralCurrency : CollateralCurrencyExt ) : Promise < MonetaryAmount < WrappedCurrency > > {
336- const liquidationVault : SystemVaultExt | null = await this . vaultsAPI . getLiquidationVault ( collateralCurrency )
337- // method rejects if no vault was found, wrap as null
338- . catch ( ( reason ) => ( reason === NO_LIQUIDATION_VAULT_FOUND_REJECTION ) ? null : Promise . reject ( reason ) ) ;
331+ const liquidationVault : SystemVaultExt | null = await this . vaultsAPI
332+ . getLiquidationVault ( collateralCurrency )
333+ // method rejects if no vault was found, wrap as null
334+ . catch ( ( reason ) => ( reason === NO_LIQUIDATION_VAULT_FOUND_REJECTION ? null : Promise . reject ( reason ) ) ) ;
339335
340336 if ( liquidationVault === null ) {
341337 // no liquidation vault exists, therefore, no burnable tokens)
0 commit comments