Skip to content

Commit

Permalink
fix(xudt-allocation): wrong name
Browse files Browse the repository at this point in the history
  • Loading branch information
Daryl-L committed Jul 3, 2024
1 parent be460aa commit 75ca92b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/models/Xudt/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Script } from '../Script'

export interface XUDTHolderAllocation {
btcHoldersCount: string
btcHolderCount: string
lockHashes: {
name: string
holderCount: string
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Xudt/UDTComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const UDTOverviewCard = ({
)

const ckbHolderAmount = holderAllocation?.lockHashes.reduce((acc, cur) => acc + +cur.holderCount, 0) ?? 0
const holderCount = holderAllocation ? ckbHolderAmount + +(holderAllocation?.btcHoldersCount ?? 0) : 0
const holderCount = holderAllocation ? ckbHolderAmount + +(holderAllocation?.btcHolderCount ?? 0) : 0

const items: CardCellInfo<'left' | 'right'>[] = [
{
Expand Down Expand Up @@ -204,7 +204,7 @@ export const UDTOverviewCard = ({
<SimpleModal isShow={showHolderAmountModal} setIsShow={setShowHolderAmountModal}>
<HolderAllocation
ckbHolderAmount={localeNumberString(ckbHolderAmount)}
btcHolderAmount={holderAllocation.btcHoldersCount}
btcHolderAmount={holderAllocation.btcHolderCount}
lockHoderAmount={holderAllocation.lockHashes}
onClose={() => setShowHolderAmountModal(false)}
/>
Expand Down

0 comments on commit 75ca92b

Please sign in to comment.