mirror of
https://github.com/wharfkit/hyperion.git
synced 2026-07-21 17:33:28 +00:00
Merge pull request #5 from includenull/master
Allow get_actions method to accept optional account parameter
This commit is contained in:
+2
-2
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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}`)
|
||||
|
||||
Reference in New Issue
Block a user