Skip to content

Commit be41ae9

Browse files
authored
Merge pull request #5 from includenull/master
Allow get_actions method to accept optional account parameter
2 parents 55545d3 + bb11aa3 commit be41ae9

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@wharfkit/hyperion",
33
"description": "API Client to access Hyperion API endpoints",
4-
"version": "1.0.4",
4+
"version": "1.0.5",
55
"homepage": "https://github.com/wharfkit/hyperion",
66
"main": "lib/hyperion.js",
77
"module": "lib/hyperion.m.js",
@@ -55,4 +55,4 @@
5555
"typedoc": "^0.23.10",
5656
"typescript": "^4.1.2"
5757
}
58-
}
58+
}

src/endpoints/v2/v2.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export class HyperionV2HistoryAPIClient {
135135
}
136136

137137
async get_actions(
138-
account: NameType,
138+
account?: NameType | null,
139139
options?: {
140140
filter?: string
141141
skip?: number
@@ -150,7 +150,11 @@ export class HyperionV2HistoryAPIClient {
150150
act_account?: NameType
151151
}
152152
) {
153-
const queryParts: string[] = [`account=${account}`]
153+
const queryParts: string[] = []
154+
155+
if (account) {
156+
queryParts.push(`account=${account}`)
157+
}
154158

155159
for (const [key, value] of Object.entries(options || {})) {
156160
queryParts.push(`${key}=${value}`)

0 commit comments

Comments
 (0)