Skip to content

Commit

Permalink
DEBUG PSBT & TEMP REPOS
Browse files Browse the repository at this point in the history
  • Loading branch information
J0J0XMR committed Nov 14, 2024
1 parent 25ae7c4 commit 59ca8b1
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 22 deletions.
9 changes: 7 additions & 2 deletions cw_bitcoin/lib/bitcoin_payjoin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,17 @@ class BitcoinPayjoin {
// pjBtcAddress: uri.address(),
// );

final psbtv0 = await bitcoinWallet.createPayjoinTransaction(
final psbtv2 = await bitcoinWallet.createPayjoinTransaction(
credentials,
pjBtcAddress: uri.address(),
);
print(
'[+] BitcoinPayjoin | buildOriginalPsbt => psbtv2: ${base64Encode(psbtv2.serialize())}');

final psbtv0 = base64Encode(psbtv2.asPsbtV0());
print('[+] BitcoinPayjoin | buildOriginalPsbt => psbtv0: $psbtv0');

return base64Encode(psbtv0);
return psbtv0;
}

Future<send.RequestContext> buildPayjoinRequest(
Expand Down
5 changes: 3 additions & 2 deletions cw_bitcoin/lib/electrum_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ abstract class ElectrumWalletBase extends WalletBase<
);
}

Future<Uint8List> createPayjoinTransaction(
Future<PsbtV2> createPayjoinTransaction(
Object credentials, {
String? pjBtcAddress,
}) async {
Expand Down Expand Up @@ -1020,7 +1020,8 @@ abstract class ElectrumWalletBase extends WalletBase<
return '';
});

return transaction.psbt.asPsbtV0();
// return transaction.psbt.asPsbtV0();
return transaction.psbt;
} catch (e, st) {
print('[!] ElectrumWallet || e: $e and st: $st');
throw e;
Expand Down
19 changes: 10 additions & 9 deletions cw_bitcoin/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ packages:
dependency: "direct overridden"
description:
path: "."
ref: cake-update-v5
resolved-ref: ff2b10eb27b0254ce4518d054332d97d77d9b380
url: "https://github.com/cake-tech/bitcoin_base"
ref: "9ef1155d082e6ef398f6ababbf8fe909caa3ae68"
resolved-ref: "9ef1155d082e6ef398f6ababbf8fe909caa3ae68"
url: "https://github.com/J0J0XMR/bitcoin_base"
source: git
version: "4.7.0"
blockchain_utils:
Expand Down Expand Up @@ -667,10 +667,11 @@ packages:
payjoin_flutter:
dependency: "direct main"
description:
name: payjoin_flutter
sha256: "8dd31af1edabca92b636f2a204ded98a386ce4dc9cef0c3e3eef388b07d16889"
url: "https://pub.dev"
source: hosted
path: "."
ref: HEAD
resolved-ref: dc1685cb808205bd59f319ce2e6e67ea133b884d
url: "https://github.com/J0J0XMR/payjoin-flutter"
source: git
version: "0.20.0"
platform:
dependency: transitive
Expand Down Expand Up @@ -938,10 +939,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
url: "https://pub.dev"
source: hosted
version: "14.2.4"
version: "14.2.5"
watcher:
dependency: "direct overridden"
description:
Expand Down
8 changes: 5 additions & 3 deletions cw_bitcoin/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ dependencies:
git:
url: https://github.com/rafael-xmr/sp_scanner
ref: sp_v4.0.0
payjoin_flutter: 0.20.0
payjoin_flutter:
git:
url: https://github.com/J0J0XMR/payjoin-flutter

# payjoin_flutter:
# git:
Expand All @@ -61,8 +63,8 @@ dependency_overrides:
watcher: ^1.1.0
bitcoin_base:
git:
url: https://github.com/cake-tech/bitcoin_base
ref: cake-update-v5
url: https://github.com/J0J0XMR/bitcoin_base
ref: 9ef1155d082e6ef398f6ababbf8fe909caa3ae68

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
12 changes: 6 additions & 6 deletions pubspec_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ dependencies:
polyseed: ^0.0.6
nostr_tools: ^1.0.9
solana: ^0.30.1
bitcoin_base:
bitcoin_base:
git:
url: https://github.com/cake-tech/bitcoin_base
ref: cake-update-v5
url: https://github.com/J0J0XMR/bitcoin_base
ref: 9ef1155d082e6ef398f6ababbf8fe909caa3ae68
ledger_flutter: ^1.0.1
hashlib: ^1.19.2

Expand Down Expand Up @@ -135,10 +135,10 @@ dependency_overrides:
url: https://github.com/cake-tech/web3dart.git
ref: cake
flutter_secure_storage_platform_interface: 1.0.2
bitcoin_base:
bitcoin_base:
git:
url: https://github.com/cake-tech/bitcoin_base
ref: cake-update-v5
url: https://github.com/J0J0XMR/bitcoin_base
ref: 9ef1155d082e6ef398f6ababbf8fe909caa3ae68

flutter_icons:
image_path: "assets/images/app_logo.png"
Expand Down

0 comments on commit 59ca8b1

Please sign in to comment.