Skip to content

Commit

Permalink
Merge pull request #29 from kumulynja/return-ffi-wrappers
Browse files Browse the repository at this point in the history
Return ffi wrappers + bug fix
  • Loading branch information
BitcoinZavior authored Jul 23, 2024
2 parents c7c18e7 + 3a917b0 commit 0d89b4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/receive/v2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class OutputsUnknown extends FfiV2OutputsUnknown {

/// Find which outputs belong to the receiver
@override
Future<FfiV2ProvisionalProposal> identifyReceiverOutputs(
Future<ProvisionalProposal> identifyReceiverOutputs(
{required FutureOr<bool> Function(Uint8List p1) isReceiverOutput,
hint}) async {
try {
Expand Down Expand Up @@ -258,7 +258,7 @@ class ProvisionalProposal extends FfiV2ProvisionalProposal {
}

@override
Future<FfiV2PayjoinProposal> finalizeProposal(
Future<PayjoinProposal> finalizeProposal(
{required FutureOr<String> Function(String p1) processPsbt,
BigInt? minFeerateSatPerVb,
hint}) async {
Expand Down Expand Up @@ -297,7 +297,7 @@ class PayjoinProposal extends FfiV2PayjoinProposal {
try {
final res = await FfiV2PayjoinProposal.extractV2Req(ptr: this);
final request =
Request(await Url.fromString(res.$1.$1.toString()), res.$1.$2);
Request(await Url.fromString(res.$1.$1.asString()), res.$1.$2);
return (request, ClientResponse._(field0: res.$2.field0));
} on error.PayjoinError catch (e) {
throw mapPayjoinError(e);
Expand Down
5 changes: 3 additions & 2 deletions lib/send.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ class RequestBuilder extends FfiRequestBuilder {
}

@override
Future<FfiRequestBuilder> alwaysDisableOutputSubstitution(
Future<RequestBuilder> alwaysDisableOutputSubstitution(
{required bool disable, hBigInt}) async {
try {
return await super.alwaysDisableOutputSubstitution(disable: disable);
final res = await super.alwaysDisableOutputSubstitution(disable: disable);
return RequestBuilder._(field0: res.field0);
} on error.PayjoinError catch (e) {
throw mapPayjoinError(e);
}
Expand Down

0 comments on commit 0d89b4d

Please sign in to comment.