Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyouxin committed Jul 14, 2023
1 parent e79ec27 commit 944a894
Show file tree
Hide file tree
Showing 7 changed files with 216 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ import LockInfoDialog from 'components/LockInfoDialog'
import { useState as useGlobalState } from 'states'
import styles from './cellsCard.module.scss'

const TabsVariantWithCellsCard: FC<VariantProps<{
title: string
cells: (State.DetailedInput | State.DetailedOutput)[]
}>> = ({ tabs, selectedTab, onTabChange }) => {
const TabsVariantWithCellsCard: FC<
VariantProps<{
title: string
cells: (State.DetailedInput | State.DetailedOutput)[]
}>
> = ({ tabs, selectedTab, onTabChange }) => {
const [t] = useTranslation()
const {
chain: { networkID },
Expand Down
10 changes: 6 additions & 4 deletions packages/neuron-ui/src/components/NervosDAODetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ import styles from './nervosDAODetail.module.scss'
import hooks from './hooks'
import CellsCard from './CellsCard'

const TabsVariantWithTxTypes: FC<VariantProps<{
title: string
hash: string
}>> = ({ tabs, selectedTab, onTabChange }) => {
const TabsVariantWithTxTypes: FC<
VariantProps<{
title: string
hash: string
}>
> = ({ tabs, selectedTab, onTabChange }) => {
const [t] = useTranslation()
const [transaction, setTransaction] = useState(transactionState)
const [error, setError] = useState<string>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -714,15 +714,15 @@ export class TransactionGenerator {

public static async generateDestroyAssetAccountTx(
walletId: string,
asssetAccountInputs: Input[],
assetAccountInputs: Input[],
changeBlake160: string,
isCKBAccount: boolean
) {
const secpCellDep = await SystemScriptInfo.getInstance().getSecpCellDep()
const assetAccountInfo = new AssetAccountInfo()

const cellDeps = [secpCellDep, assetAccountInfo.anyoneCanPayCellDep]
if (asssetAccountInputs.some(v => v.type && v.data !== '0x' && BigInt(v.data || 0) !== BigInt(0))) {
if (assetAccountInputs.some(v => v.type && v.data !== '0x' && BigInt(v.data || 0) !== BigInt(0))) {
throw new SudtAcpHaveDataError()
}
if (!isCKBAccount) {
Expand All @@ -738,13 +738,13 @@ export class TransactionGenerator {
version: '0',
headerDeps: [],
cellDeps,
inputs: asssetAccountInputs,
inputs: assetAccountInputs,
outputs: [output],
outputsData: [output.data],
witnesses: [],
})

let allCapacities = asssetAccountInputs.reduce((a, b) => {
let allCapacities = assetAccountInputs.reduce((a, b) => {
return a + BigInt(b.capacity as string)
}, BigInt(0))
tx.fee = TransactionFee.fee(TransactionSize.tx(tx), BigInt(1e4)).toString()
Expand Down
Loading

0 comments on commit 944a894

Please sign in to comment.