Massive changes. I dont know what happens. Rewrote the action wizard again. Fixed several bugs related to the utxo selection. QR codes were added for address. Add support for data results. Experiment with other methods of role extraction
This commit is contained in:
21
src/tui/screens/action-wizard/flows/index.ts
Normal file
21
src/tui/screens/action-wizard/flows/index.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { XOTemplateAction } from '@xo-cash/types';
|
||||
import { TransactionWizardFlow } from './TransactionWizardFlow.js';
|
||||
import { DataWizardFlow } from './DataWizardFlow.js';
|
||||
import type { WizardFlow } from './WizardFlow.js';
|
||||
|
||||
export { WizardFlow } from './WizardFlow.js';
|
||||
export { TransactionWizardFlow } from './TransactionWizardFlow.js';
|
||||
export { DataWizardFlow } from './DataWizardFlow.js';
|
||||
|
||||
/**
|
||||
* Inspect a template action and return the appropriate wizard flow strategy.
|
||||
*
|
||||
* Actions with `data` fields and no `transaction` are data-only flows.
|
||||
* Everything else uses the transaction flow.
|
||||
*/
|
||||
export function createWizardFlow(action: XOTemplateAction): WizardFlow {
|
||||
if (action.data?.length && !action.transaction) {
|
||||
return new DataWizardFlow(action.data);
|
||||
}
|
||||
return new TransactionWizardFlow();
|
||||
}
|
||||
Reference in New Issue
Block a user