Skip to content

Commit

Permalink
fix: use dynamic pallet (#2897)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuul-wq authored Dec 25, 2024
1 parent d8a6d9d commit b2b4de1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ type Props = PropsWithChildren & {

export const AssembledAssetAmount = ({ balance, asset }: Props) => {
const { t } = useI18n();

const fiatFlag = useUnit(priceProviderModel.$fiatFlag);

if (!balance?.free) {
return (
<div className="flex flex-col items-end gap-y-1">
<Skeleton width={20} height={5} />
{fiatFlag && <Skeleton width={14} height={5} />}
<Skeleton width={20} height={4} />
{fiatFlag && <Skeleton width={14} height={4} />}
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/shared/api/balances/service/balanceService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function subscribeStatemineAssetsChange(
throw new Error(`Pallet ${pallet} not found.`);
}

const type = api.tx.foreignAssets.transfer.meta.args[0].type;
const type = api.tx[pallet]?.transfer.meta.args[0].type;
if (nullable(type)) {
return Promise.resolve(noop);
}
Expand Down

0 comments on commit b2b4de1

Please sign in to comment.