Skip to content

Commit 4445d90

Browse files
committed
SDP-1758 Added Wallet History for Stellar Distribution Accounts.
1 parent 548e422 commit 4445d90

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
## Unreleased
8+
9+
### Added
10+
- Added Wallet History for Stellar Distribution Accounts. [#385](https://github.com/stellar/stellar-disbursement-platform-frontend/pull/385)
11+
12+
713
## [5.0.0](https://github.com/stellar/stellar-disbursement-platform-frontend/releases/tag/5.0.0) ([diff](https://github.com/stellar/stellar-disbursement-platform-frontend/compare/4.1.0...5.0.0))
814

915
### Added

src/components/DistributionAccountStellar.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { InfoTooltip } from "@/components/InfoTooltip";
1313
import { LoadingContent } from "@/components/LoadingContent";
1414
import { SectionHeader } from "@/components/SectionHeader";
1515
import { Title } from "@/components/Title";
16+
import { WalletHistory } from "@/components/WalletHistory";
1617
import { WalletTrustlines } from "@/components/WalletTrustlines";
1718
import { useOrgAccountInfo } from "@/hooks/useOrgAccountInfo";
1819
import { useRedux } from "@/hooks/useRedux";
@@ -151,6 +152,17 @@ export const DistributionAccountStellar = () => {
151152
}}
152153
/>
153154

155+
<Card>
156+
<div className="CardStack__card">
157+
<div className="CardStack__title">
158+
<Heading as="h4" size="xs">
159+
Wallet history
160+
</Heading>
161+
</div>
162+
<WalletHistory stellarAddress={distributionAccountPublicKey} />
163+
</div>
164+
</Card>
165+
154166
<ShowForRoles acceptedRoles={["owner", "financial_controller"]}>
155167
<BridgeIntegrationSection
156168
onOptIn={handleBridgeOptIn}

src/components/ReceiverWalletHistory.tsx renamed to src/components/WalletHistory.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import { Card, Link, Profile, Notification } from "@stellar/design-system";
2-
import { STELLAR_EXPERT_URL } from "@/constants/envVariables";
3-
import { useStellarAccountPayments } from "@/apiQueries/useStellarAccountPayments";
4-
import { formatDateTime } from "@/helpers/formatIntlDateTime";
52

6-
import { Table } from "@/components/Table";
3+
import { useStellarAccountPayments } from "@/apiQueries/useStellarAccountPayments";
74
import { AssetAmount } from "@/components/AssetAmount";
85
import { ErrorWithExtras } from "@/components/ErrorWithExtras";
6+
import { Table } from "@/components/Table";
7+
import { STELLAR_EXPERT_URL } from "@/constants/envVariables";
8+
import { formatDateTime } from "@/helpers/formatIntlDateTime";
99

10-
interface ReceiverWalletHistoryProps {
10+
interface WalletHistoryProps {
1111
stellarAddress: string | undefined;
1212
}
1313

14-
export const ReceiverWalletHistory = ({ stellarAddress }: ReceiverWalletHistoryProps) => {
14+
export const WalletHistory = ({ stellarAddress }: WalletHistoryProps) => {
1515
const { isLoading, isFetching, data, error } = useStellarAccountPayments(stellarAddress);
1616

1717
if (stellarAddress && (isLoading || isFetching)) {
@@ -65,7 +65,7 @@ export const ReceiverWalletHistory = ({ stellarAddress }: ReceiverWalletHistoryP
6565
))
6666
) : (
6767
<Table.BodyRow>
68-
<td colSpan={5} className="ReceiverDetails__wallets__noRecentPayments">
68+
<td colSpan={5} className="WalletHistory__noRecentPayments">
6969
No recent payments
7070
</td>
7171
</Table.BodyRow>

src/pages/ReceiverDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import { LoadingContent } from "@/components/LoadingContent";
2323
import { NotificationWithButtons } from "@/components/NotificationWithButtons";
2424
import { ReceiverPayments } from "@/components/ReceiverPayments";
2525
import { ReceiverWalletBalance } from "@/components/ReceiverWalletBalance";
26-
import { ReceiverWalletHistory } from "@/components/ReceiverWalletHistory";
2726
import { SectionHeader } from "@/components/SectionHeader";
27+
import { WalletHistory } from "@/components/WalletHistory";
2828
import { GENERIC_ERROR_MESSAGE, Routes } from "@/constants/settings";
2929
import { formatDateTime } from "@/helpers/formatIntlDateTime";
3030
import { percent } from "@/helpers/formatIntlNumber";
@@ -487,7 +487,7 @@ export const ReceiverDetails = () => {
487487
</SectionHeader.Row>
488488
</SectionHeader>
489489

490-
<ReceiverWalletHistory stellarAddress={selectedWallet.stellarAddress} />
490+
<WalletHistory stellarAddress={selectedWallet.stellarAddress} />
491491
</div>
492492
) : null}
493493
</>

0 commit comments

Comments
 (0)