Skip to content

Commit 06d3d15

Browse files
committed
use getSignaturesForAddress
1 parent 7bf23f2 commit 06d3d15

File tree

1 file changed

+10
-0
lines changed
  • governance/xc_admin/packages/xc_admin_frontend/components/tabs/Proposals

1 file changed

+10
-0
lines changed

governance/xc_admin/packages/xc_admin_frontend/components/tabs/Proposals/ProposalRow.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export const ProposalRow = ({
5555

5656
// set proposal time
5757
if (!time) {
58+
<<<<<<< HEAD
5859
connection
5960
.getSignaturesForAddress(proposal.publicKey)
6061
.then((txs) => {
@@ -69,6 +70,15 @@ export const ProposalRow = ({
6970
`Error fetching proposal time for ${proposal.publicKey.toBase58()}: ${err}`
7071
)
7172
})
73+
=======
74+
connection.getSignaturesForAddress(proposal.publicKey).then((txs) => {
75+
if (isCancelled) return
76+
const firstBlockTime = txs?.[txs.length - 1]?.blockTime
77+
if (firstBlockTime) {
78+
setTime(new Date(firstBlockTime * 1000))
79+
}
80+
})
81+
>>>>>>> c6a78a605 (use getSignaturesForAddress)
7282
}
7383

7484
// calculate instructions summary

0 commit comments

Comments
 (0)