Skip to content

Commit

Permalink
Fix: show boolean values in call (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut authored Aug 5, 2024
1 parent 6c8bab3 commit 3485f5c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/ui/src/components/CallInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ const handleBalanceDisplay = ({
)
}

const handleValueDisplay = ({ value, typeName }: { value: any; typeName: string | undefined }) =>
typeName === 'bool' ? (value ? 'true' : 'false') : value

const getTypeName = (index: number, name: string, api: ApiPromise) => {
const [pallet, method] = name.split('.')
const metaArgs = !!pallet && !!method && api.tx[pallet][method]?.meta?.args
Expand Down Expand Up @@ -153,7 +156,7 @@ const createUlTree = ({ name, args, decimals, unit, api, typeName }: CreateTreeP
api,
typeName: _typeName
})
: value}
: handleValueDisplay({ value, typeName: _typeName })}
</li>
)
})}
Expand Down

0 comments on commit 3485f5c

Please sign in to comment.