trustwallet-assets/pricing/coinmarketcap/cmc-action.ts
Adam R 78eef8eabc
CMC mapping: merge exceptions on every commit, retrieve from CMC and merge on Update runs. (#3406)
Co-authored-by: Catenocrypt <catenocrypt@users.noreply.github.com>
2020-08-17 17:31:08 +02:00

23 lines
654 B
TypeScript

import { ActionInterface, CheckStepInterface } from "../../script/action/interface";
import { update, mergeCmcData } from "./script";
import { getSanityChecks } from "./check";
export class Coinmarketcap implements ActionInterface {
getName(): string { return "Coinmarketcap mapping"; }
getSanityChecks(): CheckStepInterface[] { return getSanityChecks(); }
getConsistencyChecks = null;
sanityFix = null;
async consistencyFix(): Promise<void> {
// do merge, for the case exceptions or script has been changed
await mergeCmcData();
}
async update(): Promise<void> {
await update();
}
}