Merge pull request #5 from includenull/master

Allow get_actions method to accept optional account parameter
This commit is contained in:
Aaron Cox
2026-03-05 10:37:03 -08:00
committed by GitHub
2 changed files with 8 additions and 4 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@wharfkit/hyperion",
"description": "API Client to access Hyperion API endpoints",
"version": "1.0.4",
"version": "1.0.5",
"homepage": "https://github.com/wharfkit/hyperion",
"main": "lib/hyperion.js",
"module": "lib/hyperion.m.js",
@@ -55,4 +55,4 @@
"typedoc": "^0.23.10",
"typescript": "^4.1.2"
}
}
}
+6 -2
View File
@@ -135,7 +135,7 @@ export class HyperionV2HistoryAPIClient {
}
async get_actions(
account: NameType,
account?: NameType | null,
options?: {
filter?: string
skip?: number
@@ -150,7 +150,11 @@ export class HyperionV2HistoryAPIClient {
act_account?: NameType
}
) {
const queryParts: string[] = [`account=${account}`]
const queryParts: string[] = []
if (account) {
queryParts.push(`account=${account}`)
}
for (const [key, value] of Object.entries(options || {})) {
queryParts.push(`${key}=${value}`)