Upgrade kotlin-bip39-jvm to 1.0.6

Bip39ComparisionTest was run before and after upgrading org.bitcoinj:bitcoinj-core to latest version to ensure that kotlin-bip39 is still behaving the same.

A small tweak in WordListTest was needed because WorldList constructor was made internal.
This commit is contained in:
Torsten Grote 2023-10-09 10:04:10 -03:00
parent bc90378edf
commit 74566b902a
No known key found for this signature in database
GPG key ID: 3E5F77D92CF891FF
5 changed files with 5 additions and 6 deletions

View file

@ -134,8 +134,8 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: "${rootProject.rootDir}/libs/koin-android") implementation fileTree(include: ['*.jar'], dir: "${rootProject.rootDir}/libs/koin-android")
implementation fileTree(include: ['*.aar'], dir: "${rootProject.rootDir}/libs/koin-android") implementation fileTree(include: ['*.aar'], dir: "${rootProject.rootDir}/libs/koin-android")
// implementation "cash.z.ecc.android:kotlin-bip39:1.0.4" // implementation "cash.z.ecc.android:kotlin-bip39:1.0.6"
implementation fileTree(include: ['kotlin-bip39-jvm-1.0.4.jar'], dir: "${rootProject.rootDir}/libs") implementation fileTree(include: ['kotlin-bip39-jvm-1.0.6.jar'], dir: "${rootProject.rootDir}/libs")
/** /**
* Test Dependencies (do not concern the AOSP build) * Test Dependencies (do not concern the AOSP build)
@ -153,7 +153,7 @@ dependencies {
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit5_version" testImplementation "org.junit.jupiter:junit-jupiter-api:$junit5_version"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit5_version" testImplementation "org.junit.jupiter:junit-jupiter-params:$junit5_version"
testImplementation "io.mockk:mockk:$mockk_version" testImplementation "io.mockk:mockk:$mockk_version"
testImplementation 'org.bitcoinj:bitcoinj-core:0.15.10' testImplementation 'org.bitcoinj:bitcoinj-core:0.16.2'
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5_version"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:$junit5_version" testRuntimeOnly "org.junit.vintage:junit-vintage-engine:$junit5_version"

View file

@ -1,7 +1,6 @@
package com.stevesoltys.seedvault.crypto package com.stevesoltys.seedvault.crypto
import cash.z.ecc.android.bip39.Mnemonics import cash.z.ecc.android.bip39.Mnemonics
import cash.z.ecc.android.bip39.WordList
import cash.z.ecc.android.bip39.toSeed import cash.z.ecc.android.bip39.toSeed
import com.stevesoltys.seedvault.toHexString import com.stevesoltys.seedvault.toHexString
import com.stevesoltys.seedvault.ui.recoverycode.toMnemonicChars import com.stevesoltys.seedvault.ui.recoverycode.toMnemonicChars
@ -2066,7 +2065,7 @@ class WordListTest {
@Test @Test
fun `word list of library did not change`() { fun `word list of library did not change`() {
val libWords = WordList().words val libWords = Mnemonics.getCachedWords("en")
for (i in words.indices) { for (i in words.indices) {
assertEquals(words[i], libWords[i]) assertEquals(words[i], libWords[i])
} }

View file

@ -1,5 +1,5 @@
java_import { java_import {
name: "seedvault-lib-kotlin-bip39", name: "seedvault-lib-kotlin-bip39",
jars: ["kotlin-bip39-jvm-1.0.4.jar"], jars: ["kotlin-bip39-jvm-1.0.6.jar"],
sdk_version: "current", sdk_version: "current",
} }

Binary file not shown.

Binary file not shown.