fix: change schema name

This commit is contained in:
Kirill Litvinov
2023-06-16 16:36:29 +03:00
parent ebbe2a081b
commit c80d0d990d
3 changed files with 5 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ import {
aggregatedHistorySchema,
} from './schemas/index.js';
import {SupportedChainId} from "../../types.js";
import getContractsAddressesSchema from './schemas/getContractsAddressesSchema.js';
import contractsAddressesSchema from './schemas/contractsAddressesSchema.js';
type CreateLinkPayloadType = {
referer: string
@@ -174,7 +174,7 @@ class ReferralSystem {
getContractsAddresses = () =>
fetchWithValidation(
`${this.apiUrl}/referer/view/contracts`,
getContractsAddressesSchema,
contractsAddressesSchema,
undefined,
errorSchema
);

View File

@@ -2,9 +2,9 @@ import { z } from 'zod';
import { SupportedChainId } from '../../../types.js';
import { isAddress } from 'ethers/lib/utils.js';
const getContractsAddressesSchema = z.record(
const contractsAddressesSchema = z.record(
z.nativeEnum(SupportedChainId),
z.string().refine(isAddress)
);
export default getContractsAddressesSchema;
export default contractsAddressesSchema;

View File

@@ -8,4 +8,4 @@ export { default as globalAnalyticsSchema } from './globalAnalyticsSchema.js';
export { default as ratingSchema } from './ratingSchema.js';
export { default as claimInfoSchema } from './claimInfoSchema.js';
export { default as aggregatedHistorySchema } from './aggregatedHistorySchema.js';
export { default as getContractsAddressesSchema } from './getContractsAddressesSchema.js';
export { default as contractsAddressesSchema } from './contractsAddressesSchema.js';