-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 1.7.2206 #97
Version 1.7.2206 #97
Conversation
MrStahlfelge
commented
Mar 5, 2022
- Token information details
- Image NFT preview
- Token prices
- Xpubkey import and export Support derived addresses from public key on read-only mode #32
- Turkish translation
- Fixed crash on Italian translation
…WalletConfigUiLogic
Support read-only wallets with extended public key and exporting extended public key
…n when minted on ErgoPay and ColdWallet Signing Screens
…ns and tokens with prices #9
… flickering on refresh #9
…dd copy nft hash #9
* Create strings.xml Turkish translations of the application were made. * Changes based on comments from @root7z and @furkan-gnu * Activated tr for iOS Co-authored-by: Benjamin Schulte <[email protected]>
Token Enhancements
private val MIGRATION_5_6 = object : Migration(5, 6) { | ||
override fun migrate(database: SupportSQLiteDatabase) { | ||
database.execSQL("CREATE TABLE IF NOT EXISTS `token_price` (`tokenId` TEXT NOT NULL, `display_name` TEXT, `source` TEXT NOT NULL, `erg_value` TEXT NOT NULL, PRIMARY KEY(`tokenId`))") | ||
database.execSQL("CREATE TABLE IF NOT EXISTS `token_info` (`tokenId` TEXT NOT NULL, `issuing_box` TEXT NOT NULL, `minting_tx` TEXT NOT NULL, `display_name` TEXT NOT NULL, `description` TEXT NOT NULL, `decimals` INTEGER NOT NULL, `full_supply` INTEGER NOT NULL, `reg7` TEXT, `reg8` TEXT, `reg9` TEXT, `genuine_flag` INTEGER NOT NULL, `issuer_link` TEXT, `thumbnail_bytes` BLOB, `thunbnail_type` INTEGER NOT NULL, `updated_ms` INTEGER NOT NULL, PRIMARY KEY(`tokenId`))") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to make this SQL statements multi-line strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it is, but the statements are a 1:1 copy of the generated code from Room and I'd rather leave it this way. I'll make the explaining comment more eye-catching
@PrimaryKey val tokenId: String, | ||
@ColumnInfo(name = "display_name") val displayName: String?, | ||
@ColumnInfo(name = "source") val priceSource: String, | ||
@ColumnInfo(name = "erg_value") val ergValue: String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just out of curiosity, why not Long type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The token erg value can be fractional even compared to nanoergs, and actually is for most tokens. I have experimented with long value/decimals but had problems in deciding how many decimals should actually be used. Since JS developers settled to handle all of these types of values as strings and these are usually our sources, I decided to follow this practice for this application.
@PrimaryKey val tokenId: String, | ||
@ColumnInfo(name = "display_name") val displayName: String?, | ||
@ColumnInfo(name = "source") val priceSource: String, | ||
@ColumnInfo(name = "erg_value") val ergValue: String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just out of curiosity, why not a numeric type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doublicate of former comment?
|
||
} | ||
|
||
override fun showNftHashValidation(hashValid: Boolean?) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the hashValid is nullable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there was no comparison between the stored hash and the content hash made (yet), for example when there is no stored hash or content not yet downloaded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add a comment
null | ||
} | ||
|
||
fun getSerializedXpubKeyFromMnemonic(mnemonic: String) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to use SecretString in all new code. And do the necessary refactoring along the way to finally use SecretString for mnemonic everywhere (where possible).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - already done in PR #94 :-)
Unfortunately this has to wait for the upstream libraries to get merged.