Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ class AppContainer(private val context: Context) {
manager.stopShieldedSync()
}
manager.stopDashPaySync()
manager.stopDpnsSync()
} catch (e: Exception) {
android.util.Log.w(TAG, "Failed to stop sync coordinators", e)
}
Expand Down Expand Up @@ -287,6 +288,9 @@ class AppContainer(private val context: Context) {
if (!manager.isDashPaySyncRunning()) {
manager.startDashPaySync()
}
if (!manager.isDpnsSyncRunning()) {
manager.startDpnsSync()
}
} catch (e: Exception) {
android.util.Log.e(TAG, "Failed to bind wallet-scoped services", e)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import org.dashfoundation.example.ui.dashpay.HiddenContactsScreen
import org.dashfoundation.example.ui.dashpay.IgnoredContactsScreen
import org.dashfoundation.example.ui.dashpay.InvitationsScreen
import org.dashfoundation.example.ui.identity.DpnsTestScreen
import org.dashfoundation.example.ui.identity.DpnsMarketplaceScreen
import org.dashfoundation.example.ui.identity.IdentitiesHomeScreen
import org.dashfoundation.example.ui.identity.IdentityDetailScreen
import org.dashfoundation.example.ui.identity.KeyDetailScreen
Expand Down Expand Up @@ -181,6 +182,11 @@ fun AppNavHost(
SelectMainNameScreen(route.identityIdHex, navController)
}

composable<DpnsMarketplace> { entry ->
val route = entry.toRoute<DpnsMarketplace>()
DpnsMarketplaceScreen(route.identityIdHex, navController)
}

composable<KeysList> { entry ->
val route = entry.toRoute<KeysList>()
KeysListScreen(route.identityIdHex, navController)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ import kotlinx.serialization.Serializable
/** Pick the identity's main DPNS name (← `SelectMainNameView.swift`). */
@Serializable data class SelectMainName(val identityIdHex: String)

/** Browse, buy and manage DPNS marketplace names for one wallet identity. */
@Serializable data class DpnsMarketplace(val identityIdHex: String)

/** All public keys of an identity (← `KeysListView.swift`). */
@Serializable data class KeysList(val identityIdHex: String)

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import org.dashfoundation.example.di.LocalAppContainer
import org.dashfoundation.example.di.LocalAppState
import org.dashfoundation.example.navigation.ContestDetail
import org.dashfoundation.example.navigation.DashPayHome
import org.dashfoundation.example.navigation.DpnsMarketplace
import org.dashfoundation.example.navigation.KeysList
import org.dashfoundation.example.navigation.RegisterName
import org.dashfoundation.example.navigation.SelectMainName
Expand Down Expand Up @@ -353,6 +354,13 @@ fun IdentityDetailScreen(identityIdHex: String, navController: NavHostController
}
}
HorizontalDivider(Modifier.padding(vertical = 8.dp))
ListItem(
headlineContent = { Text("DPNS Marketplace") },
supportingContent = { Text("Browse, buy, price, transfer, and view history") },
modifier = Modifier
.clickable { navController.navigate(DpnsMarketplace(identityIdHex)) }
.testTag("identityDetail.dpnsMarketplace"),
)
ListItem(
headlineContent = { Text("Register Name") },
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,15 @@ val STORAGE_MODELS: List<StorageModel> = listOf(
headline = { row ->
"${row.text("label") ?: "?"}.${row.text("parentDomainName") ?: "dash"}"
},
subtitle = { row -> row.base58("identityId")?.let { truncateMiddle(it) } },
subtitle = { row ->
val ownership = if (row.bool("isOwned")) "owned" else when (row.long("saleStatusRaw")) {
1L -> "sold"
2L -> "transferred"
else -> "departed"
}
val price = row.long("priceCredits")?.let { " · $it credits" }.orEmpty()
"$ownership$price"
},
),
StorageModel(
name = "dashpayProfiles", displayName = "DashPay Profiles",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ private val DATE_COLUMNS = setOf(
"createdAt", "updatedAt", "lastUpdated", "lastUpdatedAt", "lastAccessedAt",
"lastAccessed", "lastSyncedAt", "eventTimestamp", "localCreatedAt",
"localUpdatedAt", "transferredAt",
"marketplaceUpdatedAt", "documentCreatedAtMs", "documentUpdatedAtMs",
"documentTransferredAtMs",
)

@Composable
Expand Down
Loading
Loading