Skip to content

Commit

Permalink
Merge pull request #42 from kumulynja/main
Browse files Browse the repository at this point in the history
example: bump bdk-flutter to upgrade-31.3 branch for testing
  • Loading branch information
BitcoinZavior authored Dec 18, 2024
2 parents 0124ef6 + 849de90 commit a828990
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions example/lib/managers/payjoin_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -352,7 +352,7 @@ class PayjoinManager {
Future<String> 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,
Expand Down
12 changes: 6 additions & 6 deletions example/lib/screens/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class _HomeState extends State<Home> {
}
}

Future<void> getBalance() async {
void getBalance() {
final balanceObj = wallet.getBalance();
final res = "Total Balance: ${balanceObj.total.toString()}";
if (kDebugMode) {
Expand Down Expand Up @@ -150,14 +150,14 @@ class _HomeState extends State<Home> {
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);
Expand Down Expand Up @@ -199,8 +199,8 @@ class _HomeState extends State<Home> {
}

Future<void> syncWallet() async {
wallet.sync(blockchain: blockchain);
await getBalance();
await wallet.sync(blockchain: blockchain);
getBalance();
}

Future<void> changePayjoin(bool value) async {
Expand Down Expand Up @@ -642,7 +642,7 @@ class _HomeState extends State<Home> {
// 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();
Expand Down
18 changes: 9 additions & 9 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a828990

Please sign in to comment.