Skip to content

Commit

Permalink
pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolfomiranda committed Jul 27, 2024
1 parent 60ce790 commit be95cd2
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/keri/app/credentialing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,14 @@ export class Credentials {
// check if last event already has the anchor in it
// and avoid creating a new event if it does
const lastEvent = events[events.length - 1];
if (lastEvent.a?.length == 1 &&
if (
lastEvent.a?.length == 1 &&
lastEvent.a[0]?.i == iss.i &&
lastEvent.a[0]?.s == iss.s &&
lastEvent.a[0]?.d == iss.d)
{
lastEvent.a[0]?.d == iss.d
) {
sn = sn - 1; // revert sn
dig = hab.state.p!;
dig = hab.state.p!;
}
const anc = interact({
pre: hab.prefix,
Expand Down Expand Up @@ -352,13 +353,14 @@ export class Credentials {
// check if last event already has the anchor in it
// and avoid creating a new event if it does
const lastEvent = events[events.length - 1];
if (lastEvent.a?.length == 1 &&
if (
lastEvent.a?.length == 1 &&
lastEvent.a[0]?.i == rev.i &&
lastEvent.a[0]?.s == rev.s &&
lastEvent.a[0]?.d == rev.d)
{
lastEvent.a[0]?.d == rev.d
) {
sn = sn - 1; // revert sn
dig = state.p!;
dig = state.p!;
}

if (estOnly) {
Expand Down Expand Up @@ -648,13 +650,14 @@ export class Registries {
// check if last event already has the anchor in it
// and avoid creating a new event if it does
const lastEvent = events[events.length - 1];
if (lastEvent.a?.length == 1 &&
if (
lastEvent.a?.length == 1 &&
lastEvent.a[0]?.i == regser.pre &&
lastEvent.a[0]?.s == '0' &&
lastEvent.a[0]?.d == regser.pre)
{
lastEvent.a[0]?.d == regser.pre
) {
sn = sn - 1; // revert sn
dig = state.p!;
dig = state.p!;
}

const serder = interact({
Expand Down

0 comments on commit be95cd2

Please sign in to comment.