File tree Expand file tree Collapse file tree
src/main/java/com/iriswallet/data Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ dependencies {
158158 implementation ' androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
159159
160160 // Bitcoindevkit
161- implementation ' org.bitcoindevkit:bdk-android:0.9 .0'
161+ implementation ' org.bitcoindevkit:bdk-android:0.11 .0'
162162
163163 // Github
164164 implementation ' com.github.lelloman:android-identicons:v11'
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ object BdkRepository {
1515 private val keys: DescriptorSecretKey by lazy {
1616 DescriptorSecretKey (
1717 AppContainer .bitcoinNetwork.toBdkNetwork(),
18- AppContainer .bitcoinKeys.mnemonic,
18+ Mnemonic .fromString( AppContainer .bitcoinKeys.mnemonic) ,
1919 AppContainer .mnemonicPassword,
2020 )
2121 }
@@ -80,7 +80,11 @@ object BdkRepository {
8080
8181 fun sendToAddress (address : String , amount : ULong ): String {
8282 try {
83- val psbt = TxBuilder ().addRecipient(address, amount).finish(vanillaWallet)
83+ val psbt =
84+ TxBuilder ()
85+ .addRecipient(Address (address).scriptPubkey(), amount)
86+ .finish(vanillaWallet)
87+ .psbt
8488 vanillaWallet.sign(psbt)
8589 blockchain.broadcast(psbt)
8690 return psbt.txid()
You can’t perform that action at this time.
0 commit comments