diff --git a/example/lib/bdk_library.dart b/example/lib/bdk_library.dart index db4ecce..702cf26 100644 --- a/example/lib/bdk_library.dart +++ b/example/lib/bdk_library.dart @@ -52,7 +52,7 @@ class BdkLibrary { Future getPsbtInput( Wallet wallet, LocalUtxo utxo, bool onlyWitnessUtxo) async { final input = - await wallet.getPsbtInput(utxo: utxo, onlyWitnessUtxo: onlyWitnessUtxo); + wallet.getPsbtInput(utxo: utxo, onlyWitnessUtxo: onlyWitnessUtxo); return input; } @@ -68,7 +68,6 @@ class BdkLibrary { List getConfirmedTransactions(Wallet wallet) { List confirmed = []; final res = wallet.listTransactions(includeRaw: true); - for (var e in res) { if (e.confirmationTime != null) confirmed.add(e); } @@ -103,7 +102,7 @@ class BdkLibrary { .addRecipient(script, BigInt.from(amountSat)) .feeRate(feeRate.satPerVb) .finish(wallet); - final isFinalized = await wallet.sign(psbt: psbt); + final isFinalized = wallet.sign(psbt: psbt); if (isFinalized) { final tx = psbt.extractTx(); final res = await blockchain.broadcast(transaction: tx); diff --git a/example/lib/wallet.dart b/example/lib/wallet.dart index 159e368..3e47532 100644 --- a/example/lib/wallet.dart +++ b/example/lib/wallet.dart @@ -64,7 +64,7 @@ class _ExampleWalletState extends State { displayText = "You have ${unConfirmed.length} unConfirmed transactions"; }); for (var e in unConfirmed) { - final txOut = await e.transaction!.output(); + final txOut = e.transaction!.output(); if (kDebugMode) { print(" txid: ${e.txid}"); print(" fee: ${e.fee}"); @@ -86,10 +86,11 @@ class _ExampleWalletState extends State { print(" txid: ${e.txid}"); print(" confirmationTime: ${e.confirmationTime?.timestamp}"); print(" confirmationTime Height: ${e.confirmationTime?.height}"); - final txIn = await e.transaction!.input(); - final txOut = await e.transaction!.output(); + final txIn = e.transaction!.input(); + final txOut = e.transaction!.output(); print("=============TxIn=============="); for (var e in txIn) { + print(" script: ${e.scriptSig}"); print(" previousOutout Txid: ${e.previousOutput.txid}"); print(" previousOutout vout: ${e.previousOutput.vout}"); print(" witness: ${e.witness}");