Commit 153f98d7 authored by Mark Harding's avatar Mark Harding
Browse files

(feat): put everything behind a feature flag

parent 0fa095f2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -53,12 +53,14 @@
      <a class="m-page--sidebar--navigation--item"
        routerLink="/wallet/usd"
        routerLinkActive="m-page--sidebar--navigation--item-active"
        *mIfFeature="'wire-multi-currency'"
      >
        <i class="material-icons">attach_money</i>
        <span i18n="@@WALLET__TOKENS__TESTNET_TOKENS">USD Console</span>
      </a>
	  <a class="m-page--sidebar--navigation--item"
        (click)="openBtcSettingsModal()" 
        *mIfFeature="'wire-multi-currency'"
      >
        <i class="material-icons">settings</i>
        <span i18n="@@WALLET__TOKENS__TESTNET_TOKENS">BTC Console</span>
+7 −4
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
      </div>

      <p class="m-wire-creator--subtext" i18n="@@WIRE__CREATOR__WIRE_NOTICE_TOKENS">
        <b>Support <span>@</span>{{owner.username}}</b> by sending them Minds Tokens, ETH, BTC or USD. Once you send them the amount listed in the tiers, you can receive rewards if they are offered (Tokens & USD only). Otherwise, it's a donation.
      <b>Support <span>@</span>{{owner.username}}</b> by sending them Minds Tokens<ng-container *mIfFeature="'wire-multi-currency'">, ETH, BTC or USD</ng-container>. Once you send them the amount listed in the tiers, you can receive rewards if they are offered<ng-container *mIfFeature="'wire-multi-currency'"> (Tokens & USD only)</ng-container>. Otherwise, it's a donation.
      </p>
    </div>
  </div>
@@ -144,6 +144,7 @@
      <li
         (click)="setPayloadType('usd')"
         [class.m-wire--creator-selector--highlight]="!wire.payloadType || wire.payloadType === 'usd'"
         *mIfFeature="'wire-multi-currency'"
        >
          <div class="m-wire--creator-selector-type">
            <i class="material-icons">attach_money</i>
@@ -159,6 +160,7 @@
        <li
         (click)="setPayloadType('eth')"
         [class.m-wire--creator-selector--highlight]="!wire.payloadType || wire.payloadType === 'eth'"
         *mIfFeature="'wire-multi-currency'"
        >
          <div class="m-wire--creator-selector-type">
            <img [src]="minds.cdn_assets_url + '/assets/marketing/ethereum_logo.png'" style="margin-left: -12px">
@@ -174,6 +176,7 @@
        <li
         (click)="setPayloadType('btc')"
         [class.m-wire--creator-selector--highlight]="!wire.payloadType || wire.payloadType === 'btc'"
         *mIfFeature="'wire-multi-currency'"
        >
          <div class="m-wire--creator-selector-type">
            <img [src]="minds.cdn_assets_url + '/assets/marketing/btc.svg'" style="margin-left: -12px">
+10 −1
Original line number Diff line number Diff line
import { Component, Input, Output, EventEmitter } from '@angular/core';

import { FeaturesService } from '../../../../services/features.service';
import { WireRewardsType, WireRewardsStruc, WireRewardsTiers } from '../../interfaces/wire.interfaces';

@Component({
@@ -19,6 +20,10 @@ export class WireCreatorRewardsComponent {
  @Output() selectCurrency: EventEmitter<string> = new EventEmitter(true);
  @Output('selectReward') selectRewardEvt: EventEmitter<any> = new EventEmitter(true);

  constructor(
    private featuresService: FeaturesService,
  ) { }

  selectReward(reward): void {
    this.selectRewardEvt.next(reward);
    // this.selectAmount.next(reward.amount);
@@ -27,9 +32,13 @@ export class WireCreatorRewardsComponent {

  get selectedReward() {
    const methods = [
      { method: 'money', currency: 'usd' },
      { method: 'tokens', currency: 'offchain' },
    ];

    if (this.featuresService.has('wire-multi-currency')) {
      methods.push({ method: 'money', currency: 'usd' });
    }

    for (const method of methods) {
      const match = this.findReward();
      if (match) {