Skip to content

Commit

Permalink
[NOCHANGELOG] [Add Funds Widget] Create REVIEW and CONFIRMATION widge…
Browse files Browse the repository at this point in the history
…t view and view type (#2244)
  • Loading branch information
jiyounglee authored Sep 30, 2024
1 parent 44aaf32 commit 7bfbf68
Showing 1 changed file with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
import { TokenBalance } from '@0xsquid/sdk/dist/types';
import { ViewType } from './ViewType';

export enum AddFundsWidgetViews {
ADD_FUNDS = 'ADD_FUNDS',
REVIEW = 'REVIEW',
CONFIRMATION = 'CONFIRMATION',
}

export type AddFundsWidgetView = AddFundsView;
export type AddFundsWidgetView = AddFundsView | AddFundsReview | AddFundsConfirmation;

interface AddFundsView extends ViewType {
type: AddFundsWidgetViews.ADD_FUNDS;
}

interface AddFundsReview extends ViewType {
type: AddFundsWidgetViews.REVIEW;
data: AddFundsReviewData;
}

interface AddFundsConfirmation extends ViewType {
type: AddFundsWidgetViews.CONFIRMATION;
data: AddFundsConfirmationData;
}

export interface AddFundsReviewData {
balance: TokenBalance;
toAmount: string;
toChainId: string;
toTokenAddress: string;
}

export interface AddFundsConfirmationData {
transactionHash: string;
}

0 comments on commit 7bfbf68

Please sign in to comment.