Skip to content

Commit

Permalink
Hotfix for pallet method undefined (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut authored Oct 17, 2023
1 parent 1195cad commit 2db0e8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ui/src/components/CallInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const handleBalanceDisplay = ({

const getTypeName = (index: number, name: string, api: ApiPromise) => {
const [pallet, method] = name.split('.')
const metaArgs = !!pallet && !!method && api.tx[pallet][method].meta.args
const metaArgs = !!pallet && !!method && api.tx[pallet][method]?.meta?.args

return (
(!!metaArgs && metaArgs[index] && (metaArgs[index].toHuman().typeName as string)) || undefined
Expand All @@ -125,7 +125,7 @@ const createUlTree = ({ name, args, decimals, unit, api, typeName }: CreateTreeP
}

if (_typeName === 'RuntimeCall') {
return handleCallDisplay({ call: value, decimals, unit, api, key: `${key}` })
return handleCallDisplay({ call: value, decimals, unit, api, key: `${key}-call` })
}

// generically show nice value for Balance type
Expand Down

0 comments on commit 2db0e8a

Please sign in to comment.