Fix demo
This commit is contained in:
parent
de47771c12
commit
e738126bed
@ -72,12 +72,12 @@ fun main(args: Array<String>) {
|
|||||||
println("Press Enter to return funds")
|
println("Press Enter to return funds")
|
||||||
readLine()
|
readLine()
|
||||||
println("Creating a PSBT with recipient $recipient and amount $amount satoshis...")
|
println("Creating a PSBT with recipient $recipient and amount $amount satoshis...")
|
||||||
val transaction = PartiallySignedBitcoinTransaction(wallet, recipient, amount)
|
val psbt = PartiallySignedBitcoinTransaction(wallet, recipient, amount, null)
|
||||||
println("Signing the transaction...")
|
println("Signing the transaction...")
|
||||||
wallet.sign(transaction)
|
wallet.sign(psbt)
|
||||||
println("Broadcasting the signed transaction...")
|
println("Broadcasting the signed transaction...")
|
||||||
val transactionId = wallet.broadcast(transaction)
|
val transaction = wallet.broadcast(psbt)
|
||||||
println("Broadcasted transaction with id $transactionId")
|
println("Broadcasted transaction $transaction")
|
||||||
val take = 5
|
val take = 5
|
||||||
println("Listing latest $take transactions...")
|
println("Listing latest $take transactions...")
|
||||||
wallet
|
wallet
|
||||||
@ -87,3 +87,4 @@ fun main(args: Array<String>) {
|
|||||||
.forEach { println(it) }
|
.forEach { println(it) }
|
||||||
println("Final wallet balance: ${wallet.getBalance()}")
|
println("Final wallet balance: ${wallet.getBalance()}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user