Skip to content

Commit

Permalink
fix: broken inception (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrwbabylonlab authored Dec 6, 2024
1 parent 6c14552 commit 6903787
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/app/api/getDelegationsV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface DelegationV2API {
start_height: number;
end_height: number;
bbn_inception_height: number;
bbn_inception_time: number;
bbn_inception_time: string;
slashing_tx_hex: string;
};
delegation_unbonding: {
Expand Down
1 change: 0 additions & 1 deletion src/app/components/Staking/Staking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ export const Staking = () => {
defaultFeeRate,
stakingTimeBlocks,
estimateStakingFee,
showError,
]);

// Select the finality provider from the list
Expand Down
2 changes: 1 addition & 1 deletion src/app/hooks/storage/useDelegationStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function useDelegationStorage(
unbondingTxHex: "",
stakingSlashingTxHex: "",
bbnInceptionHeight: 0,
bbnInceptionTime: 0,
bbnInceptionTime: "",
slashingTxHex: "",
unbondingSlashingTxHex: "",
}) as DelegationV2,
Expand Down
4 changes: 2 additions & 2 deletions src/app/state/DelegationV2State.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ export function DelegationV2State({ children }: PropsWithChildren) {
fetchMoreDelegations: fetchNextPage,
}),
[
data?.delegations,
delegations,
isFetchingNextPage,
hasNextPage,
addPendingDelegation,
updateDelegationStatus,
fetchNextPage,
findDelegationByTxHash,
fetchNextPage,
],
);

Expand Down
2 changes: 1 addition & 1 deletion src/app/types/delegationsV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface DelegationV2 extends DelegationLike {
stakerBtcPkHex: string;
stakingTime: number;
bbnInceptionHeight: number;
bbnInceptionTime: number;
bbnInceptionTime: string;
startHeight: number;
endHeight: number;
unbondingTime: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { durationTillNow } from "@/utils/time";

interface Inscription {
interface Inception {
value: string;
}

export function Inscription({ value }: Inscription) {
export function Inception({ value }: Inception) {
const currentTime = Date.now();
return (
<div className="order-3 lg:order-1">
Expand Down
12 changes: 5 additions & 7 deletions src/components/delegations/DelegationList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { FinalityProviderMoniker } from "@/components/delegations/DelegationList

import { ActionButton } from "./components/ActionButton";
import { Amount } from "./components/Amount";
import { Inscription } from "./components/Inscription";
import { Inception } from "./components/Inception";
import { Status } from "./components/Status";
import { TxHash } from "./components/TxHash";

Expand All @@ -16,12 +16,10 @@ const columns: TableColumn<
{ handleActionClick: (action: string, txHash: string) => void }
>[] = [
{
field: "inscription",
headerName: "Inscription",
field: "Inception",
headerName: "Inception",
width: "max-content",
renderCell: (row) => (
<Inscription value={row.bbnInceptionHeight.toString()} />
),
renderCell: (row) => <Inception value={row.bbnInceptionTime} />,
},
{
field: "finalityProvider",
Expand All @@ -39,7 +37,7 @@ const columns: TableColumn<
},
{
field: "stakingTxHashHex",
headerName: "Transaction hash",
headerName: "Transaction ID",
renderCell: (row) => <TxHash value={row.stakingTxHashHex} />,
},
{
Expand Down

0 comments on commit 6903787

Please sign in to comment.