Skip to content

Conversation

@jvsena42
Copy link
Member

@jvsena42 jvsena42 commented Aug 6, 2025

Related to #268

This PR implements the code to keep wathcing the blocktank orders after the app restart

Description

  • Move the watch code to the repository
  • Persist the pending orders
  • Implement app restart watch flow
  • delete completed orders

Preview

QA Notes

@jvsena42 jvsena42 self-assigned this Aug 6, 2025
@@ -1,5 +1,7 @@
package to.bitkit.repositories

import androidx.lifecycle.viewModelScope

Check warning

Code scanning / detekt

Detects unused imports Warning

Unused import
import to.bitkit.services.LightningService
import to.bitkit.utils.Logger
import to.bitkit.utils.ServiceError
import to.bitkit.viewmodels.TransferViewModel

Check warning

Code scanning / detekt

Detects unused imports Warning

Unused import

Logger.debug("Started to watch order '$orderId'", context = TAG)

while (!isSettled && error == null) {

Check warning

Code scanning / detekt

The loop contains more than one break or continue statement. The code should be refactored to increase readability. Warning

The loop contains more than one break or continue statement. The code should be refactored to increase readability.
@jvsena42 jvsena42 changed the title Feat/watch pending transfer Watch pending transfer Aug 6, 2025
package to.bitkit.models

import androidx.annotation.StringRes
import com.synonym.bitkitcore.BtOrderState2

Check warning

Code scanning / detekt

Detects unused imports Warning

Unused import
Comment on lines +18 to +19


Check warning

Code scanning / detekt

Reports consecutive blank lines Warning

Needless blank line(s)



//fun BtOrderState2.toChannelSetupStep() = when(this) {

Check warning

Code scanning / detekt

Checks if comments have the right spacing Warning

Missing space after //
// BtOrderState2.EXPIRED -> TODO()
// BtOrderState2.EXECUTED -> TODO()
// BtOrderState2.PAID -> TODO()
//}

Check warning

Code scanning / detekt

Checks if comments have the right spacing Warning

Missing space after //
}

/*
* Cache order step

Check warning

Code scanning / detekt

Detect the alignment of the initial star in a block comment. Warning

Initial star should align with start of block comment

/*
* Cache order step
* Start cached order watch

Check warning

Code scanning / detekt

Detect the alignment of the initial star in a block comment. Warning

Initial star should align with start of block comment
/*
* Cache order step
* Start cached order watch
* Update order status

Check warning

Code scanning / detekt

Detect the alignment of the initial star in a block comment. Warning

Initial star should align with start of block comment
* Cache order step
* Start cached order watch
* Update order status
* */

Check warning

Code scanning / detekt

Detect the alignment of the initial star in a block comment. Warning

Initial star should align with start of block comment
@jvsena42
Copy link
Member Author

jvsena42 commented Aug 7, 2025

Replaced by #283

@jvsena42 jvsena42 closed this Aug 7, 2025
@jvsena42 jvsena42 deleted the feat/watch-pending-transfer branch August 7, 2025 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants