Skip to content

Commit

Permalink
fix: reference to indyLedgers in IndyXXXNotConfiguredError (#1397)
Browse files Browse the repository at this point in the history
Signed-off-by: Ariel Gentile <[email protected]>
  • Loading branch information
genaris authored Mar 21, 2023
1 parent 9f0f8f2 commit d6e2ea2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions packages/indy-sdk/src/ledger/IndySdkPoolService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class IndySdkPoolService {

if (pools.length === 0) {
throw new IndySdkPoolNotConfiguredError(
"No indy ledgers configured. Provide at least one pool configuration in the 'indyLedgers' agent configuration"
'No indy ledgers configured. Provide at least one pool configuration in IndySdkModuleConfigOptions.networks'
)
}

Expand Down Expand Up @@ -129,7 +129,7 @@ export class IndySdkPoolService {

// If there are self certified DIDs we always prefer it over non self certified DIDs
// We take the first self certifying DID as we take the order in the
// indyLedgers config as the order of preference of ledgers
// IndySdkModuleConfigOptions.networks config as the order of preference of ledgers
let value = successful.find((response) =>
isLegacySelfCertifiedDid(response.value.did.did, response.value.did.verkey)
)?.value
Expand All @@ -142,8 +142,8 @@ export class IndySdkPoolService {
const nonProduction = successful.filter((s) => !s.value.pool.config.isProduction)
const productionOrNonProduction = production.length >= 1 ? production : nonProduction

// We take the first value as we take the order in the indyLedgers config as
// the order of preference of ledgers
// We take the first value as we take the order in the IndySdkModuleConfigOptions.networks
// config as the order of preference of ledgers
value = productionOrNonProduction[0].value
}

Expand Down Expand Up @@ -176,7 +176,7 @@ export class IndySdkPoolService {
public getPoolForNamespace(indyNamespace?: string) {
if (this.pools.length === 0) {
throw new IndySdkPoolNotConfiguredError(
"No indy ledgers configured. Provide at least one pool configuration in the 'indyLedgers' agent configuration"
'No indy ledgers configured. Provide at least one pool configuration in IndySdkModuleConfigOptions.networks'
)
}

Expand Down
10 changes: 5 additions & 5 deletions packages/indy-vdr/src/pool/IndyVdrPoolService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class IndyVdrPoolService {

if (pools.length === 0) {
throw new IndyVdrNotConfiguredError(
"No indy ledgers configured. Provide at least one pool configuration in the 'indyLedgers' agent configuration"
'No indy ledgers configured. Provide at least one pool configuration in IndyVdrModuleConfigOptions.networks'
)
}

Expand Down Expand Up @@ -105,7 +105,7 @@ export class IndyVdrPoolService {

// If there are self certified DIDs we always prefer it over non self certified DIDs
// We take the first self certifying DID as we take the order in the
// indyLedgers config as the order of preference of ledgers
// IndyVdrModuleConfigOptions.networks config as the order of preference of ledgers
let value = successful.find((response) =>
isSelfCertifiedDid(response.value.did.nymResponse.did, response.value.did.nymResponse.verkey)
)?.value
Expand All @@ -118,8 +118,8 @@ export class IndyVdrPoolService {
const nonProduction = successful.filter((s) => !s.value.pool.config.isProduction)
const productionOrNonProduction = production.length >= 1 ? production : nonProduction

// We take the first value as we take the order in the indyLedgers config as
// the order of preference of ledgers
// We take the first value as we take the order in the IndyVdrModuleConfigOptions.networks
// config as the order of preference of ledgers
value = productionOrNonProduction[0].value
}

Expand Down Expand Up @@ -154,7 +154,7 @@ export class IndyVdrPoolService {
public getPoolForNamespace(indyNamespace: string) {
if (this.pools.length === 0) {
throw new IndyVdrNotConfiguredError(
"No indy ledgers configured. Provide at least one pool configuration in the 'indyLedgers' agent configuration"
'No indy ledgers configured. Provide at least one pool configuration in IndyVdrModuleConfigOptions.networks'
)
}

Expand Down

0 comments on commit d6e2ea2

Please sign in to comment.