mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-17 00:31:34 +03:00
fix: change schema name
This commit is contained in:
@@ -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
|
||||
);
|
||||
|
||||
@@ -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;
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user