fix minimum rent error and lamports conversion
This commit is contained in:
@@ -4,6 +4,7 @@ import React from 'react'
|
||||
import { YStack, XStack, Text } from 'tamagui'
|
||||
import { StatusBadge } from './StatusBadge'
|
||||
import type { EscrowAccountWithPda } from '@descro/sdk'
|
||||
import { lamportsToSolString } from '@/util/lamports'
|
||||
function truncAddr(addr: string): string {
|
||||
return `${addr.slice(0, 4)}…${addr.slice(-4)}`
|
||||
}
|
||||
@@ -16,7 +17,7 @@ interface EscrowCardProps {
|
||||
|
||||
export function EscrowCard({ item, selected, onSelect }: EscrowCardProps) {
|
||||
const { pda, account } = item
|
||||
const solAmount = (Number(account.amount.toString()) / 1e9).toFixed(4)
|
||||
const solAmount = lamportsToSolString(account.amount, 4)
|
||||
|
||||
return (
|
||||
<YStack
|
||||
|
||||
Reference in New Issue
Block a user