Skip to content

Commit

Permalink
Fix collectives payment info
Browse files Browse the repository at this point in the history
  • Loading branch information
wliyongfeng committed Apr 7, 2024
1 parent 625d3ed commit b112bf0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,20 @@ import dayjs from "dayjs";
import Descriptions from "next-common/components/Descriptions";
import AddressUser from "next-common/components/user/addressUser";
import ValueDisplay from "next-common/components/valueDisplay";
import { useChainSettings } from "next-common/context/chain";
import { cn, toPrecision } from "next-common/utils";
import { useSalaryAsset } from "next-common/hooks/useSalaryAsset";

const subColumns = [
{
name: "id",
cellRender(data) {
if (!data?.paymentId) {
return null;
}

return data.paymentId;
},
},
{
name: "beneficiary",
cellRender(data) {
Expand All @@ -26,9 +36,8 @@ const subColumns = [
return <AmountValue data={data} />;
},
},
// FIXME: cycle, registrations paymentID
{
name: "indexer",
name: "time",
cellRender(data) {
if (!data?.paidIndexer) {
return null;
Expand Down Expand Up @@ -92,7 +101,7 @@ function BeneficiaryValue({ data }) {
}

function AmountValue({ data }) {
const { decimals, symbol } = useChainSettings();
const { decimals, symbol } = useSalaryAsset();

return (
<ValueDisplay value={toPrecision(data?.amount, decimals)} symbol={symbol} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function FellowshipSalaryPaidFeed({ feed = {} }) {
<>
<AddressUser key={who} add={who} noTooltip />
<span>
&nbsp;was
&nbsp;was&nbsp;
<FellowshipFeedEventLabel>Paid</FellowshipFeedEventLabel>
&nbsp;
<FellowshipFeedEventLabel>
Expand Down

0 comments on commit b112bf0

Please sign in to comment.