From 49816d60ec2032329b0662b20d0f332785e0d138 Mon Sep 17 00:00:00 2001 From: Stephen Debel Date: Thu, 12 Oct 2023 13:25:06 +0200 Subject: [PATCH] Resolve "Remove Mt. Pelerin functionality" --- src/app/app-routing.module.ts | 4 -- .../account-transaction-list.html | 22 ------- .../account-transaction-list.scss | 18 ----- .../account-transaction-list.ts | 37 +---------- src/app/pages/settings/settings.html | 10 --- .../trading-settings.module.ts | 23 ------- .../trading-settings.page.html | 65 ------------------- .../trading-settings.page.scss | 45 ------------- .../trading-settings/trading-settings.page.ts | 26 -------- src/assets/i18n/en.json | 5 -- 10 files changed, 1 insertion(+), 254 deletions(-) delete mode 100644 src/app/pages/trading-settings/trading-settings.module.ts delete mode 100644 src/app/pages/trading-settings/trading-settings.page.html delete mode 100644 src/app/pages/trading-settings/trading-settings.page.scss delete mode 100644 src/app/pages/trading-settings/trading-settings.page.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 029690ba6..109cd24c4 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -210,10 +210,6 @@ const routes: Routes = [ (m) => m.InteractionSelectionSettingsPageModule ) }, - { - path: 'trading-settings', - loadChildren: () => import('./pages/trading-settings/trading-settings.module').then((m) => m.TradingSettingsPageModule) - }, { path: 'collectibles-list/:id/:publicKey/:protocolID/:addressIndex', resolve: { diff --git a/src/app/pages/account-transaction-list/account-transaction-list.html b/src/app/pages/account-transaction-list/account-transaction-list.html index e1b21c65f..8ae6a2c86 100644 --- a/src/app/pages/account-transaction-list/account-transaction-list.html +++ b/src/app/pages/account-transaction-list/account-transaction-list.html @@ -96,34 +96,12 @@ - - {{ 'account-transaction-list.mtpelerin.buy_label' | translate }} - {{ 'account-transaction-list.receive_label' | translate }} - - {{ 'account-transaction-list.mtpelerin.cash-out_label' | translate }} - { this.actions = actions }) - - // Mt Perelin - this.storageService.get(InternalStorageKey.SETTINGS_TRADING_USE_MTPELERIN).then((active) => { - if (active) { - this.storageProvider.getCache('mtperelin-currencies').then((savedCurrencies) => { - this.wallet.protocol.getSymbol().then((symbol) => { - const validCurrency = Object.values(savedCurrencies).find((currency) => currency.symbol === symbol) - this.isMtPerelinActive = !!active && !!validCurrency - }) - }) - } - }) } public showNoTransactionScreen(): boolean { @@ -435,20 +416,4 @@ export class AccountTransactionListPage { }) }) } - - public async buyMtPerelin() { - this.wallet.protocol.getSymbol().then(async (symbol) => { - const url = `https://buy.mtpelerin.com/?type=direct-link&bdc=${symbol}&rfr=bcH4RmHm` - await this.openModal(url) - // window.open(`https://buy.mtpelerin.com/?type=direct-link&bdc=${symbol}&rfr=bcH4RmHm`, '_blank') - }) - } - - public async sellMtPerelin() { - this.wallet.protocol.getSymbol().then(async (symbol) => { - const url = `https://sell.mtpelerin.com/?type=direct-link&tab=sell&ssc=${symbol}&rfr=bcH4RmHm` - await this.openModal(url) - // window.open(`https://sell.mtpelerin.com/?type=direct-link&tab=sell&ssc=${symbol}&rfr=bcH4RmHm`, '_blank') - }) - } } diff --git a/src/app/pages/settings/settings.html b/src/app/pages/settings/settings.html index c91d29c71..de6383892 100644 --- a/src/app/pages/settings/settings.html +++ b/src/app/pages/settings/settings.html @@ -250,16 +250,6 @@ - - - {{ 'settings.trading_settings.label' | translate }} - - - - {{ 'settings.trading_settings.text' | translate }} - - - {{ 'settings.add-ons_settings.label' | translate }} diff --git a/src/app/pages/trading-settings/trading-settings.module.ts b/src/app/pages/trading-settings/trading-settings.module.ts deleted file mode 100644 index efc260bc0..000000000 --- a/src/app/pages/trading-settings/trading-settings.module.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { NgModule } from '@angular/core' -import { CommonModule } from '@angular/common' -import { FormsModule } from '@angular/forms' - -import { IonicModule } from '@ionic/angular' - -import { TranslateModule } from '@ngx-translate/core' -import { ComponentsModule } from '@airgap/angular-core' -import { RouterModule } from '@angular/router' -import { TradingSettingsPage } from './trading-settings.page' - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - IonicModule, - ComponentsModule, - TranslateModule, - RouterModule.forChild([{ path: '', component: TradingSettingsPage }]) - ], - declarations: [TradingSettingsPage] -}) -export class TradingSettingsPageModule {} diff --git a/src/app/pages/trading-settings/trading-settings.page.html b/src/app/pages/trading-settings/trading-settings.page.html deleted file mode 100644 index 803f36f8d..000000000 --- a/src/app/pages/trading-settings/trading-settings.page.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - {{ 'settings.trading_settings.text' | translate }} - - - - - - {{ 'settings.trading_settings.mtpelerin' | translate }} - - -
- -

{{ 'mtpelerin.header1' | translate }}

-

- {{ 'mtpelerin.paragraph1' | translate }} -

-

{{ 'mtpelerin.header2' | translate }}

-
    -
  • {{ 'mtpelerin.lineItem1' | translate }}
  • -
  • {{ 'mtpelerin.lineItem2' | translate }}
  • -
  • {{ 'mtpelerin.lineItem3' | translate }}
  • -
- - - - - {{ 'mtpelerin.button1' | translate }} - - - - - - - {{ 'mtpelerin.button2' | translate }} - - - - - - {{ 'mtpelerin.note' | translate }} - - - {{ 'mtpelerin.noteLink1' | translate }}, {{ 'mtpelerin.noteLink2' | translate }} - -
-
diff --git a/src/app/pages/trading-settings/trading-settings.page.scss b/src/app/pages/trading-settings/trading-settings.page.scss deleted file mode 100644 index ccd470568..000000000 --- a/src/app/pages/trading-settings/trading-settings.page.scss +++ /dev/null @@ -1,45 +0,0 @@ -.mtpelerin-wrapper { - display: flex; - flex-direction: column; - padding: 24px; - - .buttons-wrapper { - display: flex; - flex-direction: column; - } - - img { - height: 48px; - width: fit-content; - } - - h3 { - color: white; - margin-top: 32px; - margin-bottom: 0px; - font-size: 18px; - font-weight: bold; - } - - p { - margin-top: 12px; - margin-bottom: 0px; - font-size: 14px; - font-weight: 400; - } - - ul { - margin-top: 12px; - margin-bottom: 32px; - font-size: 14px; - font-weight: 400; - } - - span { - margin-top: 12px; - margin-bottom: 0px; - font-size: 12px; - font-weight: 400; - color: gray; - } -} diff --git a/src/app/pages/trading-settings/trading-settings.page.ts b/src/app/pages/trading-settings/trading-settings.page.ts deleted file mode 100644 index b10cfc5e8..000000000 --- a/src/app/pages/trading-settings/trading-settings.page.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { InternalStorageKey, InternalStorageService } from '@airgap/angular-core' -import { Component } from '@angular/core' - -@Component({ - selector: 'app-trading-settings', - templateUrl: './trading-settings.page.html', - styleUrls: ['./trading-settings.page.scss'] -}) -export class TradingSettingsPage { - public useMtPerelin: boolean = false - - public constructor(private readonly storageService: InternalStorageService) { - this.storageService.get(InternalStorageKey.SETTINGS_TRADING_USE_MTPELERIN).then((value) => { - this.useMtPerelin = value - }) - } - - public async toggleUseMtPerelin(event: any) { - const value = event.detail.checked - await this.storageService.set(InternalStorageKey.SETTINGS_TRADING_USE_MTPELERIN, value) - } - - public navigate(path: string) { - window.open(path, '_blank') - } -} diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 4f617f47f..7fa684bb4 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -190,11 +190,6 @@ "label": "Interaction Setting", "text": "Vault and Wallet Interaction Settings" }, - "trading_settings": { - "label": "Trading", - "text": "Advanced Trading Settings", - "mtpelerin": "Use Mt Pelerin" - }, "add-ons_settings": { "label": "Add-ons", "isolated-modules_text": "Isolated Modules"