trustwallet-assets/script/generic/status-values.ts
Adam R 1042aa9e63
[Internal] Add check for valid values of status field (#5951)
* Add check for valid values of status field

* Ad dmissing new file

Co-authored-by: Catenocrypt <catenocrypt@users.noreply.github.com>
2021-03-17 11:51:03 +01:00

17 lines
336 B
TypeScript

// see https://developer.trustwallet.com/add_new_asset
const StatusValues: string[] = [
'active',
'spam',
'abandoned'
];
export function isValidStatusValue(value: string): boolean {
if (!value) {
return false;
}
if (!StatusValues.find(e => e === value)) {
return false;
}
return true;
}