Skip to content

Commit

Permalink
test: unset anchor auth config
Browse files Browse the repository at this point in the history
  • Loading branch information
smrz2001 committed Apr 30, 2024
1 parent d5543ad commit bc442b5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
3 changes: 3 additions & 0 deletions packages/cli/src/ceramic-cli-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ export class CeramicCliUtils {
if (process.env.CERAMIC_DISABLE_IPFS_PEER_DATA_SYNC == 'true')
config.ipfs.disablePeerDataSync = true

delete config.anchor.authMethod
config.node.privateSeedUrl = undefined

// Validate the config after applying all the overrides
validateConfig(config)

Expand Down
24 changes: 12 additions & 12 deletions packages/cli/src/ceramic-daemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,18 +306,18 @@ export class CeramicDaemon {
let didOptions: DIDOptions = { resolver: makeResolvers(ceramic) }
let provider: DIDProvider

// if (opts.node.sensitive_privateSeedUrl()) {
// let seed: Uint8Array
// try {
// const privateSeedUrl = new URL(opts.node.sensitive_privateSeedUrl())
// seed = parseSeedUrl(privateSeedUrl)
// } catch (err) {
// // Do not log URL errors here to prevent leaking seed
// throw Error('Invalid format for node.private-seed-url in daemon.config.json')
// }
// provider = makeNodeDIDProvider(seed)
// didOptions = { ...didOptions, provider }
// }
if (opts.node.sensitive_privateSeedUrl()) {
let seed: Uint8Array
try {
const privateSeedUrl = new URL(opts.node.sensitive_privateSeedUrl())
seed = parseSeedUrl(privateSeedUrl)
} catch (err) {
// Do not log URL errors here to prevent leaking seed
throw Error('Invalid format for node.private-seed-url in daemon.config.json')
}
provider = makeNodeDIDProvider(seed)
didOptions = { ...didOptions, provider }
}

const did = new DID(didOptions)
if (provider) {
Expand Down

0 comments on commit bc442b5

Please sign in to comment.