Skip to content

Commit

Permalink
fix: test error
Browse files Browse the repository at this point in the history
  • Loading branch information
devchenyan committed Jun 30, 2023
1 parent ea962c2 commit 8b3983c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[
{ "difficulty": 0, "expected": "0 Byte" },
{ "difficulty": 245, "expected": "245 Bytes" },
{ "difficulty": 8379, "expected": "8.2 KB" },
{ "difficulty": 29243453, "expected": "27.9 MB" },
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-ui/src/utils/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export const bytesFormatter = (bytes: number, decimals = 1) => {
++i
}

return `${i ? value.toFixed(decimals) : value} ${['bytes', 'KB', 'MB', 'GB'][i]}`
return `${i ? value.toFixed(decimals) : value} ${['Bytes', 'KB', 'MB', 'GB'][i]}`
}

export const padFractionDigitsIfDecimal = (num: string | number, minimumFractionDigits: number): string => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default class LightConnector extends Connector<CKBComponents.Hash> {
.map((v, idx) => {
if (v.depType === DepType.DepGroup) {
const tx = txs[idx]
return tx.txWithStatus ? tx?.txWithStatus?.transaction?.outputsData?.[+v.outPoint.index] : undefined
return tx?.txWithStatus ? tx?.txWithStatus?.transaction?.outputsData?.[+v.outPoint.index] : undefined
}
})
.filter<string>((v): v is string => !!v)
Expand Down

0 comments on commit 8b3983c

Please sign in to comment.