mirror of
https://github.com/Instadapp/trustwallet-assets.git
synced 2024-07-29 22:37:31 +00:00
2d771a60b1
Co-authored-by: Catenocrypt <catenocrypt@users.noreply.github.com>
19 lines
515 B
TypeScript
19 lines
515 B
TypeScript
import { TagValues } from "../tags-config";
|
|
|
|
export function isValidTagValue(value: string): boolean {
|
|
//console.log(`isValidTagValue ${value}`);
|
|
if (!value) {
|
|
return false;
|
|
}
|
|
const tag = TagValues.find(t => t.id === value);
|
|
if (!tag) {
|
|
return false;
|
|
}
|
|
//console.log(`TAG ${tag.name}`);
|
|
return true;
|
|
}
|
|
|
|
export function isValidTagValues(values: string[]): boolean {
|
|
return values.reduce((accum: boolean, value: string) => accum && isValidTagValue(value), true);
|
|
}
|