Skip to content
Permalink
Browse files

[DDW-983] Hide notification for zero amount legacy wallet

  • Loading branch information...
daniloprates committed Nov 8, 2019
1 parent c932768 commit 4eabe23f363999a77959551c82b4f1e0e6e7e5ff
@@ -35,6 +35,12 @@ export default class TopBar extends Component<Props> {
activeWallet ? styles.withWallet : styles.withoutWallet,
]);

const hasLegacyNotification =
activeWallet &&
activeWallet.isLegacy &&
activeWallet.amount > 0 &&
onTransferFunds;

const topBarTitle = activeWallet ? (
<span className={styles.walletInfo}>
<span className={styles.walletName}>
@@ -69,7 +75,7 @@ export default class TopBar extends Component<Props> {
)}
{children}
</div>
{activeWallet && activeWallet.isLegacy && onTransferFunds && (
{hasLegacyNotification && (
<LegacyNotification
onLearnMore={() => null}
onTransferFunds={() => onTransferFunds(activeWallet.id)}
@@ -184,6 +184,7 @@ export default class StoryLayout extends Component<Props> {
showSubMenuToggle
showSubMenus={this.isShowingSubMenus}
leftIcon={this.isShowingSubMenus ? menuIconOpened : menuIconClosed}
onTransferFunds={action('onTransferFunds')}
>
<NodeSyncStatusIcon
networkStatus={{
@@ -36,7 +36,7 @@ export const WALLETS = [
},
{
id: '2',
name: 'Legacy',
name: 'Legacy with funds',
amount: new BigNumber(55.555),
hasPassword: false,
passwordUpdateDate: new Date(),
@@ -48,6 +48,18 @@ export const WALLETS = [
},
{
id: '3',
name: 'Legacy with no funds',
amount: new BigNumber(0),
hasPassword: false,
passwordUpdateDate: new Date(),
syncState: { data: null, tag: 'synced' },
isLegacy: true,
recoveryPhraseVerificationDate: moment()
.subtract(200, 'days')
.toDate(),
},
{
id: '4',
name: 'Restoring',
amount: new BigNumber(12.345),
hasPassword: false,

0 comments on commit 4eabe23

Please sign in to comment.
You can’t perform that action at this time.