Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/schema-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ export class PolygonSchema {
schemaId,
JSON.stringify(schemaResource),
)
// To change the nonce for next transaction
await schemaTxnReceipt.wait()

if (!schemaTxnReceipt.hash) {
throw new Error(`Error while adding schema in Registry!`)
Expand All @@ -131,8 +133,6 @@ export class PolygonSchema {
if (!uploadSchemaDetails) {
throw new Error(`Error while uploading schema on file server!`)
}
// To change the nonce for next transaction
await new Promise((resolve) => setTimeout(resolve, 4000))
const addedResourcetxnReceipt = await this.didRegistry.addResource(
parsedDid.didAddress,
schemaId,
Expand Down
Loading