Skip to content

fix: pass refundOnchainAddress to createOrder #1229

Description

@ovitrif

Pass a wallet-owned on-chain refund address in CreateOrderOptions.refundOnchainAddress when creating a Blocktank LSP order.

Context

defaultCreateOrderOptions in app/src/main/java/to/bitkit/repositories/BlocktankRepo.kt currently sets refundOnchainAddress to null. Providing the address gives Blocktank a refund destination without requiring the user to contact support and supply one.

Denys confirmed that supplying this field allows Blocktank to automatically create a refund when an order is paid but its channel is not claimed before the order expires.

Acceptance criteria

  • Every LSP order creation path supplies a valid address controlled by the user's Bitkit wallet for the active Bitcoin network.
  • The address reaches the LSP order endpoint through bitkit-core's CreateOrderOptions.refundOnchainAddress field.
  • Address selection follows the wallet's address lifecycle and keeps the supplied address recoverable after restart or wallet restore.
  • Address retrieval failures are handled explicitly before order submission.
  • Tests verify that order creation sends the wallet's refund address.
  • Coordinate with the backend team to verify that a paid, unclaimed order that expires creates a refund to the supplied address and that Bitkit detects the incoming funds.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions