Skip to content

Commit

Permalink
Fix polkadot, kusama weight type (#222)
Browse files Browse the repository at this point in the history
* fix: polkadot, kusama weight type

* fix: check null
  • Loading branch information
WoeOm committed Jun 6, 2023
1 parent 038dd5e commit 41252fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Entries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function MemberStatus(props: { entry: Entry; pair: KeyringJson; isInProgress: bo
if (!approved) {
return <div>-</div>;
}
const matched = (entry?.approveRecords?.nodes as ApproveRecord[]).find((item) => item.account === address);
const matched = (entry?.approveRecords?.nodes as ApproveRecord[])?.find((item) => item.account === address);

if (!matched) {
return (
Expand Down
8 changes: 8 additions & 0 deletions src/providers/api-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ export const ApiProvider = ({ children }: React.PropsWithChildren<unknown>) => {
refTime: 'Compact<u64>',
proofSize: 'Compact<u64>',
},
Weight: {
refTime: 'Compact<u64>',
proofSize: 'Compact<u64>',
},
},
},
],
Expand All @@ -192,6 +196,10 @@ export const ApiProvider = ({ children }: React.PropsWithChildren<unknown>) => {
refTime: 'Compact<u64>',
proofSize: 'Compact<u64>',
},
Weight: {
refTime: 'Compact<u64>',
proofSize: 'Compact<u64>',
},
},
},
],
Expand Down

0 comments on commit 41252fc

Please sign in to comment.