mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
update-payjoin (#2281)
* feat: upgrade to flutter_payjoin 0.23.0 * fix: dependency discrepancy freezed_annotation * feat(cw_bitcoin): use latest payjoin deps * ci: update rust toolchain * Update pubspec.yaml * trial: downgrade flutter payjoin ffi * some checks * trial 2 * [skip ci] use correct image for CI * fix: bump flutter sdk to 3.29.0 * partial revert --------- Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net> Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
parent
b0edf1fe75
commit
8457a45c2a
38 changed files with 477 additions and 346 deletions
|
@ -4,6 +4,7 @@ import 'dart:isolate';
|
|||
import 'dart:typed_data';
|
||||
|
||||
import 'package:blockchain_utils/blockchain_utils.dart';
|
||||
import 'package:cw_bitcoin/payjoin/manager.dart';
|
||||
import 'package:cw_bitcoin/payjoin/payjoin_session_errors.dart';
|
||||
import 'package:cw_bitcoin/psbt/signer.dart';
|
||||
import 'package:cw_core/utils/print_verbose.dart';
|
||||
|
@ -42,7 +43,7 @@ class PayjoinReceiverWorker {
|
|||
|
||||
try {
|
||||
final httpClient = http.Client();
|
||||
final receiver = Receiver.fromJson(receiverJson);
|
||||
final receiver = Receiver.fromJson(json: receiverJson);
|
||||
|
||||
final uncheckedProposal =
|
||||
await worker.receiveUncheckedProposal(httpClient, receiver);
|
||||
|
@ -101,7 +102,8 @@ class PayjoinReceiverWorker {
|
|||
http.Client httpClient, Receiver session) async {
|
||||
while (true) {
|
||||
printV("Polling for Proposal (${session.id()})");
|
||||
final extractReq = await session.extractReq();
|
||||
final extractReq = await session.extractReq(
|
||||
ohttpRelay: PayjoinManager.randomOhttpRelayUrl());
|
||||
final request = extractReq.$1;
|
||||
|
||||
final url = Uri.parse(request.url.asString());
|
||||
|
@ -116,7 +118,8 @@ class PayjoinReceiverWorker {
|
|||
|
||||
Future<String> sendFinalProposal(
|
||||
http.Client httpClient, PayjoinProposal finalProposal) async {
|
||||
final req = await finalProposal.extractV2Req();
|
||||
final req = await finalProposal.extractReq(
|
||||
ohttpRelay: PayjoinManager.randomOhttpRelayUrl());
|
||||
final proposalReq = req.$1;
|
||||
final proposalCtx = req.$2;
|
||||
|
||||
|
@ -214,6 +217,6 @@ class PayjoinReceiverWorker {
|
|||
sequence: 0,
|
||||
);
|
||||
|
||||
return InputPair.newInstance(txin, psbtin);
|
||||
return InputPair.newInstance(txin: txin, psbtin: psbtin);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue