mirror of
				https://github.com/Instadapp/trustwallet-assets.git
				synced 2024-07-29 22:37:31 +00:00 
			
		
		
		
	 ec1fe7f6ee
			
		
	
	
		ec1fe7f6ee
		
			
		
	
	
	
	
		
			
			* Make non-mandatory action interface elements optional. * Remove one unused import * Scripts main renamed to entrypoint. * Script common rename to generic * Move generic scripts from action to generic. * Move chain-specific scripts to blockchain. Co-authored-by: Catenocrypt <catenocrypt@users.noreply.github.com>
		
			
				
	
	
		
			26 lines
		
	
	
		
			703 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			703 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| // A single check step
 | |
| export interface CheckStepInterface {
 | |
|     getName(): string;
 | |
|     // return [errors, warnings]
 | |
|     check(): Promise<[string[], string[]]>;
 | |
| }
 | |
| 
 | |
| // An action for a check, fix, or update, or a combination.
 | |
| export interface ActionInterface {
 | |
|     getName(): string;
 | |
|     // return check steps for sanity check (0, 1, or more)
 | |
|     getSanityChecks(): CheckStepInterface[];
 | |
|     // return check steps for consistenct check (0, 1, or more)
 | |
|     getConsistencyChecks?(): CheckStepInterface[];
 | |
|     sanityFix?(): Promise<void>;
 | |
|     consistencyFix?(): Promise<void>;
 | |
|     update?(): Promise<void>;
 | |
| }
 | |
| 
 | |
| export enum FixCheckMode {
 | |
|     CheckSanityOnly = 1,
 | |
|     CheckAll,
 | |
|     FixSanityOnly,
 | |
|     FixAll
 | |
| }
 |