Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Add sponsor address to AccountDetails. (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
fnando authored Feb 25, 2021
1 parent 442d815 commit 5e68db7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## In master

- [Fixed] Added sponsor address to `AccountDetails`.

## [v0.3.0-rc.6](https://github.com/stellar/js-stellar-wallets/compare/v0.3.0-rc.5...v0.3.0-rc.6)

- Added sponsoring address to `AccountDetails` and `AssetBalance`.
Expand Down
4 changes: 4 additions & 0 deletions src/data/DataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,12 @@ export class DataProvider {
.call();

const balances = makeDisplayableBalances(accountSummary);
const sponsor = accountSummary.sponsor
? { sponsor: accountSummary.sponsor }
: {};

return {
...sponsor,
id: accountSummary.id,
subentryCount: accountSummary.subentry_count,
sponsoredCount: accountSummary.num_sponsored,
Expand Down
1 change: 1 addition & 0 deletions src/types/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export interface AccountDetails {
subentryCount: number;
sponsoringCount: number;
sponsoredCount: number;
sponsor?: string;
inflationDestination?: string;
thresholds: Horizon.AccountThresholds;
signers: ServerApi.AccountRecordSigners[];
Expand Down

0 comments on commit 5e68db7

Please sign in to comment.