mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-28 08:37:51 +03:00
Fixup for ethers new version
This commit is contained in:
@@ -3,7 +3,7 @@ import { ethers } from 'ethers';
|
||||
|
||||
const infoSchema = z.object({
|
||||
blockNumber: z.number().int().nonnegative(),
|
||||
blockHash: z.string().refine((v) => v.length === 0 || ethers.utils.isHexString(v), {
|
||||
blockHash: z.string().refine((v) => v.length === 0 || ethers.isHexString(v), {
|
||||
message: 'blockHash must be a valid hex string or empty',
|
||||
}),
|
||||
timeRequest: z.number().int().nonnegative(),
|
||||
|
||||
@@ -3,12 +3,12 @@ import { z } from 'zod';
|
||||
|
||||
export const evmAddressSchema = z
|
||||
.string()
|
||||
.refine(ethers.utils.isAddress, (v) => ({
|
||||
.refine(ethers.isAddress, (v) => ({
|
||||
message: `${v} is not a valid address`,
|
||||
}));
|
||||
|
||||
export const hexStringSchema = z
|
||||
.string()
|
||||
.refine(ethers.utils.isHexString, (v) => ({
|
||||
.refine(ethers.isHexString, (v) => ({
|
||||
message: `${v} is not a valid hex string`,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user