trustwallet-assets/script/blockchain/tezos.ts
hewigovens ceaf159196
[Tezos] Remove not used baker update code (#5474)
* remove not used baker update code
* remove not used model
* more cleanup
2021-02-05 13:19:50 +08:00

27 lines
991 B
TypeScript

import * as eztz from "eztz-lib";
import { getChainValidatorsAssets } from "../generic/repo-structure";
import { Tezos } from "../generic/blockchains";
import { ActionInterface, CheckStepInterface } from "../generic/interface";
export class TezosAction implements ActionInterface {
getName(): string { return "Tezos"; }
getSanityChecks(): CheckStepInterface[] {
return [
{
getName: () => { return "Tezos validator assets must have correct format"},
check: async () => {
const errors: string[] = [];
const assets = getChainValidatorsAssets(Tezos);
assets.forEach(addr => {
if (!(eztz.crypto.checkAddress(addr))) {
errors.push(`Address ${addr} must be valid Tezos address'`);
}
});
return [errors, []];
}
},
];
}
}