refactor: rename blockchainCredentialNetworks -> blockchainCredentialSupportedNetworks

blockchainCredentialNetworks was renamed blockchainCredentialSupportedNetworks for clarity.

re #443
This commit is contained in:
Vivian Plasencia
2024-03-25 14:30:21 +01:00
parent a08d082c77
commit 0c1128c76c
6 changed files with 11 additions and 11 deletions

View File

@@ -23,9 +23,9 @@ TWITTER_REDIRECT_URI=
TWITTER_CLIENT_ID=
TWITTER_CLIENT_SECRET=
# The network name must be the same as the blockchainCredentialNetworks in `getSupportedNetworks`
# in the `@bandada/utils` package but with capital letters and an underscore instead of a space
# to separate words.
# The network name must be the same as what appears in the `blockchainCredentialSupportedNetworks` list
# exported from the `@bandada/utils` package but with capital letters and an underscore
# instead of a space to separate words.
SEPOLIA_RPC_URL=
POLYGON_MUMBAI_RPC_URL=

View File

@@ -19,7 +19,7 @@ jest.mock("@bandada/utils", () => ({
}),
getGroups: () => []
}),
blockchainCredentialNetworks: ["Sepolia"]
blockchainCredentialSupportedNetworks: ["Sepolia"]
}))
jest.mock("@bandada/credentials", () => ({

View File

@@ -7,7 +7,7 @@ import {
Web2Context,
BlockchainContext
} from "@bandada/credentials"
import { blockchainCredentialNetworks } from "@bandada/utils"
import { blockchainCredentialSupportedNetworks } from "@bandada/utils"
import { id } from "@ethersproject/hash"
import {
BadRequestException,
@@ -109,7 +109,7 @@ export class CredentialsService {
const { network } = JSON.parse(group.credentials).criteria
if (
!blockchainCredentialNetworks.some(
!blockchainCredentialSupportedNetworks.some(
(n) => n.toLowerCase() === network.toLowerCase()
)
) {