@qso-soft/shared
Version:
Shared library for QSO-soft
11 lines • 394 B
JavaScript
export const getTokenContract = ({ contracts, tokenName }) => {
if (!tokenName) {
throw new Error('Token name was not specified');
}
const tokenInfo = contracts?.find(({ name }) => name === tokenName);
if (!tokenInfo) {
throw new Error(`We can not find token with ${tokenName} name`);
}
return tokenInfo;
};
//# sourceMappingURL=get-token-contract.js.map