Skip to content

Commit

Permalink
[#1348] Regenerate fixture wallet addresses
Browse files Browse the repository at this point in the history
Closes #1348
  • Loading branch information
HonzaR authored Jan 15, 2024
1 parent 3df4a42 commit 02fdb96
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this library adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- `WalletAddressFixture` fixture properties have been updated

## [2.0.4] - 2024-01-08

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ package cash.z.ecc.android.sdk.fixture

import cash.z.ecc.android.sdk.WalletInitMode
import cash.z.ecc.android.sdk.model.BlockHeight
import cash.z.ecc.android.sdk.model.Mainnet
import cash.z.ecc.android.sdk.model.PersistableWallet
import cash.z.ecc.android.sdk.model.SeedPhrase
import cash.z.ecc.android.sdk.model.Testnet
import cash.z.ecc.android.sdk.model.ZcashNetwork
import co.electriccoin.lightwallet.client.model.LightWalletEndpoint

object PersistableWalletFixture {
val NETWORK = ZcashNetwork.Testnet
val NETWORK = ZcashNetwork.Mainnet

val ENDPOINT = LightWalletEndpoint.Testnet
val ENDPOINT = LightWalletEndpoint.Mainnet

// These came from the mainnet 1500000.json file
@Suppress("MagicNumber")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class PersistableWalletTest {
assertTrue(jsonObject.has(PersistableWallet.KEY_BIRTHDAY))

assertEquals(PersistableWallet.VERSION_2, jsonObject.getInt(PersistableWallet.KEY_VERSION))
assertEquals(ZcashNetwork.Testnet.id, jsonObject.getInt(PersistableWallet.KEY_NETWORK_ID))
assertEquals(ZcashNetwork.Mainnet.id, jsonObject.getInt(PersistableWallet.KEY_NETWORK_ID))
assertEquals(
PersistableWalletFixture.SEED_PHRASE.joinToString(),
jsonObject.getString(PersistableWallet.KEY_SEED_PHRASE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ import cash.z.ecc.android.sdk.model.WalletAddress

object WalletAddressFixture {
// These fixture values are derived from the secret defined in PersistableWalletFixture

const val UNIFIED_ADDRESS_STRING = "Unified GitHub Issue #161"

@Suppress("MaxLineLength")
const val SAPLING_ADDRESS_STRING = "zs1hf72k87gev2qnvg9228vn2xt97adfelju2hm2ap4xwrxkau5dz56mvkeseer3u8283wmy7skt4u"
const val TRANSPARENT_ADDRESS_STRING = "t1QZMTZaU1EwXppCLL5dR6U9y2M4ph3CSPK"
@Suppress("MaxLineLength", "ktlint:standard:max-line-length")
const val UNIFIED_ADDRESS_STRING = "u1l9f0l4348negsncgr9pxd9d3qaxagmqv3lnexcplmufpq7muffvfaue6ksevfvd7wrz7xrvn95rc5zjtn7ugkmgh5rnxswmcj30y0pw52pn0zjvy38rn2esfgve64rj5pcmazxgpyuj"
const val SAPLING_ADDRESS_STRING = "zs1vp7kvlqr4n9gpehztr76lcn6skkss9p8keqs3nv8avkdtjrcctrvmk9a7u494kluv756jeee5k0"
const val TRANSPARENT_ADDRESS_STRING = "t1dRJRY7GmyeykJnMH38mdQoaZtFhn1QmGz"

suspend fun unified() = WalletAddress.Unified.new(UNIFIED_ADDRESS_STRING)

Expand Down

0 comments on commit 02fdb96

Please sign in to comment.