Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ class SendFlowManager(
is SendFlowManagerReconcileMessage.RefreshPresenters -> {
refreshPresenters()
}

is SendFlowManagerReconcileMessage.FeeBumpConfirmDetails -> {
// fee bump confirmation screen wired in follow-up
}
}
}

Expand Down
119 changes: 119 additions & 0 deletions android/app/src/main/java/org/bitcoinppl/cove_core/cove.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1768,6 +1768,8 @@ internal object IntegrityCheckingUniffiLib {
): Short
external fun uniffi_cove_checksum_method_transactiondetails_block_number_fmt(
): Short
external fun uniffi_cove_checksum_method_transactiondetails_can_rbf_bump(
): Short
external fun uniffi_cove_checksum_method_transactiondetails_confirmation_date_time(
): Short
external fun uniffi_cove_checksum_method_transactiondetails_fee_fiat_fmt(
Expand Down Expand Up @@ -1936,6 +1938,8 @@ internal object IntegrityCheckingUniffiLib {
): Short
external fun uniffi_cove_checksum_constructor_transactiondetails_preview_new_with_label(
): Short
external fun uniffi_cove_checksum_constructor_transactiondetails_preview_pending_rbf(
): Short
external fun uniffi_cove_checksum_constructor_transactiondetails_preview_pending_received(
): Short
external fun uniffi_cove_checksum_constructor_transactiondetails_preview_pending_sent(
Expand Down Expand Up @@ -2940,6 +2944,8 @@ internal object UniffiLib {
): Long
external fun uniffi_cove_fn_constructor_transactiondetails_preview_new_with_label(`label`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
): Long
external fun uniffi_cove_fn_constructor_transactiondetails_preview_pending_rbf(uniffi_out_err: UniffiRustCallStatus,
): Long
external fun uniffi_cove_fn_constructor_transactiondetails_preview_pending_received(uniffi_out_err: UniffiRustCallStatus,
): Long
external fun uniffi_cove_fn_constructor_transactiondetails_preview_pending_sent(uniffi_out_err: UniffiRustCallStatus,
Expand All @@ -2962,6 +2968,8 @@ internal object UniffiLib {
): RustBuffer.ByValue
external fun uniffi_cove_fn_method_transactiondetails_block_number_fmt(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,
): RustBuffer.ByValue
external fun uniffi_cove_fn_method_transactiondetails_can_rbf_bump(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,
): Byte
external fun uniffi_cove_fn_method_transactiondetails_confirmation_date_time(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus,
): RustBuffer.ByValue
external fun uniffi_cove_fn_method_transactiondetails_fee_fiat_fmt(`ptr`: Long,
Expand Down Expand Up @@ -4607,6 +4615,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_cove_checksum_method_transactiondetails_block_number_fmt() != 8381.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cove_checksum_method_transactiondetails_can_rbf_bump() != 5315.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cove_checksum_method_transactiondetails_confirmation_date_time() != 59432.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
Expand Down Expand Up @@ -4859,6 +4870,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_cove_checksum_constructor_transactiondetails_preview_new_with_label() != 51427.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cove_checksum_constructor_transactiondetails_preview_pending_rbf() != 25399.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_cove_checksum_constructor_transactiondetails_preview_pending_received() != 18117.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
Expand Down Expand Up @@ -23265,6 +23279,14 @@ public interface TransactionDetailsInterface {

fun `blockNumberFmt`(): kotlin.String?

/**
* Whether this transaction can currently be fee-bumped via RBF.
*
* Requires the transaction to be outgoing, unconfirmed, and signaling opt-in RBF.
* Use this to gate the "Speed Up" action in the UI.
*/
fun `canRbfBump`(): kotlin.Boolean

fun `confirmationDateTime`(): kotlin.String?

suspend fun `feeFiatFmt`(): kotlin.String
Expand Down Expand Up @@ -23546,6 +23568,25 @@ open class TransactionDetails: Disposable, AutoCloseable, TransactionDetailsInte
}



/**
* Whether this transaction can currently be fee-bumped via RBF.
*
* Requires the transaction to be outgoing, unconfirmed, and signaling opt-in RBF.
* Use this to gate the "Speed Up" action in the UI.
*/override fun `canRbfBump`(): kotlin.Boolean {
return FfiConverterBoolean.lift(
callWithHandle {
uniffiRustCall() { _status ->
UniffiLib.uniffi_cove_fn_method_transactiondetails_can_rbf_bump(
it,
_status)
}
}
)
}


override fun `confirmationDateTime`(): kotlin.String? {
return FfiConverterOptionalString.lift(
callWithHandle {
Expand Down Expand Up @@ -23841,6 +23882,17 @@ open class TransactionDetails: Disposable, AutoCloseable, TransactionDetailsInte
}


fun `previewPendingRbf`(): TransactionDetails {
return FfiConverterTypeTransactionDetails.lift(
uniffiRustCall() { _status ->
UniffiLib.uniffi_cove_fn_constructor_transactiondetails_preview_pending_rbf(

_status)
}
)
}


fun `previewPendingReceived`(): TransactionDetails {
return FfiConverterTypeTransactionDetails.lift(
uniffiRustCall() { _status ->
Expand Down Expand Up @@ -44199,6 +44251,16 @@ sealed class SendFlowManagerAction: Disposable {
object FinalizeAndGoToNextScreen : SendFlowManagerAction()


data class ConfirmFeeBump(
val `txid`: org.bitcoinppl.cove_core.types.TxId,
val `feeRate`: org.bitcoinppl.cove_core.types.FeeRate) : SendFlowManagerAction()

{


companion object
}



@Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here
Expand Down Expand Up @@ -44338,6 +44400,14 @@ sealed class SendFlowManagerAction: Disposable {
}
is SendFlowManagerAction.FinalizeAndGoToNextScreen -> {// Nothing to destroy
}
is SendFlowManagerAction.ConfirmFeeBump -> {

Disposable.destroy(
this.`txid`,
this.`feeRate`
)

}
}.let { /* this makes the `when` an expression, which ensures it is exhaustive */ }
}

Expand Down Expand Up @@ -44416,6 +44486,10 @@ public object FfiConverterTypeSendFlowManagerAction : FfiConverterRustBuffer<Sen
FfiConverterTypeFeeRateOptionsWithTotalFee.read(buf),
)
22 -> SendFlowManagerAction.FinalizeAndGoToNextScreen
23 -> SendFlowManagerAction.ConfirmFeeBump(
FfiConverterTypeTxId.read(buf),
FfiConverterTypeFeeRate.read(buf),
)
else -> throw RuntimeException("invalid enum value, something is very wrong!!")
}
}
Expand Down Expand Up @@ -44575,6 +44649,14 @@ public object FfiConverterTypeSendFlowManagerAction : FfiConverterRustBuffer<Sen
4UL
)
}
is SendFlowManagerAction.ConfirmFeeBump -> {
// Add the size for the Int that specifies the variant plus the size needed for all fields
(
4UL
+ FfiConverterTypeTxId.allocationSize(value.`txid`)
+ FfiConverterTypeFeeRate.allocationSize(value.`feeRate`)
)
}
}

override fun write(value: SendFlowManagerAction, buf: ByteBuffer) {
Expand Down Expand Up @@ -44689,6 +44771,12 @@ public object FfiConverterTypeSendFlowManagerAction : FfiConverterRustBuffer<Sen
buf.putInt(22)
Unit
}
is SendFlowManagerAction.ConfirmFeeBump -> {
buf.putInt(23)
FfiConverterTypeTxId.write(value.`txid`, buf)
FfiConverterTypeFeeRate.write(value.`feeRate`, buf)
Unit
}
}.let { /* this makes the `when` an expression, which ensures it is exhaustive */ }
}
}
Expand Down Expand Up @@ -44807,6 +44895,15 @@ sealed class SendFlowManagerReconcileMessage: Disposable {
object ClearAlert : SendFlowManagerReconcileMessage()


data class FeeBumpConfirmDetails(
val v1: org.bitcoinppl.cove_core.types.ConfirmDetails) : SendFlowManagerReconcileMessage()

{


companion object
}



@Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here
Expand Down Expand Up @@ -44895,6 +44992,13 @@ sealed class SendFlowManagerReconcileMessage: Disposable {
}
is SendFlowManagerReconcileMessage.ClearAlert -> {// Nothing to destroy
}
is SendFlowManagerReconcileMessage.FeeBumpConfirmDetails -> {

Disposable.destroy(
this.v1
)

}
}.let { /* this makes the `when` an expression, which ensures it is exhaustive */ }
}

Expand Down Expand Up @@ -44948,6 +45052,9 @@ public object FfiConverterTypeSendFlowManagerReconcileMessage : FfiConverterRust
FfiConverterTypeSendFlowAlertState.read(buf),
)
14 -> SendFlowManagerReconcileMessage.ClearAlert
15 -> SendFlowManagerReconcileMessage.FeeBumpConfirmDetails(
FfiConverterTypeConfirmDetails.read(buf),
)
else -> throw RuntimeException("invalid enum value, something is very wrong!!")
}
}
Expand Down Expand Up @@ -45048,6 +45155,13 @@ public object FfiConverterTypeSendFlowManagerReconcileMessage : FfiConverterRust
4UL
)
}
is SendFlowManagerReconcileMessage.FeeBumpConfirmDetails -> {
// Add the size for the Int that specifies the variant plus the size needed for all fields
(
4UL
+ FfiConverterTypeConfirmDetails.allocationSize(value.v1)
)
}
}

override fun write(value: SendFlowManagerReconcileMessage, buf: ByteBuffer) {
Expand Down Expand Up @@ -45119,6 +45233,11 @@ public object FfiConverterTypeSendFlowManagerReconcileMessage : FfiConverterRust
buf.putInt(14)
Unit
}
is SendFlowManagerReconcileMessage.FeeBumpConfirmDetails -> {
buf.putInt(15)
FfiConverterTypeConfirmDetails.write(value.v1, buf)
Unit
}
}.let { /* this makes the `when` an expression, which ensures it is exhaustive */ }
}
}
Expand Down
3 changes: 3 additions & 0 deletions ios/Cove/Flows/SendFlow/SendFlowManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ extension WeakReconciler: SendFlowManagerReconciler where Reconciler == SendFlow

case .refreshPresenters:
self.refreshPresenters()

case .feeBumpConfirmDetails:
break
}
}

Expand Down
Loading