Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OCM-Engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
xfsc
Organization Credential Manager
OCM-Engine
Commits
ad857d4c
Verified
Commit
ad857d4c
authored
1 year ago
by
Konstantin Tsabolov
Browse files
Options
Downloads
Patches
Plain Diff
chore(ssi): correctly initialize endorser did
parent
1fcefb28
No related branches found
No related tags found
1 merge request
!47
Tenant manager
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/ssi-abstraction/src/agent/dids/dids.service.ts
+10
-3
10 additions, 3 deletions
apps/ssi-abstraction/src/agent/dids/dids.service.ts
apps/ssi-abstraction/src/application.ts
+3
-7
3 additions, 7 deletions
apps/ssi-abstraction/src/application.ts
with
13 additions
and
10 deletions
apps/ssi-abstraction/src/agent/dids/dids.service.ts
+
10
−
3
View file @
ad857d4c
...
...
@@ -24,7 +24,7 @@ import {
KeyType
,
TypedArrayEncoder
,
}
from
'
@credo-ts/core
'
;
import
{
Injectable
}
from
'
@nestjs/common
'
;
import
{
Injectable
,
Logger
}
from
'
@nestjs/common
'
;
import
{
ConfigService
}
from
'
@nestjs/config
'
;
import
{
LEDGERS
}
from
'
../../config/ledger.js
'
;
...
...
@@ -34,6 +34,8 @@ import { WithTenantService } from '../withTenantService.js';
@
Injectable
()
export
class
DidsService
{
private
readonly
logger
=
new
Logger
(
this
.
constructor
.
name
);
public
constructor
(
private
agentService
:
AgentService
,
private
withTenantService
:
WithTenantService
,
...
...
@@ -138,9 +140,14 @@ export class DidsService {
};
try
{
this
.
logger
.
log
(
'
Registering wallet key for endorser dids
'
);
await
this
.
agentService
.
agent
.
wallet
.
createKey
(
privKey
);
}
catch
{
// Key already exists, but we don't care
}
catch
(
e
)
{
if
(
e
instanceof
Error
&&
e
.
constructor
.
name
===
'
WalletKeyExistsError
'
)
{
this
.
logger
.
log
(
'
Wallet key already exists
'
);
}
else
{
throw
e
;
}
}
for
(
const
indyDid
of
indyDids
)
{
...
...
This diff is collapsed.
Click to expand it.
apps/ssi-abstraction/src/application.ts
+
3
−
7
View file @
ad857d4c
...
...
@@ -93,12 +93,8 @@ export class Application implements OnApplicationBootstrap {
public
async
onApplicationBootstrap
()
{
await
this
.
natsClient
.
connect
();
try
{
await
firstValueFrom
(
this
.
natsClient
.
send
(
EventDidsRegisterEndorserDid
.
token
,
{}),
);
}
catch
{
// If there was an error, we don't want to crash the application
}
await
firstValueFrom
(
this
.
natsClient
.
send
(
EventDidsRegisterEndorserDid
.
token
,
{}),
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment