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
1 change: 0 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

testOptions {
unitTests.returnDefaultValues = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ import com.blockeq.stellarwallet.BuildConfig
import com.blockeq.stellarwallet.R
import com.blockeq.stellarwallet.WalletApplication
import com.blockeq.stellarwallet.helpers.Constants.Companion.STELLAR_ADDRESS_LENGTH
import com.blockeq.stellarwallet.helpers.OnTextChanged
import com.blockeq.stellarwallet.interfaces.ContactsRepository.ContactOperationStatus
import com.blockeq.stellarwallet.models.Contact
import com.blockeq.stellarwallet.vmodels.ContactsRepositoryImpl
import com.google.zxing.integration.android.IntentIntegrator
import kotlinx.android.synthetic.main.activity_stellar_address.*
import org.jetbrains.anko.doAsync
import org.stellar.sdk.federation.Federation
import timber.log.Timber

class StellarAddressActivity : BaseActivity(), View.OnClickListener {
Expand Down Expand Up @@ -110,6 +113,15 @@ class StellarAddressActivity : BaseActivity(), View.OnClickListener {
ContactNameText.visibility = View.GONE
ContactNameEditText.visibility = View.GONE
addressTitleText.text = getString(R.string.send_to_text)
addressEditText.addTextChangedListener(object : OnTextChanged() {
override fun onTextChanged(text: CharSequence, start: Int, before: Int, count: Int) {
if (text.contains("*")) {
doAsync {
addressEditText.setText(Federation.resolve(text.toString()).accountId)
}
}
}
})
}
Mode.UPDATE_CONTACT -> {
titleBalance.visibility = View.GONE
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/res/layout/activity_stellar_address.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,12 @@
android:background="@color/addressBackGroundColor"
android:textSize="15sp"
android:scrollHorizontally="true"
android:digits="@string/stellar_address_alphabet"
android:inputType="textCapCharacters"
android:hint="@string/send_address_hint"
android:singleLine="true"
android:importantForAutofill="no"
tool:text="ALAJSLDJFALSKDFJ2L3K4JLSDKFJL34KJ5LKSZJGFLKSJL4"
tool:ignore="UnusedAttribute" />
tool:ignore="UnusedAttribute"
android:inputType="text" />

<ImageButton
android:contentDescription="@string/open_camera_to_scan_qr"
Expand Down