Skip to content

Commit

Permalink
Merge branch 'release/7.0.0' into fix/LW-11924-links-styling
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonmaslowski authored Dec 3, 2024
2 parents 832e3c2 + 8074836 commit 0265c84
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
2 changes: 0 additions & 2 deletions source/renderer/app/components/voting/VotingUnavailable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
flex: 1;
flex-direction: column;
justify-content: center;
margin-bottom: -40px;
padding: 20px;
text-align: center;

h1 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ function VotingPowerDelegation({
placeholder={intl.formatMessage(messages.selectWalletPlaceholder)}
value={state.selectedWallet?.id || null}
getStakePoolById={getStakePoolById}
disableSyncingWallets
/>

{state.selectedWallet && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type Props = {
value?: string;
errorPosition?: string;
disabled?: boolean;
disableSyncingWallets?: boolean;
wallets?: Array<Partial<Wallet>>;
};
export const onSearchWalletsDropdown = (
Expand All @@ -46,6 +47,7 @@ function WalletsDropdown({
numberOfStakePools,
onSearch = onSearchWalletsDropdown,
wallets = [],
disableSyncingWallets,
...props
}: Props) {
const discreetModeFeature = useDiscreetModeFeature();
Expand Down Expand Up @@ -81,6 +83,7 @@ function WalletsDropdown({
walletName: wallet.name,
isSyncing,
syncingProgress,
isDisabled: disableSyncingWallets ? isSyncing : false,
};
});
return (
Expand Down
14 changes: 14 additions & 0 deletions source/renderer/app/containers/voting/VotingGovernancePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { InjectedProps } from '../../types/injectedPropsType';
import VotingPowerDelegation from '../../components/voting/voting-governance/VotingPowerDelegation';
import VotingPowerDelegationConfirmationDialog from '../../components/voting/voting-governance/VotingPowerDelegationConfirmationDialog';
import { ROUTES } from '../../routes-config';
import VotingUnavailable from '../../components/voting/VotingUnavailable';

type Props = InjectedProps;

Expand All @@ -22,8 +23,21 @@ class VotingGovernancePage extends Component<Props> {
app,
voting,
hardwareWallets,
networkStatus,
} = this.props.stores;
const { openExternalLink } = app;
const { isSynced, syncPercentage } = networkStatus;

if (!isSynced) {
return (
<VotingUnavailable
syncPercentage={syncPercentage}
// @ts-ignore ts-migrate(2322) FIXME: Type '{ syncPercentage: any; onExternalLinkClick: ... Remove this comment to see the full error message
onExternalLinkClick={openExternalLink}
/>
);
}

return (
<VotingPowerDelegation
onExternalLinkClick={openExternalLink}
Expand Down
4 changes: 3 additions & 1 deletion source/renderer/app/utils/transactionsCsvGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ const transactionsCsvGenerator = async ({

const valueTokens = filterAssets(assets, type, isInternalAddress)
.map(({ policyId, assetName, quantity }) => {
const { fingerprint, metadata } = getAsset(policyId, assetName);
const assetData = getAsset(policyId, assetName);
const fingerprint = assetData?.fingerprint || 'unknown fingerprint';
const metadata = assetData?.metadata || {};
const formattedAmount = formattedTokenWalletAmount(
quantity,
metadata,
Expand Down

0 comments on commit 0265c84

Please sign in to comment.