Skip to content

Commit 544becd

Browse files
committed
fix(neuron-ui): fix the yield of nervos dao records
1 parent 3b72042 commit 544becd

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

packages/neuron-ui/src/components/CustomRows/DAORecordRow.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import calculateAPY from 'utils/calculateAPY'
66
import { shannonToCKBFormatter, uniformTimeFormatter, localNumberFormatter } from 'utils/formatters'
77
import calculateClaimEpochNumber from 'utils/calculateClaimEpochNumber'
88
import { epochParser } from 'utils/parsers'
9-
// import { WITHDRAW_EPOCHS } from 'utils/const'
109

1110
import * as styles from './daoRecordRow.module.scss'
1211

@@ -39,8 +38,17 @@ const DAORecord = ({
3938
if (!withdrawBlockHash) {
4039
return
4140
}
41+
const formattedDepositOutPoint = depositOutPoint
42+
? {
43+
txHash: depositOutPoint.txHash,
44+
index: BigInt(depositOutPoint.index),
45+
}
46+
: {
47+
txHash,
48+
index: BigInt(index),
49+
}
4250
;(ckbCore.rpc as any)
43-
.calculateDaoMaximumWithdraw({ txHash, index: `0x${BigInt(index).toString(16)}` }, withdrawBlockHash)
51+
.calculateDaoMaximumWithdraw(formattedDepositOutPoint, withdrawBlockHash)
4452
.then((res: string) => {
4553
setWithdrawValue(BigInt(res).toString())
4654
})

0 commit comments

Comments
 (0)