Updated on 2026-08-14
This commit is contained in:
parent
a710e7de77
commit
926c92f700
8 changed files with 114 additions and 84 deletions
|
|
@ -120,7 +120,7 @@ internal class Notifier(private val vm: ParamsViewModel) {
|
|||
when (taskEvent.error) {
|
||||
is TaskError.UserCancelled -> {
|
||||
if (notShowedError == null) {
|
||||
vm.seError.postValue("User was cancelled")
|
||||
vm.seError.postValue("User canceled the action")
|
||||
} else {
|
||||
vm.seError.postValue("${notShowedError!!::class.simpleName}")
|
||||
notShowedError = null
|
||||
|
|
|
|||
|
|
@ -27,11 +27,16 @@ abstract class DescriptionWidget<D>(
|
|||
}
|
||||
|
||||
private fun initDescriptionWidget() {
|
||||
getResDescription()?.let { tvDescription?.setText(it) }
|
||||
dataItem.viewModel.viewState.onDescriptionVisibilityChanged = { changeDescriptionVisibility(it) }
|
||||
}
|
||||
|
||||
protected fun changeDescriptionVisibility(state: Int) {
|
||||
val tv = tvDescription ?: return
|
||||
val descriptionId = getResDescription() ?: return
|
||||
val description = tv.context.getString(descriptionId)
|
||||
if (description.isEmpty()) return
|
||||
|
||||
tv.text = description
|
||||
TransitionManager.beginDelayedTransition(view.parent as ViewGroup, AutoTransition())
|
||||
descriptionContainer.visibility = state
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/action_name"
|
||||
tools:text="Action method" />
|
||||
|
||||
<include
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@
|
|||
android:id="@+id/tv_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/colorPrimary" />
|
||||
android:textColor="@color/field_description" />
|
||||
|
||||
</FrameLayout>
|
||||
|
|
@ -6,6 +6,9 @@
|
|||
|
||||
<color name="delimiter">#26000000</color>
|
||||
|
||||
<color name="action_name">#2B2B2B</color>
|
||||
<color name="field_description">#888888</color>
|
||||
|
||||
<color name="switchTrack">#C6C6C6</color>
|
||||
<color name="switchTrackActive">#FFE391</color>
|
||||
<color name="switchThumb">#FFFFFF</color>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="action_card_scan">Scan</string>
|
||||
<string name="action_card_scan">Read Card</string>
|
||||
<string name="action_card_sign">Sign</string>
|
||||
<string name="action_personalize">Personalize</string>
|
||||
<string name="action_depersonalize">Depersonalize</string>
|
||||
|
|
@ -13,11 +13,12 @@
|
|||
<string name="action_issuer_write_ex_data">Write issuer extra data</string>
|
||||
<string name="action_user_read_data">Read user data</string>
|
||||
<string name="action_user_write_data">Write user data</string>
|
||||
|
||||
<string name="info_action_card_scan">SomeDescription</string>
|
||||
<string name="info_action_card_sign">SomeDescription</string>
|
||||
<string name="info_action_personalize">SomeDescription</string>
|
||||
<string name="info_action_depersonalize">SomeDescription</string>
|
||||
|
||||
<string name="info_action_card_scan">This command returns all data about the card and the wallet, including unique card number (CID) that has to be submitted while calling all other commands</string>
|
||||
<string name="info_action_card_sign">Depending on Signing_Method parameter defined during personalization, this command signs data using Wallet_PrivateKey</string>
|
||||
<string name="info_action_personalize">Personalization is an initialization procedure, required before start using a card. During this procedure all card setting are performed. During this procedure all data exchange are encrypted because it\'s usually done at the third-party factory.</string>
|
||||
<string name="info_action_depersonalize">This command reset card to initial state - erase all data, writed during previous personalization and previous usage.
|
||||
\nCommand available on SDK cards only</string>
|
||||
<string name="info_action_wallet_create">SomeDescription</string>
|
||||
<string name="info_action_wallet_purge">SomeDescription</string>
|
||||
<string name="info_action_issuer_read_data">SomeDescription</string>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="personalize">Personalize</string>
|
||||
<string name="depersonalize">Depersonalize</string>
|
||||
<string name="pers_block_card_number">Card number</string>
|
||||
<string name="pers_block_common">Common</string>
|
||||
<string name="pers_block_signing_method">Signing method</string>
|
||||
|
|
@ -12,7 +14,7 @@
|
|||
<string name="pers_block_settings_mask_protocol_enc">Settings mask protocol encryption</string>
|
||||
<string name="pers_block_settings_mask_ndef">Settings mask ndef</string>
|
||||
<string name="pers_block_pins">Pins</string>
|
||||
|
||||
|
||||
<string name="pers_item_series">Series</string>
|
||||
<string name="pers_item_number">Number</string>
|
||||
<string name="pers_item_curve">Curve</string>
|
||||
|
|
@ -46,7 +48,7 @@
|
|||
<string name="pers_item_forbid_purge">Forbid purge</string>
|
||||
<string name="pers_item_allow_select_blockchain">Allow select blockchain</string>
|
||||
<string name="pers_item_use_block">Use block</string>
|
||||
<string name="pers_item_one_apdu_at_once">One APDU at once</string>
|
||||
<string name="pers_item_one_apdu_at_once">One session – one command</string>
|
||||
<string name="pers_item_use_cvc">Use CVC</string>
|
||||
<string name="pers_item_allow_swap_pin">Allow swap PIN</string>
|
||||
<string name="pers_item_allow_swap_pin2">Allow swap PIN2</string>
|
||||
|
|
@ -69,74 +71,90 @@
|
|||
<string name="pers_item_pin3">PIN3</string>
|
||||
<string name="pers_item_cvc">CVC</string>
|
||||
<string name="pers_item_pause_before_pin2">Pause before PIN2</string>
|
||||
|
||||
<string name="info_pers_block_card_number">Description for the field: Card number</string>
|
||||
<string name="info_pers_block_common">Description for the field: Common</string>
|
||||
<string name="info_pers_block_signing_method">Description for the field: Signing method</string>
|
||||
<string name="info_pers_block_sign_hash_ex_prop">Description for the field: Sign hash external properties</string>
|
||||
<string name="info_pers_block_denomination">Description for the field: Denomination</string>
|
||||
<string name="info_pers_block_token">Description for the field: Token</string>
|
||||
<string name="info_pers_block_product_mask">Description for the field: Product mask</string>
|
||||
<string name="info_pers_block_settings_mask">Description for the field: Settings mask</string>
|
||||
<string name="info_pers_block_settings_mask_protocol_enc">Description for the field: Settings mask protocol encryption</string>
|
||||
<string name="info_pers_block_settings_mask_ndef">Description for the field: Settings mask ndef</string>
|
||||
<string name="info_pers_block_pins">Description for the field: Pins</string>
|
||||
|
||||
<string name="info_pers_item_series">Description for the field: Series</string>
|
||||
<string name="info_pers_item_number">Description for the field: Number</string>
|
||||
<string name="info_pers_item_curve">Description for the field: Curve</string>
|
||||
<string name="info_pers_item_blockchain">Description for the field: Blockchain</string>
|
||||
<string name="info_pers_item_custom_blockchain">Description for the field: Custom blockchain</string>
|
||||
<string name="info_pers_item_max_signatures">Description for the field: Max signatures</string>
|
||||
<string name="info_pers_item_create_wallet">Description for the field: Create wallet</string>
|
||||
<string name="info_pers_item_sign_tx_hashes">Description for the field: Sign TX hashes (0)</string>
|
||||
<string name="info_pers_item_sign_raw_tx">Description for the field: Sign raw TX (1)</string>
|
||||
<string name="info_pers_item_sign_validated_tx_hashes">Description for the field: Sign validated TX hashes (2)</string>
|
||||
<string name="info_pers_item_sign_validated_raw_tx">Description for the field: Sign validated raw TX (3)</string>
|
||||
<string name="info_pers_item_sign_validated_tx_hashes_with_iss_data">Description for the field: Sign validated TX hashes with issuer data (4)</string>
|
||||
<string name="info_pers_item_sign_validated_raw_tx_with_iss_data">Description for the field: Sign validated raw TX with issuer data (5)</string>
|
||||
<string name="info_pers_item_sign_hash_ex">Description for the field: Sign hash external (6)</string>
|
||||
<string name="info_pers_item_pin_less_floor_limit">Description for the field: Pin-less floor limit</string>
|
||||
<string name="info_pers_item_cr_ex_key">Description for the field: Cr(ypto)Ex(tract) key</string>
|
||||
<string name="info_pers_item_require_terminal_cert_sig">Description for the field: Require terminal Cert signature</string>
|
||||
<string name="info_pers_item_require_terminal_tx_sig">Description for the field: Require terminal TX signature</string>
|
||||
<string name="info_pers_item_check_pin3_on_card">Description for the field: Check PIN3 on card</string>
|
||||
<string name="info_pers_item_write_on_personalize">Description for the field: Write on personalize</string>
|
||||
<string name="info_pers_item_denomination">Description for the field: Denomination</string>
|
||||
<string name="info_pers_item_its_token">Description for the field: It\'s token</string>
|
||||
<string name="info_pers_item_symbol">Description for the field: Symbol</string>
|
||||
<string name="info_pers_item_contract_address">Description for the field: Contract address</string>
|
||||
<string name="info_pers_item_decimal">Description for the field: Decimal</string>
|
||||
<string name="info_pers_item_note">Description for the field: Note</string>
|
||||
<string name="info_pers_item_tag">Description for the field: Tag</string>
|
||||
<string name="info_pers_item_id_card">Description for the field: ID card</string>
|
||||
<string name="info_pers_item_is_reusable">Description for the field: Is reusable</string>
|
||||
<string name="info_pers_item_need_activation">Description for the field: Need activation</string>
|
||||
<string name="info_pers_item_forbid_purge">Description for the field: Forbid purge</string>
|
||||
<string name="info_pers_item_allow_select_blockchain">Description for the field: Allow select blockchain</string>
|
||||
<string name="info_pers_item_use_block">Description for the field: Use block</string>
|
||||
<string name="info_pers_item_one_apdu_at_once">Description for the field: One APDU at once</string>
|
||||
<string name="info_pers_item_use_cvc">Description for the field: Use CVC</string>
|
||||
<string name="info_pers_item_allow_swap_pin">Description for the field: Allow swap PIN</string>
|
||||
<string name="info_pers_item_allow_swap_pin2">Description for the field: Allow swap PIN2</string>
|
||||
<string name="info_pers_item_forbid_default_pin">Description for the field: Forbid default PIN</string>
|
||||
<string name="info_pers_item_smart_security_delay">Description for the field: Smart Security Delay</string>
|
||||
<string name="info_pers_item_protect_issuer_data_against_replay">Description for the field: Protect issuer data against replay</string>
|
||||
<string name="info_pers_item_skip_security_delay_if_validated">Description for the field: Security delay if validated</string>
|
||||
<string name="info_pers_item_skip_pin2_and_cvc_if_validated">Description for the field: Skip PIN2 and CVC if validated</string>
|
||||
<string name="info_pers_item_skip_security_delay_on_linked_terminal">Description for the field: Skip security delay on linked terminal</string>
|
||||
<string name="info_pers_item_restrict_overwrite_ex_issuer_data">Description for the field: Restrict overwrite extra issuer data</string>
|
||||
<string name="info_pers_item_allow_unencrypted">Description for the field: Allow unencrypted</string>
|
||||
<string name="info_pers_item_allow_fast_encryption">Description for the field: Allow \'FAST\' encryption</string>
|
||||
<string name="info_pers_item_use_ndef">Description for the field: Use NDEF</string>
|
||||
<string name="info_pers_item_dynamic_ndef">Description for the field: Dynamic NDEF</string>
|
||||
<string name="info_pers_item_disable_precomputed_ndef">Description for the field: Disable precomputed NDEF</string>
|
||||
<string name="info_pers_item_aar">Description for the field: AAR</string>
|
||||
<string name="info_pers_item_custom_aar_package_name">Description for the field: Custom AAR package name</string>
|
||||
<string name="info_pers_item_pin">Description for the field: PIN</string>
|
||||
<string name="info_pers_item_pin2">Description for the field: PIN2</string>
|
||||
<string name="info_pers_item_pin3">Description for the field: PIN3</string>
|
||||
<string name="info_pers_item_cvc">Description for the field: CVC</string>
|
||||
<string name="info_pers_item_pause_before_pin2">Description for the field: Pause before PIN2</string>
|
||||
|
||||
<string name="info_pers_block_card_number">Unique Tangem card ID number. It will be generated automatically with Series and Number.</string>
|
||||
<string name="info_pers_block_common"></string>
|
||||
<string name="info_pers_block_signing_method">Depending on these parameters, SIGN command signs following data using Wallet_PrivateKey: array of transaction hashes, single raw transaction. In case the card issuer supports 2FA, the card will firstly verify issuer’s signature of transaction hash before signing transaction hash using Wallet_PrivateKey. In case the card issuer requires the card to store additional data (e.g. wallet balance, SPV proof, timestamps, etc. – see details in Security section), COS will verify issuer’s signature of hash of concatenated transaction hashes and Issuer_Data hash, and issuer’s signature of Issuer_Data hash, and then proceed to signing transaction hash using Wallet_PrivateKey.</string>
|
||||
<string name="info_pers_block_sign_hash_ex_prop"></string>
|
||||
<string name="info_pers_block_denomination"></string>
|
||||
<string name="info_pers_block_token">These fields can be used by the host application to provide additional infromation about tokens stored within the wallet of the card.</string>
|
||||
<string name="info_pers_block_product_mask">These fields can be used by the host application to provide additional infromation about product type.</string>
|
||||
<string name="info_pers_block_settings_mask"></string>
|
||||
<string name="info_pers_block_settings_mask_protocol_enc">Card Operation System supports three options of communication</string>
|
||||
<string name="info_pers_block_settings_mask_ndef"></string>
|
||||
<string name="info_pers_block_pins"></string>
|
||||
|
||||
<string name="info_pers_item_series"></string>
|
||||
<string name="info_pers_item_number"></string>
|
||||
<string name="info_pers_item_curve">Elliptic curve used for all wallet key operations. Supported curves: ‘secp256k1’, ‘ed25519’.</string>
|
||||
<string name="info_pers_item_blockchain">Name of the blockchain. It\'s just a textfield in the card. It\'s needed for host app to tell what blockchain should it use. </string>
|
||||
<string name="info_pers_item_custom_blockchain">You can use this field, to create something special</string>
|
||||
<string name="info_pers_item_max_signatures">Total number of signatures allowed for the wallet when the card was personalized</string>
|
||||
<string name="info_pers_item_create_wallet">Off - don’t create wallet (user must be create wallet by himself with App)
|
||||
\nOn - create wallet (after personalization wallet alredy will be created and card ready to use)</string>
|
||||
<string name="info_pers_item_sign_tx_hashes">Allow card to sign hashed transaction</string>
|
||||
<string name="info_pers_item_sign_raw_tx">Allow card to sign raw transaction. The raw transaction will be hashed by a hash function before signing.</string>
|
||||
<string name="info_pers_item_sign_validated_tx_hashes">Allow card to sign hashed transaction, that was signed by issuer before</string>
|
||||
<string name="info_pers_item_sign_validated_raw_tx">Allow card to sign raw transaction, that was signed by issuer before</string>
|
||||
<string name="info_pers_item_sign_validated_tx_hashes_with_iss_data">Allow card to sign hashed transaction, that was signed by issuer before, and update issuer data at the same time</string>
|
||||
<string name="info_pers_item_sign_validated_raw_tx_with_iss_data">Allow card to sign raw transaction, that was signed by issuer before, and update issuer data at the same time</string>
|
||||
<string name="info_pers_item_sign_hash_ex">Allow card to sign POS transactions</string>
|
||||
<string name="info_pers_item_pin_less_floor_limit"></string>
|
||||
<string name="info_pers_item_cr_ex_key">Unique card secret key (shared with acquirers server)</string>
|
||||
<string name="info_pers_item_require_terminal_cert_sig"></string>
|
||||
<string name="info_pers_item_require_terminal_tx_sig"></string>
|
||||
<string name="info_pers_item_check_pin3_on_card"></string>
|
||||
<string name="info_pers_item_write_on_personalize"></string>
|
||||
<string name="info_pers_item_denomination"></string>
|
||||
<string name="info_pers_item_its_token"></string>
|
||||
<string name="info_pers_item_symbol">Symbol of the token</string>
|
||||
<string name="info_pers_item_contract_address">Token\'s Smart contract address</string>
|
||||
<string name="info_pers_item_decimal">Number of decimals in token value</string>
|
||||
<string name="info_pers_item_note">Self-custodial wallet or note</string>
|
||||
<string name="info_pers_item_tag">Anti-counterfeit tag</string>
|
||||
<string name="info_pers_item_id_card">Personal ID card</string>
|
||||
<string name="info_pers_item_is_reusable">Defines what happens when user calls PURGE_WALLET command:
|
||||
\nOff - Card will switch to Purged state
|
||||
\nOn - Card will switch to Empty state and let create a new wallet again
|
||||
</string>
|
||||
<string name="info_pers_item_need_activation"></string>
|
||||
<string name="info_pers_item_forbid_purge">If this option is turned on, card will reject PURGE_WALLET command</string>
|
||||
<string name="info_pers_item_allow_select_blockchain">If this option is turned on, wallet elliptic curve and blockchain information can be changed on CREATE_WALLET command</string>
|
||||
<string name="info_pers_item_use_block"></string>
|
||||
<string name="info_pers_item_one_apdu_at_once">Card will execute only one command during one communication session, thus requiring user to physically take the card away from the host after each action (all commands except for READ_CARD)</string>
|
||||
<string name="info_pers_item_use_cvc">All commands requiring PIN2 will also require additional CVC code printed on the card</string>
|
||||
<string name="info_pers_item_allow_swap_pin">Is user allowed to change PIN1 with SET_PIN command</string>
|
||||
<string name="info_pers_item_allow_swap_pin2">Is user allowed to change PIN2 with SET_PIN command</string>
|
||||
<string name="info_pers_item_forbid_default_pin">SET_PIN commands will not change PIN1 to default value (‘000000’)</string>
|
||||
<string name="info_pers_item_smart_security_delay">Security delay Pause_Before_PIN2 will not be applied if PIN2 is not default</string>
|
||||
<string name="info_pers_item_protect_issuer_data_against_replay">Off – No replay protection on write issuer data
|
||||
\nOn – Enable replay protection on write issuer data (card will require additional Issuer_Data_Counter incremented on each write)
|
||||
</string>
|
||||
<string name="info_pers_item_skip_security_delay_if_validated">Off – Enforce security delay in SIGN command if the issuer validates the transaction (for signing methods 2, 3, 4 and 5)
|
||||
\nOn – Skip security delay in SIGN command if the issuer validates the transaction (for signing methods 2, 3, 4 and 5)
|
||||
</string>
|
||||
<string name="info_pers_item_skip_pin2_and_cvc_if_validated">Off – Require and check PIN2 and CVC in SIGN command if the issuer validates the transaction (for signing method 2, 3, 4 and 5)
|
||||
\nOn – Skip checking PIN2 and CVC in SIGN command if the issuer validates the transaction (for signing method 2, 3, 4 and 5)
|
||||
</string>
|
||||
<string name="info_pers_item_skip_security_delay_on_linked_terminal">App can optionally generate ECDSA key pair Terminal_PrivateKey / Terminal_PublicKey. And then submit Terminal_PublicKey to the card in any SIGN command. Once SIGN is successfully executed by COS, including PIN2 verification and/or completion of security delay, the submitted Terminal_PublicKey key is stored by COS. After that, the App instance is deemed trusted by COS and COS will allow skipping security delay for subsequent SIGN operations thus improving convenience without sacrificing security.</string>
|
||||
<string name="info_pers_item_restrict_overwrite_ex_issuer_data">Prohibit overwriting Issuer_Extra_Data</string>
|
||||
<string name="info_pers_item_allow_unencrypted">Allow plain data packets with non-encrypted Payload:
|
||||
\nThis option is not recommended for large-scale commercial projects, because it potentially exposes the card to eavesdropping and replay attacks. </string>
|
||||
<string name="info_pers_item_allow_fast_encryption">Allow Fast symmetric encryption with mutual challenges</string>
|
||||
<string name="info_pers_item_use_ndef">Whether the card should emulate NDEF. In default configuration, two NDEF records are loaded during personalization: (1) Tangem web site address, (2) name of Android App package in Google Play Store.</string>
|
||||
<string name="info_pers_item_dynamic_ndef">Tangem card supports a special wallet validation mechanism for smartphones that can only read NDEF tags
|
||||
\nOff – Disable dynamic generation of NDEF for iOS
|
||||
\nOn – Enable dynamic NDEF for iOS
|
||||
</string>
|
||||
<string name="info_pers_item_disable_precomputed_ndef">Off – Enable precomputed dynamic NDEF to work around iPhone 7+ NFC bug
|
||||
\nOn – Disable precomputed dynamic NDEF
|
||||
</string>
|
||||
<string name="info_pers_item_aar">Android Application Record. Android Application ID, Package name of Android apllication. Android OS will open this app or send user to Google Play page if it\'s not installed. If this field is empty, Android OS will try to open URI from URI field.</string>
|
||||
<string name="info_pers_item_custom_aar_package_name"></string>
|
||||
<string name="info_pers_item_pin">PIN1 code to access the card. Default unhashed value: ‘000000’.</string>
|
||||
<string name="info_pers_item_pin2">PIN2 code to confirm transaction signatures and swap PIN operations. Default unhashed value: ‘000’.</string>
|
||||
<string name="info_pers_item_pin3">PIN3 code to confirm POS transaction with amount that exceed pin-less floor limit.</string>
|
||||
<string name="info_pers_item_cvc">3-digit code, that can be printed on the card</string>
|
||||
<string name="info_pers_item_pause_before_pin2">Delay in seconds before COS executes commands protected by PIN2</string>
|
||||
|
||||
</resources>
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="tlv_card_id">Card Id</string>
|
||||
<string name="tlv_transaction_out_hash">Transaction out hash</string>
|
||||
<string name="tlv_card_id">Card Id (CID)</string>
|
||||
<string name="tlv_transaction_out_hash">Hash to sign</string>
|
||||
|
||||
<string name="info_tlv_card_id">Unique Tangem card ID number</string>
|
||||
<string name="info_tlv_transaction_out_hash">Hashed transaction you want to be signed </string>
|
||||
|
||||
<string name="info_tlv_card_id">SomeTlvDescription</string>
|
||||
<string name="info_tlv_transaction_out_hash">SomeTlvDescription</string>
|
||||
</resources>
|
||||
Loading…
Add table
Add a link
Reference in a new issue