Skip to content

Commit

Permalink
feat: add bitcoinAmount arguemnt to funding transaction handling func…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
Polybius93 committed Jun 20, 2024
1 parent 0b4d913 commit be7ce26
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/dlc-handlers/ledger-dlc-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ export class LedgerDLCHandler {

async createFundingPSBT(
vault: RawVault,
bitcoinAmount: bigint,
attestorGroupPublicKey: string,
feeRateMultiplier?: number,
customFeeRate?: bigint
Expand Down Expand Up @@ -294,7 +295,7 @@ export class LedgerDLCHandler {
}

const fundingTransaction = await createFundingTransaction(
vault.valueLocked.toBigInt(),
bitcoinAmount,
this.bitcoinNetwork,
taprootMultisigPayment.address,
nativeSegwitPayment,
Expand Down
3 changes: 2 additions & 1 deletion src/dlc-handlers/private-key-dlc-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export class PrivateKeyDLCHandler {

async createFundingPSBT(
vault: RawVault,
bitcoinAmount: bigint,
attestorGroupPublicKey: string,
feeRateMultiplier?: number,
customFeeRate?: bigint
Expand All @@ -194,7 +195,7 @@ export class PrivateKeyDLCHandler {
BigInt(await getFeeRate(this.bitcoinBlockchainFeeRecommendationAPI, feeRateMultiplier));

const fundingTransaction = await createFundingTransaction(
vault.valueLocked.toBigInt(),
bitcoinAmount,
this.bitcoinNetwork,
taprootMultisigPayment.address,
nativeSegwitPayment,
Expand Down
3 changes: 2 additions & 1 deletion src/dlc-handlers/software-wallet-dlc-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export class SoftwareWalletDLCHandler {

async createFundingPSBT(
vault: RawVault,
bitcoinAmount: bigint,
attestorGroupPublicKey: string,
feeRateMultiplier?: number,
customFeeRate?: bigint
Expand Down Expand Up @@ -176,7 +177,7 @@ export class SoftwareWalletDLCHandler {
}

const fundingTransaction = await createFundingTransaction(
vault.valueLocked.toBigInt(),
bitcoinAmount,
this.bitcoinNetwork,
taprootMultisigPayment.address,
nativeSegwitPayment,
Expand Down
2 changes: 2 additions & 0 deletions src/functions/bitcoin/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getFeeAmount } from '../bitcoin/bitcoin-functions.js';
import {
broadcastTransaction,
fetchBitcoinBlockchainBlockHeight,
Expand All @@ -15,5 +16,6 @@ export {
broadcastTransaction,
fetchBitcoinBlockchainBlockHeight,
fetchBitcoinTransaction,
getFeeAmount,
getBalance,
};

0 comments on commit be7ce26

Please sign in to comment.