diff --git a/bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/LiveTxBuilderTest.kt b/bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/LiveTxBuilderTest.kt index 1040ead..1b08594 100644 --- a/bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/LiveTxBuilderTest.kt +++ b/bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/LiveTxBuilderTest.kt @@ -14,7 +14,7 @@ private const val TESTNET_ESPLORA_URL = "https://esplora.testnet.kuutamo.cloud" @RunWith(AndroidJUnit4::class) class LiveTxBuilderTest { private val persistenceFilePath = InstrumentationRegistry - .getInstrumentation().targetContext.filesDir.path + "/bdk_persistence.db" + .getInstrumentation().targetContext.filesDir.path + "/bdk_persistence3.db" @AfterTest fun cleanup() { @@ -28,7 +28,7 @@ class LiveTxBuilderTest { fun testTxBuilder() { val descriptor = Descriptor("wpkh(tprv8ZgxMBicQKsPf2qfrEygW6fdYseJDDrVnDv26PH5BHdvSuG6ecCbHqLVof9yZcMoM31z9ur3tTYbSnr1WBqbGX97CbXcmp5H6qeMpyvx35B/84h/1h/0h/0/*)", Network.SIGNET) val wallet = Wallet(descriptor, null, persistenceFilePath, Network.SIGNET) - val esploraClient = EsploraClient(SIGNET_ESPLORA_URL) + val esploraClient: EsploraClient = EsploraClient(SIGNET_ESPLORA_URL) val fullScanRequest: FullScanRequest = wallet.startFullScan() val update = esploraClient.fullScan(fullScanRequest, 10uL, 1uL) wallet.applyUpdate(update) @@ -41,7 +41,7 @@ class LiveTxBuilderTest { val recipient: Address = Address("tb1qrnfslnrve9uncz9pzpvf83k3ukz22ljgees989", Network.SIGNET) val psbt: Psbt = TxBuilder() - .addRecipient(recipient.scriptPubkey(), 4200uL) + .addRecipient(recipient.scriptPubkey(), Amount.fromSat(4200uL)) .feeRate(FeeRate.fromSatPerVb(2uL)) .finish(wallet) @@ -53,8 +53,8 @@ class LiveTxBuilderTest { fun complexTxBuilder() { val externalDescriptor = Descriptor("wpkh(tprv8ZgxMBicQKsPf2qfrEygW6fdYseJDDrVnDv26PH5BHdvSuG6ecCbHqLVof9yZcMoM31z9ur3tTYbSnr1WBqbGX97CbXcmp5H6qeMpyvx35B/84h/1h/0h/0/*)", Network.SIGNET) val changeDescriptor = Descriptor("wpkh(tprv8ZgxMBicQKsPf2qfrEygW6fdYseJDDrVnDv26PH5BHdvSuG6ecCbHqLVof9yZcMoM31z9ur3tTYbSnr1WBqbGX97CbXcmp5H6qeMpyvx35B/84h/1h/0h/1/*)", Network.SIGNET) - val wallet = Wallet(externalDescriptor, changeDescriptor, persistenceFilePath, Network.TESTNET) - val esploraClient = EsploraClient(SIGNET_ESPLORA_URL) + val wallet = Wallet(externalDescriptor, changeDescriptor, persistenceFilePath, Network.SIGNET) + val esploraClient: EsploraClient = EsploraClient(SIGNET_ESPLORA_URL) val fullScanRequest: FullScanRequest = wallet.startFullScan() val update = esploraClient.fullScan(fullScanRequest, 10uL, 1uL) wallet.applyUpdate(update) @@ -68,8 +68,8 @@ class LiveTxBuilderTest { val recipient1: Address = Address("tb1qrnfslnrve9uncz9pzpvf83k3ukz22ljgees989", Network.SIGNET) val recipient2: Address = Address("tb1qw2c3lxufxqe2x9s4rdzh65tpf4d7fssjgh8nv6", Network.SIGNET) val allRecipients: List = listOf( - ScriptAmount(recipient1.scriptPubkey(), 4200uL), - ScriptAmount(recipient2.scriptPubkey(), 4200uL), + ScriptAmount(recipient1.scriptPubkey(), Amount.fromSat(4200uL)), + ScriptAmount(recipient2.scriptPubkey(), Amount.fromSat(4200uL)), ) val psbt: Psbt = TxBuilder() diff --git a/bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/LiveWalletTest.kt b/bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/LiveWalletTest.kt index 33ba584..3dff103 100644 --- a/bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/LiveWalletTest.kt +++ b/bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/LiveWalletTest.kt @@ -14,7 +14,7 @@ private const val TESTNET_ESPLORA_URL = "https://esplora.testnet.kuutamo.cloud" @RunWith(AndroidJUnit4::class) class LiveWalletTest { private val persistenceFilePath = InstrumentationRegistry - .getInstrumentation().targetContext.filesDir.path + "/bdk_persistence.db" + .getInstrumentation().targetContext.filesDir.path + "/bdk_persistence2.db" @AfterTest fun cleanup() { @@ -69,7 +69,7 @@ class LiveWalletTest { val recipient: Address = Address("tb1qrnfslnrve9uncz9pzpvf83k3ukz22ljgees989", Network.SIGNET) val psbt: Psbt = TxBuilder() - .addRecipient(recipient.scriptPubkey(), 4200uL) + .addRecipient(recipient.scriptPubkey(), Amount.fromSat(4200uL)) .feeRate(FeeRate.fromSatPerVb(4uL)) .finish(wallet) diff --git a/bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/OfflineWalletTest.kt b/bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/OfflineWalletTest.kt index aa43b8a..97ace82 100644 --- a/bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/OfflineWalletTest.kt +++ b/bdk-android/lib/src/androidTest/kotlin/org/bitcoindevkit/OfflineWalletTest.kt @@ -13,7 +13,7 @@ import kotlin.test.AfterTest @RunWith(AndroidJUnit4::class) class OfflineWalletTest { private val persistenceFilePath = InstrumentationRegistry - .getInstrumentation().targetContext.filesDir.path + "/bdk_persistence.db" + .getInstrumentation().targetContext.filesDir.path + "/bdk_persistence1.db" @AfterTest fun cleanup() {