Skip to content

Commit

Permalink
fixed incosistencies (#251)
Browse files Browse the repository at this point in the history
* fixed incosistencies

* fixed tests
  • Loading branch information
ggarri authored Aug 1, 2022
1 parent e37d894 commit 1859f72
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ All notable changes to this project will be documented in this file.

- Reformatted job notification message

## 6.2.1 (2022-08-01)

### 🛠 Bug fixes

- Fixed inconsistent types on UpdateAccount and GetTransaction responses

## 6.2.0 (2022-06-07)

### 🛠 Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pegasys-orchestrate",
"version": "6.2.0",
"version": "6.2.1",
"description": "The PegaSys Orchestrate library provides convenient access to the Codefi Orchestrate API from applications written in server-side JavaScript",
"main": "lib/index.js",
"files": [
Expand Down
8 changes: 1 addition & 7 deletions src/client/OrchestrateClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,14 @@ const mockJobRes: types.IJobResponse = {
updatedAt: new Date()
}

const mockScheduleRes: types.IScheduleResponse = {
uuid: 'scheduleUUID',
jobs: [mockJobRes],
createdAt: new Date()
}

const mockETHParams: types.IETHTransactionParams = {}

const mockTransactionResp: types.ITransaction = {
uuid: 'transactionUUID',
idempotencyKey: 'idempotencyKey',
chain: 'MyChain',
params: mockETHParams,
schedule: mockScheduleRes,
jobs: [mockJobRes],
createdAt: new Date()
}

Expand Down
2 changes: 1 addition & 1 deletion src/client/OrchestrateClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ export class OrchestrateClient {
request: types.IUpdateAccountRequest,
authToken?: string,
headers?: IHeaders
): Promise<string> {
): Promise<types.IAccount> {
try {
return await this.client.patch(`/accounts/${address}`, request, authToken, headers)
} catch (e) {
Expand Down
3 changes: 2 additions & 1 deletion src/client/types/ITransaction.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ParsedQs } from 'qs'

import { IGasPricePolicy } from './IGasPricePolicy'
import { IJobResponse } from './IJob'
import { IScheduleResponse } from './ISchedule'
import { ProtocolType } from './ProtocolType'

Expand Down Expand Up @@ -63,7 +64,7 @@ export interface ITransaction {
idempotencyKey: string
chain: string
params: IETHTransactionParams
schedule: IScheduleResponse
jobs: IJobResponse[]
createdAt: Date
}

Expand Down

0 comments on commit 1859f72

Please sign in to comment.