-
Notifications
You must be signed in to change notification settings - Fork 6
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
1 parent
2a19823
commit a9f5e3b
Showing
9 changed files
with
139 additions
and
117 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
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
2 changes: 2 additions & 0 deletions
2
packages/ui-components/src/lib/components/deployment/wizard/TokenInputButtons.svelte
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
2 changes: 2 additions & 0 deletions
2
packages/ui-components/src/lib/components/deployment/wizard/TokenOutputButtons.svelte
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,47 @@ | ||
import type { DotrainOrderGui, GuiDeposit, GuiFieldDefinition, SelectTokens, TokenInfos, Vault } from '@rainlanguage/orderbook/js_api'; | ||
|
||
export type WizardStep = | ||
| { type: 'tokens'; data: { token: string; gui: DotrainOrderGui; selectTokens: SelectTokens } } | ||
| { type: 'fields'; data: { fieldDefinition: GuiFieldDefinition; gui: DotrainOrderGui } } | ||
| { type: 'deposits'; data: { deposit: GuiDeposit; gui: DotrainOrderGui; tokenInfos: TokenInfos } } | ||
| { type: 'tokenInput'; data: { input: Vault; gui: DotrainOrderGui; tokenInfos: TokenInfos; i: number; inputVaultIds: string[] } } | ||
| { type: 'tokenOutput'; data: { output: Vault; gui: DotrainOrderGui; tokenInfos: TokenInfos; i: number; outputVaultIds: string[] } }; | ||
import type { DotrainOrderGui, SelectTokens, GuiFieldDefinition, GuiDeposit, TokenInfos, Vault } from "@rainlanguage/orderbook/js_api"; | ||
|
||
export type StepType = 'tokens' | 'fields' | 'deposits' | 'tokenInput' | 'tokenOutput'; | ||
|
||
export interface BaseWizardStep { | ||
type: StepType; | ||
} | ||
|
||
export interface SelectTokenStep extends BaseWizardStep { | ||
type: 'tokens'; | ||
token: string; | ||
gui: DotrainOrderGui; | ||
selectTokens: SelectTokens; | ||
} | ||
|
||
export interface FieldStep extends BaseWizardStep { | ||
type: 'fields'; | ||
fieldDefinition: GuiFieldDefinition; | ||
gui: DotrainOrderGui; | ||
} | ||
|
||
export interface DepositStep extends BaseWizardStep { | ||
type: 'deposits'; | ||
deposit: GuiDeposit; | ||
gui: DotrainOrderGui; | ||
tokenInfos: TokenInfos; | ||
} | ||
|
||
export interface TokenInputStep extends BaseWizardStep { | ||
type: 'tokenInput'; | ||
input: Vault; | ||
gui: DotrainOrderGui; | ||
tokenInfos: TokenInfos; | ||
i: number; | ||
inputVaultIds: string[]; | ||
} | ||
|
||
export interface TokenOutputStep extends BaseWizardStep { | ||
type: 'tokenOutput'; | ||
output: Vault; | ||
gui: DotrainOrderGui; | ||
tokenInfos: TokenInfos; | ||
i: number; | ||
outputVaultIds: string[]; | ||
} | ||
|
||
export type WizardStep = TokenStep | FieldStep | DepositStep | TokenInputStep | TokenOutputStep; |
Oops, something went wrong.