-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NOCHANGELOG] [Add Funds Widget] Create REVIEW and CONFIRMATION widge…
…t view and view type (#2244)
- Loading branch information
1 parent
44aaf32
commit 7bfbf68
Showing
1 changed file
with
25 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 25 additions & 1 deletion
26
packages/checkout/widgets-lib/src/context/view-context/AddFundsViewContextTypes.ts
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,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; | ||
} |