-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
78 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 21 additions & 4 deletions
25
packages/ui/src/ActionView/position/position-reward-claim.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
import { PositionRewardClaim } from '@penumbra-zone/protobuf/penumbra/core/component/dex/v1/dex_pb'; | ||
import { UnknownAction } from '../actions/unknown'; | ||
import { ActionWrapper } from '../shared/wrapper'; | ||
import { ActionRow } from '../shared/action-row'; | ||
import { shorten } from '@penumbra-zone/types/string'; | ||
import { bech32mPositionId } from '@penumbra-zone/bech32m/plpid'; | ||
|
||
export interface PositionRewardClaimActionProps { | ||
value: PositionRewardClaim; | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- unimplemented | ||
export const PositionRewardClaimAction = (_: PositionRewardClaimActionProps) => { | ||
return <UnknownAction label='Position Reward Claim' opaque={false} />; | ||
export const PositionRewardClaimAction = ({ value }: PositionRewardClaimActionProps) => { | ||
return ( | ||
<ActionWrapper | ||
title='Position Reward Claim' | ||
infoRows={ | ||
<> | ||
{value.positionId && ( | ||
<ActionRow | ||
label='Position ID' | ||
info={shorten(bech32mPositionId(value.positionId), 8)} | ||
copyText={bech32mPositionId(value.positionId)} | ||
/> | ||
)} | ||
</> | ||
} | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
import { PositionWithdraw } from '@penumbra-zone/protobuf/penumbra/core/component/dex/v1/dex_pb'; | ||
import { UnknownAction } from '../actions/unknown'; | ||
import { shorten } from '@penumbra-zone/types/string'; | ||
import { bech32mPositionId } from '@penumbra-zone/bech32m/plpid'; | ||
import { ActionWrapper } from '../shared/wrapper'; | ||
import { ActionRow } from '../shared/action-row'; | ||
|
||
export interface PositionWithdrawActionProps { | ||
value: PositionWithdraw; | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- unimplemented | ||
export const PositionWithdrawAction = (_: PositionWithdrawActionProps) => { | ||
return <UnknownAction label='Position Withdraw' opaque={false} />; | ||
export const PositionWithdrawAction = ({ value }: PositionWithdrawActionProps) => { | ||
return ( | ||
<ActionWrapper | ||
title='Position Withdraw' | ||
infoRows={ | ||
<> | ||
{value.positionId && ( | ||
<ActionRow | ||
label='Position ID' | ||
info={shorten(bech32mPositionId(value.positionId), 8)} | ||
copyText={bech32mPositionId(value.positionId)} | ||
/> | ||
)} | ||
</> | ||
} | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters