diff --git a/src/app/api/getDelegations.ts b/src/app/api/getDelegations.ts index 412c9399..e0ef035a 100644 --- a/src/app/api/getDelegations.ts +++ b/src/app/api/getDelegations.ts @@ -54,8 +54,6 @@ export const getDelegations = async ( const params = { pagination_key: encode(key), - // "pagination_reverse": reverse, - // "pagination_limit": limit, staker_btc_pk: encode(publicKeyNoCoord), state: ["active", "unbonded"], }; @@ -90,7 +88,6 @@ export const getDelegations = async ( outputIndex: apiDelegation.unbonding_tx.output_index, } : undefined, - transitioned: apiDelegation.transitioned, isEligibleForTransition: apiDelegation.is_eligible_for_transition, }), ); diff --git a/src/app/components/Delegations/Delegation.tsx b/src/app/components/Delegations/Delegation.tsx index 4bedb4fa..619e7290 100644 --- a/src/app/components/Delegations/Delegation.tsx +++ b/src/app/components/Delegations/Delegation.tsx @@ -82,32 +82,34 @@ export const Delegation: React.FC = ({ }; const generateActionButton = () => { - if (delegation.isEligibleForTransition) { + if ( + state === DelegationState.ACTIVE || + delegation.isEligibleForTransition + ) { return ( -
- -
- ); - } else if (state === DelegationState.ACTIVE) { - return ( -
+
+
); } else if (state === DelegationState.UNBONDED) { diff --git a/src/app/types/delegations.ts b/src/app/types/delegations.ts index 1edd0194..a596639c 100644 --- a/src/app/types/delegations.ts +++ b/src/app/types/delegations.ts @@ -7,7 +7,6 @@ export interface Delegation { stakingTx: StakingTx; unbondingTx: UnbondingTx | undefined; isOverflow: boolean; - transitioned: boolean; isEligibleForTransition: boolean; } diff --git a/src/utils/getState.ts b/src/utils/getState.ts index e5520d60..f5104665 100644 --- a/src/utils/getState.ts +++ b/src/utils/getState.ts @@ -38,7 +38,7 @@ export const getState = (state: string) => { // Create state tooltips for the additional information export const getStateTooltip = (state: string) => { switch (state) { - case DelegationState.ACTIVE: + case DelegationState.ACTIVE: // active state is shwon return "Stake is active"; case DelegationState.UNBONDED: return "Stake has been unbonded";