Skip to content

Commit

Permalink
Adjust to tBTC SDK v2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-zimnoch committed Apr 22, 2024
1 parent 476e50b commit a3679e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/tbtc/mock-bitcoin-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,8 @@ export class MockBitcoinClient implements BitcoinClient {
}
})
}

getCoinbaseTxHash(blockHeight: number): Promise<BitcoinTxHash> {
throw new Error("Method not implemented")
}
}
9 changes: 5 additions & 4 deletions src/threshold-ts/tbtc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ import {
ElectrumClient,
ethereumAddressFromSigner,
EthereumBridge,
ethereumNetworkFromSigner,
chainIdFromSigner,
Hex,
loadEthereumContracts,
loadEthereumCoreContracts,
TBTC as SDK,
Chains,
} from "@keep-network/tbtc-v2.ts"
import {
BigNumber,
Expand Down Expand Up @@ -506,11 +507,11 @@ export class TBTC implements ITBTC {
// For both of these cases we will use SDK.initializeCustom() method
if (clientFromConfig || shouldUseTestnetDevelopmentContracts) {
const depositorAddress = await ethereumAddressFromSigner(signer)
const ethereumNetwork = await ethereumNetworkFromSigner(signer)
const chainId = await chainIdFromSigner(signer)

const tbtcContracts = shouldUseTestnetDevelopmentContracts
? getSepoliaDevelopmentContracts(signer)
: await loadEthereumContracts(signer, ethereumNetwork)
: await loadEthereumCoreContracts(signer, chainId as Chains.Ethereum)

this._sdk = await SDK.initializeCustom(tbtcContracts, this._bitcoinClient)

Expand Down

0 comments on commit a3679e2

Please sign in to comment.