-
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.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
4ce828e
commit 1802b18
Showing
36 changed files
with
207 additions
and
207 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
packages/checkout/widgets-lib/src/context/view-context/BridgeViewContextTypes.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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { ApproveBridgeResponse, BridgeTxResponse } from '@imtbl/bridge-sdk'; | ||
import { ViewType } from './ViewType'; | ||
|
||
export enum BridgeWidgetViews { | ||
WALLET_NETWORK_SELECTION = 'WALLET_NETWORK_SELECTION', | ||
BRIDGE_FORM = 'BRIDGE_FORM', | ||
BRIDGE_REVIEW = 'BRIDGE_REVIEW', | ||
IN_PROGRESS = 'IN_PROGRESS', | ||
BRIDGE_FAILURE = 'BRIDGE_FAILURE', | ||
APPROVE_TRANSACTION = 'APPROVE_TRANSACTION', | ||
} | ||
|
||
export type BridgeWidgetView = | ||
| BridgeCrossWalletSelection | ||
| BridgeForm | ||
| BridgeReview | ||
| BridgeInProgress | ||
| BridgeFailure | ||
| BridgeApproveTransaction; | ||
|
||
interface BridgeCrossWalletSelection extends ViewType { | ||
type: BridgeWidgetViews.WALLET_NETWORK_SELECTION, | ||
} | ||
|
||
interface BridgeForm extends ViewType { | ||
type: BridgeWidgetViews.BRIDGE_FORM, | ||
} | ||
|
||
interface BridgeReview extends ViewType { | ||
type: BridgeWidgetViews.BRIDGE_REVIEW, | ||
} | ||
|
||
interface BridgeInProgress extends ViewType { | ||
type: BridgeWidgetViews.IN_PROGRESS, | ||
transactionHash: string, | ||
} | ||
|
||
interface BridgeFailure extends ViewType { | ||
type: BridgeWidgetViews.BRIDGE_FAILURE, | ||
reason: string; | ||
} | ||
|
||
interface BridgeApproveTransaction extends ViewType { | ||
type: BridgeWidgetViews.APPROVE_TRANSACTION, | ||
approveTransaction: ApproveBridgeResponse; | ||
transaction: BridgeTxResponse; | ||
} |
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
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
47 changes: 0 additions & 47 deletions
47
packages/checkout/widgets-lib/src/context/view-context/XBridgeViewContextTypes.ts
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.