Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
Develop

See merge request papers/airgap/airgap-wallet!716
  • Loading branch information
godenzim committed Oct 12, 2023
2 parents ddab971 + c4922d8 commit 404bf79
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 254 deletions.
4 changes: 0 additions & 4 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,34 +96,12 @@
<ion-fab vertical="bottom" slot="fixed">
<ion-row>
<ion-col>
<ion-button
*ngIf="isMtPerelinActive"
class="mt-perelin-button"
expand="full"
size="default"
color="white"
(click)="buyMtPerelin()"
shape="round"
>
{{ 'account-transaction-list.mtpelerin.buy_label' | translate }}
</ion-button>
<ion-button id="receive" expand="full" size="default" color="primary" (click)="openReceivePage()" shape="round">
<ion-icon slot="start" src="./assets/custom-ion-icons/md-call_received.svg"></ion-icon>
{{ 'account-transaction-list.receive_label' | translate }}
</ion-button>
</ion-col>
<ion-col>
<ion-button
*ngIf="isMtPerelinActive"
class="mt-perelin-button"
expand="full"
size="default"
color="white"
(click)="sellMtPerelin()"
shape="round"
>
{{ 'account-transaction-list.mtpelerin.cash-out_label' | translate }}
</ion-button>
<ion-button
id="send"
expand="full"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,3 @@ ion-fab {
svg {
stroke: none;
}

.mt-perelin-button {
border: 1px solid gray;
border-radius: 100px;

div {
display: flex;
align-items: center;
gap: 8px;
margin-left: auto;
font-size: 12px;
color: rgb(83, 83, 83);

img {
height: 18px;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
createV0TezosKtProtocol,
ICoinSubProtocolAdapter,
InternalStorageKey,
InternalStorageService,
ProtocolService
} from '@airgap/angular-core'
import { createV0TezosKtProtocol, ICoinSubProtocolAdapter, ProtocolService } from '@airgap/angular-core'
import { AirGapMarketWallet, IAirGapTransaction, MainProtocolSymbols, SubProtocolSymbols } from '@airgap/coinlib-core'
import { Action } from '@airgap/coinlib-core/actions/Action'
import { IAirGapAddressResult } from '@airgap/coinlib-core/interfaces/IAirGapAddress'
Expand Down Expand Up @@ -122,7 +116,6 @@ export class AccountTransactionListPage {
private readonly pushBackendProvider: PushBackendProvider,
private readonly extensionsService: ExtensionsService,
private readonly browserService: BrowserService,
private readonly storageService: InternalStorageService,
private readonly modalController: ModalController
) {
this.isDesktop = this.platform.is('desktop')
Expand Down Expand Up @@ -166,18 +159,6 @@ export class AccountTransactionListPage {
this.actionGroup.getActions().then((actions) => {
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 {
Expand Down Expand Up @@ -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')
})
}
}
10 changes: 0 additions & 10 deletions src/app/pages/settings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,6 @@
</ion-item>
</ion-list>

<ion-list lines="none">
<ion-list-header class="ion-no-margin" lines="none">
<ion-label>{{ 'settings.trading_settings.label' | translate }}</ion-label>
</ion-list-header>
<ion-item (click)="goToTradingSettings()" detail="true">
<ion-icon name="repeat-outline" slot="start"></ion-icon>
{{ 'settings.trading_settings.text' | translate }}
</ion-item>
</ion-list>

<ion-list lines="none">
<ion-list-header class="ion-no-margin" lines="none">
<ion-label>{{ 'settings.add-ons_settings.label' | translate }}</ion-label>
Expand Down
23 changes: 0 additions & 23 deletions src/app/pages/trading-settings/trading-settings.module.ts

This file was deleted.

65 changes: 0 additions & 65 deletions src/app/pages/trading-settings/trading-settings.page.html

This file was deleted.

45 changes: 0 additions & 45 deletions src/app/pages/trading-settings/trading-settings.page.scss

This file was deleted.

26 changes: 0 additions & 26 deletions src/app/pages/trading-settings/trading-settings.page.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 404bf79

Please sign in to comment.