Skip to content

Fix Android Monad stake delegation routing#211

Merged
DRadmir merged 6 commits intomainfrom
fix/android-monad-stake-delegation-routing
Apr 24, 2026
Merged

Fix Android Monad stake delegation routing#211
DRadmir merged 6 commits intomainfrom
fix/android-monad-stake-delegation-routing

Conversation

@DRadmir
Copy link
Copy Markdown
Contributor

@DRadmir DRadmir commented Apr 23, 2026

Scope delegation lookup by state so multiple positions on the same validator (Active / Activating / Deactivating / AwaitingWithdrawal) open their own detail screen instead of collapsing to the first match.

Also hide the orphaned "Manage" header when the actions list is empty, and keep watch wallets off the Confirm screen when tapping an AwaitingWithdrawal row.

Scope delegation lookup by state so multiple positions on the same
validator (Active / Activating / Deactivating / AwaitingWithdrawal)
open their own detail screen instead of collapsing to the first match.

Also hide the orphaned "Manage" header when the actions list is empty,
and keep watch wallets off the Confirm screen when tapping an
AwaitingWithdrawal row.
@DRadmir DRadmir self-assigned this Apr 23, 2026

@Serializable
data class DelegationRoute(val validatorId: String, val delegationId: String)
data class DelegationRoute(val validatorId: String, val delegationId: String, val state: String)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to pass state to the route?

txType = type,
validatorId = delegation.value?.validator?.id,
delegationId = delegation.value?.base?.delegationId!!
delegationId = delegation.value?.base?.delegationId!!,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we avoid !! ?

DRadmir added 3 commits April 24, 2026 10:19
Make buildStake return nullable and null-guard callers via ?.let { call(it) }
to avoid force-unwrap on delegation / assetInfo state flows.
Remove the DelegationState parameter from delegation-related APIs and data access. Updated StakeDao to stop filtering by state, changed StakeRepository.getDelegation to accept only validatorId and delegationId, and removed DelegationState from routes, view models, screens, amount params, and call sites. Unused imports were cleaned up and tests adjusted to the new getDelegation signature. This simplifies delegation lookups by returning delegations regardless of state.
@DRadmir DRadmir force-pushed the fix/android-monad-stake-delegation-routing branch from 8fbad83 to 8d36d9c Compare April 24, 2026 18:26
DRadmir added 2 commits April 24, 2026 23:37
Replace the call to signWithdrawal with signStake and map the resulting signatures to ByteArray. Previously the code wrapped a single toByteArray() in a list; this change returns a list of ByteArray from signStake to match the signer API and support multiple signatures.
@DRadmir DRadmir merged commit ee187e3 into main Apr 24, 2026
1 of 2 checks passed
@DRadmir DRadmir deleted the fix/android-monad-stake-delegation-routing branch April 24, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants