Skip to content

Commit

Permalink
[blocklist sync] update v3-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-diamond committed Mar 22, 2024
1 parent ff5bef3 commit bb4f2c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/methods/vault/requests/getBlocklist/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { isAddress } from 'ethers'
import type { BlocklistAccountsQueryVariables, BlocklistAccountsQueryPayload } from '../../../../graphql/subgraph/vault'
import { apiUrls, validateArgs } from '../../../../utils'
import graphql from '../../../../graphql'
Expand All @@ -16,12 +17,10 @@ type GetBlocklistInput = {
}

const validateList = (addressIn: string[]) => {
const isValid = addressIn.every((address) => (
typeof address === 'string'
))
const isValid = addressIn.every((address) => isAddress(address))

if (!isValid) {
throw new Error('The "addressIn" argument must be an array of strings')
throw new Error('The "addressIn" argument must be an array of valid addresses')
}
}

Expand Down
7 changes: 3 additions & 4 deletions src/methods/vault/requests/getWhitelist/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { isAddress } from 'ethers'
import type { WhitelistAccountsQueryVariables, WhitelistAccountsQueryPayload } from '../../../../graphql/subgraph/vault'
import { apiUrls, validateArgs } from '../../../../utils'
import graphql from '../../../../graphql'
Expand All @@ -16,12 +17,10 @@ type GetWhitelistInput = {
}

const validateList = (addressIn: string[]) => {
const isValid = addressIn.every((address) => (
typeof address === 'string'
))
const isValid = addressIn.every((address) => isAddress(address))

if (!isValid) {
throw new Error('The "addressIn" argument must be an array of strings')
throw new Error('The "addressIn" argument must be an array of valid addresses')
}
}

Expand Down

0 comments on commit bb4f2c1

Please sign in to comment.