Skip to content

Commit 42cdb48

Browse files
authored
Add steem.api.findChangeRecoveryAccountRequests (#509)
1 parent 450f19f commit 42cdb48

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

doc/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,30 @@ Return Example:
11561156
{ account: 'username-taken', reputation: 0 } ]
11571157
```
11581158
- - - - - - - - - - - - - - - - - -
1159+
## Recovery Account Change Requests
1160+
Get the change requests of recovery account for multiple accounts.
1161+
1162+
```js
1163+
steem.api.findChangeRecoveryAccountRequests(['justyy222', 'ety001', 'justyy'], function(err, data) {
1164+
console.log(err, data);
1165+
});
1166+
```
1167+
1168+
Return Example:
1169+
1170+
```js
1171+
{"requests":
1172+
[
1173+
{
1174+
"id":2238,
1175+
"account_to_recover":"justyy222",
1176+
"recovery_account":"happyukgo",
1177+
"effective_on":"2024-09-24T06:15:33"
1178+
}
1179+
]
1180+
}
1181+
```
1182+
- - - - - - - - - - - - - - - - - -
11591183
## Market
11601184
- - - - - - - - - - - - - - - - - -
11611185
### Get Order Book

src/api/methods.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,5 +521,11 @@ export default [
521521
"api": "condenser_api",
522522
"method": "get_expiring_vesting_delegations",
523523
"params": ["account", "start", "limit"],
524+
},
525+
{
526+
"api": "database_api",
527+
"method": "find_change_recovery_account_requests",
528+
"params": ["account"],
529+
"is_object": true
524530
}
525531
];

test/api.test.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,5 +346,18 @@ describe('steem.api:', function () {
346346
steem.api.listeners('message').should.have.lengthOf(0);
347347
});
348348
});
349-
})
349+
});
350+
351+
describe('Account Recovery', () => {
352+
describe('findChangeRecoveryAccountRequests', () => {
353+
it('works', async () => {
354+
const result = await steem.api.findChangeRecoveryAccountRequestsAsync(["justyy", "ety001"]);
355+
result.should.have.properties("requests");
356+
result.requests.should.have.properties("length");
357+
});
358+
it('clears listeners', async () => {
359+
steem.api.listeners('message').should.have.lengthOf(0);
360+
});
361+
});
362+
});
350363
});

0 commit comments

Comments
 (0)