Skip to content

Commit

Permalink
fix: 🐞 create asset wizard bug deveop (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
saviojks authored Oct 18, 2024
1 parent 772867d commit 10357fd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/components/Tabs/Assets/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { PropsWithChildren } from 'react';
import Table, { ITable } from '@/components/Table';
import { CustomFieldWrapper, CustomLink } from '@/components/Table/styles';
import Tooltip from '@/components/Tooltip';
Expand All @@ -8,7 +7,7 @@ import { parseApr } from '@/utils';
import { formatAmount } from '@/utils/formatFunctions';
import { useTranslation } from 'next-i18next';
import Link from 'next/link';
import React from 'react';
import React, { PropsWithChildren } from 'react';

interface IAssets {
assetsTableProps: IInnerTableProps;
Expand All @@ -30,7 +29,7 @@ const Assets: React.FC<PropsWithChildren<IAssets>> = ({
'Token Type',
'Precision',
'Balance',
'Frozen',
'Staking',
'Unfrozen',
'Staking Type',
'',
Expand Down Expand Up @@ -100,7 +99,10 @@ const Assets: React.FC<PropsWithChildren<IAssets>> = ({
{
element: props => (
<Tooltip
msg={`${(frozenBalance / 10 ** precision).toLocaleString()} ${ticker}`}
msg={`${(
frozenBalance /
10 ** precision
).toLocaleString()} ${ticker}`}
Component={() => (
<CustomFieldWrapper>
<span key={frozenBalance}>
Expand All @@ -115,7 +117,10 @@ const Assets: React.FC<PropsWithChildren<IAssets>> = ({
{
element: props => (
<Tooltip
msg={`${(unfrozenBalance / 10 ** precision).toLocaleString()} ${ticker}`}
msg={`${(
unfrozenBalance /
10 ** precision
).toLocaleString()} ${ticker}`}
Component={() => (
<CustomFieldWrapper>
<span key={unfrozenBalance}>
Expand Down
4 changes: 4 additions & 0 deletions src/components/TransactionForms/CustomForms/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export const parseSplitRoyalties = (data: any): void => {
if (data?.transferPercentage) {
delete data.transferPercentage;
}
if (!data.royalties) {
data.royalties = {};
return;
}
if (
data.royalties?.splitRoyalties === undefined ||
!data.royalties?.splitRoyalties?.length
Expand Down

0 comments on commit 10357fd

Please sign in to comment.