Skip to content

Commit

Permalink
Run formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ognjenkurtic committed Jul 23, 2024
1 parent 9dfedbd commit 8fd3f9c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
5 changes: 4 additions & 1 deletion examples/bri-3/src/bri/ccsm/agents/ccsmStorage.agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ export class CcsmStorageAgent {
private readonly ccsmService: ICcsmService,
) {}

async storeAnchorHashOnCcsm(workstepInstanceId: string, anchorHash: string): Promise<void> {
async storeAnchorHashOnCcsm(
workstepInstanceId: string,
anchorHash: string,
): Promise<void> {
await this.ccsmService.storeAnchorHash(workstepInstanceId, anchorHash);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'dotenv/config';

export class DidService {
// TODO: Hardcoded sepolia everywhere for DID resolution
// This should be taken from the CCSM_NETWORK env value and
// This should be taken from the CCSM_NETWORK env value and
// the service refactored to connect to locahost as well,
// with previous deployment of a did registry to local node.
async createKeypair(): Promise<KeyPair> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ export class TransactionStorageAgent {
return this.mapper.map(newTransactionModel, Transaction);
}

async updateTransactionPayload(transaction: Transaction): Promise<Transaction> {
async updateTransactionPayload(
transaction: Transaction,
): Promise<Transaction> {
const updatedTransactionModel = await this.prisma.transaction.update({
where: { id: transaction.id },
data: {
Expand All @@ -143,9 +145,7 @@ export class TransactionStorageAgent {
return this.mapper.map(updatedTransactionModel, Transaction);
}

async updateTransaction(
transaction: Transaction,
): Promise<Transaction> {
async updateTransaction(transaction: Transaction): Promise<Transaction> {
const updatedTransaction = await this.prisma.transaction.update({
where: {
id: transaction.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,13 @@ describe('TransactionController', () => {
signature: 'signature2',
} as UpdateTransactionDto;

transactionStorageAgentMock.updateTransactionPayload.mockResolvedValueOnce({
...existingTransaction,
payload: updateRequestDto.payload,
signature: updateRequestDto.signature,
} as Transaction);
transactionStorageAgentMock.updateTransactionPayload.mockResolvedValueOnce(
{
...existingTransaction,
payload: updateRequestDto.payload,
signature: updateRequestDto.signature,
} as Transaction,
);

// Act
const updatedTransaction = await controller.updateTransaction(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ export class ExecuteVsmCycleCommandHandler
stateTreeRoot,
);

await this.ccsmStorageAgent.storeAnchorHashOnCcsm(tx.workstepInstanceId, txResult.hash);
await this.ccsmStorageAgent.storeAnchorHashOnCcsm(
tx.workstepInstanceId,
txResult.hash,
);

tx.updateStatusToExecuted();
this.txStorageAgent.updateTransaction(tx);
Expand Down

0 comments on commit 8fd3f9c

Please sign in to comment.