Updated on 2026-08-14
This commit is contained in:
parent
c28ad0229e
commit
907c5577f5
7 changed files with 11 additions and 3 deletions
|
|
@ -43,6 +43,7 @@ class PersonalizeResources() {
|
|||
private fun initCardNumber(holder: TypedHolder<Id, Resources>) {
|
||||
holder.register(CardNumber.Series, Resources(R.string.pers_item_series, R.string.info_pers_item_series))
|
||||
holder.register(CardNumber.Number, Resources(R.string.pers_item_number, R.string.info_pers_item_number))
|
||||
holder.register(CardNumber.BatchId, Resources(R.string.pers_item_batch_id, R.string.info_pers_item_batch_id))
|
||||
}
|
||||
|
||||
private fun initCommon(holder: TypedHolder<Id, Resources>) {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ enum class BlockId : PersonalizeId {
|
|||
enum class CardNumber : BlockItem {
|
||||
Series,
|
||||
Number,
|
||||
BatchId,
|
||||
}
|
||||
|
||||
enum class Common : BlockItem {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ class IdToValueAssociations : BaseTypedHolder<Id, Value>() {
|
|||
fun init(from: PersonalizeConfig) {
|
||||
register(CardNumber.Series, Value(from.series))
|
||||
register(CardNumber.Number, Value(from.startNumber))
|
||||
register(CardNumber.BatchId, Value(from.batchId))
|
||||
register(Common.Curve, Value(from.curveID, Helper.listOfCurves()))
|
||||
register(Common.Blockchain, Value(from.blockchain, Helper.listOfBlockchain()))
|
||||
register(Common.BlockchainCustom, Value(""))
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ class PersonalizeConfigConverter {
|
|||
val block = createBlock(BlockId.CardNumber)
|
||||
mutableListOf(
|
||||
CardNumber.Series,
|
||||
CardNumber.Number
|
||||
CardNumber.Number,
|
||||
CardNumber.BatchId
|
||||
).forEach { createItem(block, it as Id) }
|
||||
return block
|
||||
}
|
||||
|
|
@ -227,7 +228,7 @@ class PersonalizeConfigConverter {
|
|||
|
||||
val cardData = CardData(
|
||||
blockchainName = applyConfig.blockchain,
|
||||
batchId = applyConfig.cardData.batch,
|
||||
batchId = applyConfig.batchId,
|
||||
productMask = productMask,
|
||||
tokenSymbol = tokenSymbol,
|
||||
tokenContractAddress = tokenContractAddress,
|
||||
|
|
@ -316,7 +317,7 @@ class IdItemHelper {
|
|||
)
|
||||
|
||||
val editTextList = mutableListOf(
|
||||
CardNumber.Series, Common.BlockchainCustom, SignHashExProp.CryptoExKey, Token.Symbol,
|
||||
CardNumber.Series, CardNumber.BatchId, Common.BlockchainCustom, SignHashExProp.CryptoExKey, Token.Symbol,
|
||||
Token.ContractAddress, Pins.Pin, Pins.Pin2, Pins.Pin3, Pins.Cvc, SettingsMaskNdef.AarCustom
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ class ValueMapper {
|
|||
val export = PersonalizeConfig()
|
||||
export.series = getTyped(CardNumber.Series, defaultConfig.series)
|
||||
export.startNumber = getTyped(CardNumber.Number, defaultConfig.startNumber)
|
||||
export.batchId = getTyped(CardNumber.BatchId, defaultConfig.batchId)
|
||||
export.curveID = getTyped(Common.Curve, defaultConfig.curveID)
|
||||
export.blockchain = getTyped(Common.Blockchain, defaultConfig.blockchain)
|
||||
export.blockchainCustom = getTyped(Common.BlockchainCustom, defaultConfig.blockchainCustom)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ class PersonalizeConfig {
|
|||
// Card number
|
||||
var series = "BB"
|
||||
var startNumber: Long = 300000000000
|
||||
var batchId = "ffff"
|
||||
|
||||
|
||||
// Common
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
<string name="pers_item_series">Series</string>
|
||||
<string name="pers_item_number">Number</string>
|
||||
<string name="pers_item_batch_id">Batch ID</string>
|
||||
<string name="pers_item_curve">Curve</string>
|
||||
<string name="pers_item_blockchain">Blockchain</string>
|
||||
<string name="pers_item_custom_blockchain">Custom blockchain</string>
|
||||
|
|
@ -86,6 +87,7 @@
|
|||
|
||||
<string name="info_pers_item_series"></string>
|
||||
<string name="info_pers_item_number"></string>
|
||||
<string name="info_pers_item_batch_id"></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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue