feat(wallet): flip to Cardano mainnet

- CardanoNetworkConfig.NETWORK = MAINNET
- Koios API: api.koios.rest (was preprod.koios.rest)
- Explorer: cardanoscan.io (was preprod.cardanoscan.io)
- Address prefix: addr1 (was addr_test1)
- WalletPanelNode: use config for explorer URL

To flip back to testnet, change one line:
  val NETWORK = CardanoNetwork.TESTNET
This commit is contained in:
Kayos 2026-03-29 08:44:10 -07:00
parent d975d7d761
commit dde0dd9f4f
2 changed files with 4 additions and 8 deletions

View file

@ -17,10 +17,10 @@ enum class CardanoNetwork {
/**
* Centralized network configuration for the Cardano wallet.
*
* To switch networks, change [NETWORK] to [CardanoNetwork.MAINNET].
* To switch networks, change [NETWORK] to [CardanoNetwork.TESTNET].
* All derived values (network ID, API URLs) will update automatically.
*
* **Current configuration: TESTNET (preprod)**
* **Current configuration: MAINNET**
*/
object CardanoNetworkConfig {
/**
@ -29,7 +29,7 @@ object CardanoNetworkConfig {
* Set to [CardanoNetwork.TESTNET] for development/testing.
* Set to [CardanoNetwork.MAINNET] for production.
*/
val NETWORK: CardanoNetwork = CardanoNetwork.TESTNET
val NETWORK: CardanoNetwork = CardanoNetwork.MAINNET
/**
* Cardano network ID.

View file

@ -55,11 +55,7 @@ class WalletPanelNode @AssistedInject constructor(
eventSink = { event ->
when (event) {
is WalletPanelEvent.OpenTransaction -> {
val url = if (CardanoNetworkConfig.NETWORK_NAME != "mainnet") {
"https://preprod.cardanoscan.io/transaction/${event.txHash}"
} else {
"https://cardanoscan.io/transaction/${event.txHash}"
}
val url = "${CardanoNetworkConfig.EXPLORER_BASE_URL}/transaction/${event.txHash}"
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
context.startActivity(intent)
}