From bb11aa365824690ec340b6ca13e1fc387ed3c4e8 Mon Sep 17 00:00:00 2001 From: includenull <15929809+includenull@users.noreply.github.com> Date: Fri, 27 Feb 2026 16:47:45 +0000 Subject: [PATCH] Allow get_actions method to accept optional account parameter --- package.json | 4 ++-- src/endpoints/v2/v2.ts | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 55cf1be..bdde2b2 100644 --- a/package.json +++ b/package.json @@ -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" } -} +} \ No newline at end of file diff --git a/src/endpoints/v2/v2.ts b/src/endpoints/v2/v2.ts index 4c7ed4d..89d36e0 100644 --- a/src/endpoints/v2/v2.ts +++ b/src/endpoints/v2/v2.ts @@ -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}`)