Skip to content

Commit

Permalink
Using regex from config to parse account list if available. Update SD…
Browse files Browse the repository at this point in the history
…K which has select by text parsing fixes as well
  • Loading branch information
davkutalek committed Mar 3, 2023
1 parent 418b1fd commit 7825a36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ class TransactionReceiver : BroadcastReceiver(), KoinComponent {
}

private suspend fun parseAccounts(ussdAccountList: String) {
val pattern = Pattern.compile("^([\\d]{1,2})[>):.\\s]+(.+)\$", Pattern.MULTILINE)
var splitterPattern = action?.getStepByVar("accountName")?.optString("valid_response_regex")
if (splitterPattern == null) splitterPattern = "^\\s*([\\d]{1,2})[>):.\\s]+(.+)$"
val pattern = Pattern.compile(splitterPattern, Pattern.MULTILINE)
val matcher = pattern.matcher(ussdAccountList)

while (matcher.find()) {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" }
glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glide" }
coil = "io.coil-kt:coil-compose:2.1.0"

hover = "com.hover:android-sdk:2.0.0-beta01"
hover = "com.hover:android-sdk:2.0.0-beta03"
volley = "com.android.volley:volley:1.2.1"
play-services = "com.google.android.gms:play-services-analytics:18.0.1"
picasso = "com.squareup.picasso:picasso:2.71828"
Expand Down

0 comments on commit 7825a36

Please sign in to comment.