File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ import {
5959 VersionedDDO
6060} from '@oceanprotocol/ddo-js'
6161import { checkCredentialOnAccessList } from '../../utils/credentials.js'
62+ import { getNonce } from '../core/utils/nonceHandler.js'
6263class BaseEventProcessor {
6364 protected networkId : number
6465
@@ -242,7 +243,10 @@ class BaseEventProcessor {
242243 INDEXER_LOGGER . logMessage (
243244 `Decrypting DDO from network: ${ this . networkId } created by: ${ eventCreator } encrypted by: ${ decryptorURL } `
244245 )
245- const nonce = Math . floor ( Date . now ( ) / 1000 ) . toString ( )
246+
247+ const { nonce : nonceDB } = await getDatabase ( )
248+ const nonceHandlerResponse = await getNonce ( nonceDB , eventCreator )
249+ const nonce = await streamToString ( nonceHandlerResponse . stream as Readable )
246250 const config = await getConfiguration ( )
247251 const { keys } = config
248252 const nodeId = keys . peerId . toString ( )
You can’t perform that action at this time.
0 commit comments