diff --git a/cw_bitcoin/lib/bitcoin_payjoin.dart b/cw_bitcoin/lib/bitcoin_payjoin.dart index 949762ba08..ec2195d2b9 100644 --- a/cw_bitcoin/lib/bitcoin_payjoin.dart +++ b/cw_bitcoin/lib/bitcoin_payjoin.dart @@ -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 buildPayjoinRequest( diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 74e1a8b852..bd40319218 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -928,7 +928,7 @@ abstract class ElectrumWalletBase extends WalletBase< ); } - Future createPayjoinTransaction( + Future createPayjoinTransaction( Object credentials, { String? pjBtcAddress, }) async { @@ -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; diff --git a/cw_bitcoin/pubspec.lock b/cw_bitcoin/pubspec.lock index c5384be8a1..072d23a0ef 100644 --- a/cw_bitcoin/pubspec.lock +++ b/cw_bitcoin/pubspec.lock @@ -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: @@ -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 @@ -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: diff --git a/cw_bitcoin/pubspec.yaml b/cw_bitcoin/pubspec.yaml index 8d25a42083..315776f612 100644 --- a/cw_bitcoin/pubspec.yaml +++ b/cw_bitcoin/pubspec.yaml @@ -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: @@ -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 diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 36b3655a83..a294ca97c4 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -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 @@ -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"