Skip to content

Commit

Permalink
fix AccountPrefsRepositoryTest
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesmac committed Nov 19, 2024
1 parent 1127663 commit 06e8044
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,24 @@ class AccountPrefsRepositoryTest {
AccountPrefsRepository.getInstance(appContext)
prefsRepository.clearSavedAccountKey()

val testAccount = Account.random()

val panel = XyoPanel(
appContext, Account.random(), arrayListOf(Pair(apiDomainBeta, null)), listOf(
appContext, testAccount, arrayListOf(Pair(apiDomainBeta, null)), listOf(
XyoSystemInfoWitness()
)
)
panel.resolveNodes()
val generatedAddress = panel.defaultAccount?.address?.toHexString()
val generatedAddress = panel.account.address.toHexString()
assertNotEquals(generatedAddress, null)

val panel2 = XyoPanel(
appContext, Account.random(), arrayListOf(Pair(apiDomainBeta, null)), listOf(
appContext, testAccount, arrayListOf(Pair(apiDomainBeta, null)), listOf(
XyoSystemInfoWitness()
)
)
panel2.resolveNodes()
val secondGeneratedAddress = panel2.defaultAccount?.address?.toHexString()
val secondGeneratedAddress = panel2.account.address.toHexString()
assertEquals(generatedAddress, secondGeneratedAddress)
}
}
Expand Down
1 change: 0 additions & 1 deletion sdk/src/main/java/network/xyo/client/XyoPanel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class XyoPanel(
private val nodeUrlsAndAccounts: ArrayList<Pair<String, AccountInstance?>>?
) {
private var nodes: MutableList<NodeClient>? = null
var defaultAccount: AccountInstance? = null

@Deprecated("use constructors without deprecated archive field")
constructor(
Expand Down

0 comments on commit 06e8044

Please sign in to comment.