added transfer support for bml business profiles
All checks were successful
Auto Tag on Version Change / check-version (push) Successful in 4s

This commit is contained in:
2026-05-22 06:31:21 +05:00
parent c9ae614fc7
commit fd7fcb41a6
2 changed files with 15 additions and 2 deletions

View File

@@ -631,7 +631,7 @@ class TransferFragment : Fragment() {
val remarks = binding.etRemarks.text?.toString()?.trim() ?: ""
val isSrcBml = src.bank == "BML"
val isBmlBusiness = isSrcBml && isBusinessProfile(src)
val isBmlBusiness = isSrcBml && isBusinessProfile(src) // to test on personal accounts: use `isSrcBml`
val isSrcCard = src.profileType == "BML_PREPAID" || src.profileType == "BML_CREDIT"
val isDestMib = AccountInputParser.detect(resolvedAccountNumber) == AccountInputParser.InputType.MIB_ACCOUNT
val currency = src.currencyName.ifBlank { "MVR" }
@@ -1064,6 +1064,7 @@ class TransferFragment : Fragment() {
binding.containerBmlChannels.addView(row)
}
disableTransferFields()
binding.layoutBmlChannelSelection.visibility = View.VISIBLE
}
@@ -1102,7 +1103,8 @@ class TransferFragment : Fragment() {
}
bmlOtpState = BmlOtpState.AWAITING_OTP
disableTransferFields()
binding.tvBmlOtpSentVia.text = "OTP code sent via: ${channel.description} (${channel.masked})"
binding.tvBmlOtpSentVia.visibility = View.VISIBLE
binding.tilBmlOtp.visibility = View.VISIBLE
binding.etBmlOtp.requestFocus()
binding.btnTransfer.text = getString(R.string.transfer_verify_payment)
@@ -1201,6 +1203,7 @@ class TransferFragment : Fragment() {
pendingBmlTransfer = null
val b = _binding ?: return
b.layoutBmlChannelSelection.visibility = View.GONE
b.tvBmlOtpSentVia.visibility = View.GONE
b.tilBmlOtp.visibility = View.GONE
b.etBmlOtp.setText("")
b.tilBmlOtp.error = null

View File

@@ -361,6 +361,16 @@
</LinearLayout>
<!-- BML business OTP: sent-via label (shown after channel selection) -->
<TextView
android:id="@+id/tvBmlOtpSentVia"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:textAppearance="?attr/textAppearanceBodySmall"
android:textColor="?attr/colorOnSurfaceVariant"
android:visibility="gone" />
<!-- BML business OTP: verification code input (shown after channel selection) -->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilBmlOtp"