From 849de905ee5e62d77e646f8571e1c4c998086d8d Mon Sep 17 00:00:00 2001 From: kumulynja Date: Tue, 17 Dec 2024 14:54:42 +0100 Subject: [PATCH] example: update bdk-flutter to v0.31.3 --- example/ios/Podfile.lock | 4 ++-- example/lib/managers/payjoin_manager.dart | 4 ++-- example/lib/screens/home.dart | 12 ++++++------ example/pubspec.lock | 18 +++++++++--------- example/pubspec.yaml | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 70e7a9a..4715428 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - bdk_flutter (0.31.2): + - bdk_flutter (0.31.3): - Flutter - Flutter (1.0.0) - payjoin_flutter (0.20.0) @@ -23,7 +23,7 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/url_launcher_ios/ios" SPEC CHECKSUMS: - bdk_flutter: fb57a7400a7f3f181c5977bcdc2a5ef347ae4e7f + bdk_flutter: 86c9ba59ee282dee08c3a29599abe867d10a8b10 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 payjoin_flutter: 6397d7b698cdad6453be4949ab6aca1863f6c5e5 url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe diff --git a/example/lib/managers/payjoin_manager.dart b/example/lib/managers/payjoin_manager.dart index ac08c4f..e197f20 100644 --- a/example/lib/managers/payjoin_manager.dart +++ b/example/lib/managers/payjoin_manager.dart @@ -83,7 +83,7 @@ class PayjoinManager { .addRecipient(script, uriAmount) .feeAbsolute(BigInt.from(fee)) .finish(senderWallet); - await senderWallet.sign( + senderWallet.sign( psbt: psbt, signOptions: const bdk.SignOptions( trustWitnessUtxo: true, @@ -352,7 +352,7 @@ class PayjoinManager { Future processPsbt(String preProcessed, bdk.Wallet wallet) async { final psbt = await bdk.PartiallySignedTransaction.fromString(preProcessed); debugPrint('PSBT before: ${psbt.toString()}'); - await wallet.sign( + wallet.sign( psbt: psbt, signOptions: const bdk.SignOptions( trustWitnessUtxo: true, diff --git a/example/lib/screens/home.dart b/example/lib/screens/home.dart index 76ddeb2..629a9cf 100644 --- a/example/lib/screens/home.dart +++ b/example/lib/screens/home.dart @@ -117,7 +117,7 @@ class _HomeState extends State { } } - Future getBalance() async { + void getBalance() { final balanceObj = wallet.getBalance(); final res = "Total Balance: ${balanceObj.total.toString()}"; if (kDebugMode) { @@ -150,14 +150,14 @@ class _HomeState extends State { final txBuilder = bdk.TxBuilder(); final address = await bdk.Address.fromString( s: addressStr, network: bdk.Network.signet); - final script = await address.scriptPubkey(); + final script = address.scriptPubkey(); final psbt = await txBuilder .addRecipient(script, BigInt.from(amount)) .feeRate(1.0) .finish(wallet); - final isFinalized = await wallet.sign(psbt: psbt.$1); + final isFinalized = wallet.sign(psbt: psbt.$1); if (isFinalized) { final tx = psbt.$1.extractTx(); final res = await blockchain.broadcast(transaction: tx); @@ -199,8 +199,8 @@ class _HomeState extends State { } Future syncWallet() async { - wallet.sync(blockchain: blockchain); - await getBalance(); + await wallet.sync(blockchain: blockchain); + getBalance(); } Future changePayjoin(bool value) async { @@ -642,7 +642,7 @@ class _HomeState extends State { // You could also put a timeout on waiting for the transaction and then // broadcast the original tx yourself if no transaction is received final receivedTxId = await waitForTransaction( - originalTxId: await originalTx.txid(), + originalTxId: originalTx.txid(), proposalTxId: proposalTxId, ); resetPayjoinSession(); diff --git a/example/pubspec.lock b/example/pubspec.lock index 7e1680f..19b1966 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -42,11 +42,11 @@ packages: dependency: "direct main" description: path: "." - ref: main - resolved-ref: "8d7d89b47a2766ec55bd6710403d212f4e4432cb" + ref: "upgrade-31.3" + resolved-ref: "07c00487b1279d51727a746e267223d2ec24a700" url: "https://github.com/LtbLightning/bdk-flutter" source: git - version: "0.31.2" + version: "0.31.3" boolean_selector: dependency: transitive description: @@ -338,10 +338,10 @@ packages: dependency: transitive description: name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" path: dependency: transitive description: @@ -369,10 +369,10 @@ packages: dependency: transitive description: name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" sky_engine: dependency: transitive description: flutter @@ -542,10 +542,10 @@ packages: dependency: transitive description: name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" web: dependency: transitive description: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index d90021f..64d7e3c 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -8,7 +8,7 @@ dependencies: bdk_flutter: git: url: https://github.com/LtbLightning/bdk-flutter - ref: main + ref: upgrade-31.3 cupertino_icons: ^1.0.2 flutter: sdk: flutter