Skip to content

Commit

Permalink
chore: cleanup form value type
Browse files Browse the repository at this point in the history
  • Loading branch information
philiphacks committed Feb 11, 2024
1 parent a263b08 commit cada377
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/pages/stacking/start-liquid-stacking/types.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
import { ProtocolName } from './types-preset-protocols';

interface DelegatingFormIndefiniteValues<N> {
delegationDurationType: 'indefinite';
amount: N;
protocolAddress: string;
rewardAddress: string;
protocolName: ProtocolName | undefined;
}
interface DelegatingFormLimitedValues<N> {
interface LiquidStackingFormValues<N> {
delegationDurationType: 'limited';
amount: N;
protocolAddress: string;
numberOfCycles: number;
stxAddress: string;
rewardAddress: string;
protocolName: ProtocolName | undefined;
}
type AbstractDelegatingFormValues<N> =
| DelegatingFormIndefiniteValues<N>
| DelegatingFormLimitedValues<N>;

export type EditingFormValues = AbstractDelegatingFormValues<string | number>;
export type EditingFormValues = LiquidStackingFormValues<string | number>;

export type PresetProtocol = {
logoUrl: string;
Expand Down

0 comments on commit cada377

Please sign in to comment.