Skip to content

Commit

Permalink
[DDW-500] Avoid displaying Asset title in Tx wo assets
Browse files Browse the repository at this point in the history
  • Loading branch information
thedanheller committed Feb 26, 2021
1 parent 8723b17 commit 699b374
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -406,14 +406,18 @@ export default class Transaction extends Component<Props, State> {
};

get hasAssets(): boolean {
const { data, hasAssetsEnabled } = this.props;
return hasAssetsEnabled && data.assets.length > 0;
return !!this.assetsList.length;
}

get assetsList(): Array<WalletTransactionAsset> {
const { assetsDetails, data, isInternalAddress } = this.props;
const {
assetsDetails,
data,
isInternalAddress,
hasAssetsEnabled,
} = this.props;

if (!this.hasAssets) {
if (!hasAssetsEnabled) {
return [];
}

Expand Down

0 comments on commit 699b374

Please sign in to comment.