Skip to content
Open
Changes from all commits
Commits
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
125 changes: 99 additions & 26 deletions components/StakeTransactions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,16 @@ const Index = ({ delegator, transcoders, currentRound, isMyAccount }) => {
>
<Flex
css={{
alignItems: "flex-start",
flexDirection: "column",
gap: "$3",
width: "100%",
alignItems: "center",
justifyContent: "space-between",
"@bp2": {
alignItems: "center",
flexDirection: "row",
gap: 0,
},
}}
>
<Box>
Expand All @@ -75,24 +82,55 @@ const Index = ({ delegator, transcoders, currentRound, isMyAccount }) => {
days.
</Text>
</Box>
<Flex css={{ alignItems: "center" }}>
{isMyAccount &&
(isBonded ? (
<Redelegate
unbondingLockId={lock.unbondingLockId}
newPosPrev={newPosPrev}
newPosNext={newPosNext}
/>
) : (
<RedelegateFromUndelegated
unbondingLockId={lock.unbondingLockId}
delegate={lock.delegate.id}
newPosPrev={newPosPrev}
newPosNext={newPosNext}
/>
))}
<Box css={{ marginLeft: "$4" }}>
{" "}
<Flex
css={{
alignItems: "center",
flexDirection: "column",
gap: "$2",
width: "100%",
"@bp2": {
flexDirection: "row",
width: "auto",
justifyContent: "flex-end",
gap: 0,
},
}}
>
{isMyAccount && (
<Flex
css={{
justifyContent: "flex-start",
width: "100%",
"@bp2": {
width: "auto",
},
}}
>
{isBonded ? (
<Redelegate
unbondingLockId={lock.unbondingLockId}
newPosPrev={newPosPrev}
newPosNext={newPosNext}
/>
) : (
<RedelegateFromUndelegated
unbondingLockId={lock.unbondingLockId}
delegate={lock.delegate.id}
newPosPrev={newPosPrev}
newPosNext={newPosNext}
/>
)}
</Flex>
)}
<Box
css={{
alignSelf: "flex-end",
"@bp2": {
alignSelf: "auto",
marginLeft: "$4",
},
}}
>
<Box as="span" css={{ fontFamily: "$monospace" }}>
{abbreviateNumber(lock.amount, 4)}
</Box>{" "}
Expand Down Expand Up @@ -132,16 +170,44 @@ const Index = ({ delegator, transcoders, currentRound, isMyAccount }) => {
>
<Flex
css={{
width: "100%",
alignItems: "center",
alignItems: "flex-start",
flexDirection: "column",
justifyContent: "space-between",
gap: "$3",
width: "100%",
"@bp2": {
flexDirection: "row",
alignItems: "center",
gap: 0,
},
}}
>
<Box>Undelegated from {formatAddress(lock.delegate.id)}</Box>

<Flex css={{ alignItems: "center" }}>
<Flex
css={{
alignItems: "center",
flexDirection: "column",
gap: "$2",
width: "100%",
"@bp2": {
flexDirection: "row",
gap: 0,
justifyContent: "flex-end",
width: "auto",
},
}}
>
{isMyAccount && (
<>
<Flex
css={{
justifyContent: "flex-start",
width: "100%",
"@bp2": {
width: "auto",
},
}}
>
{isBonded ? (
<Redelegate
unbondingLockId={lock.unbondingLockId}
Expand All @@ -157,10 +223,17 @@ const Index = ({ delegator, transcoders, currentRound, isMyAccount }) => {
/>
)}
<WithdrawStake unbondingLockId={lock.unbondingLockId} />
</>
</Flex>
)}
<Box css={{ marginLeft: "$4" }}>
{" "}
<Box
css={{
alignSelf: "flex-end",
"@bp2": {
alignSelf: "auto",
marginLeft: "$4",
},
}}
>
<Box as="span" css={{ fontFamily: "$monospace" }}>
{abbreviateNumber(lock.amount, 3)}
</Box>{" "}
Expand Down