Skip to content

Commit

Permalink
Merge pull request #11682 from cmgustavo/ref/wallet-connect-02
Browse files Browse the repository at this point in the history
APP-253: Change name of walletConnect on local storage
  • Loading branch information
gabrielbazan7 authored May 26, 2021
2 parents 848b74e + 785789b commit 4127a70
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/pages/home/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ export class HomePage {
this.hasOldCoinbaseSession = x.oldLinked;
if (this.showCoinbase) this.addCoinbase();
break;
case 'walletConnect':
case 'newWalletConnect':
this.showWalletConnect = x.show;
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as _ from 'lodash';
templateUrl: 'wallet-connect-settings.html'
})
export class WalletConnectSettingsPage {
private serviceName: string = 'walletConnect';
private serviceName: string = 'newWalletConnect';
public showInHome;
public service;

Expand Down
2 changes: 1 addition & 1 deletion src/pages/settings/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ export class SettingsPage {
case 'giftcards':
this.navCtrl.push(GiftCardsSettingsPage);
break;
case 'walletConnect':
case 'newWalletConnect':
this.navCtrl.push(WalletConnectSettingsPage);
break;
}
Expand Down
8 changes: 5 additions & 3 deletions src/providers/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export interface Config {
exchangecrypto: boolean;
giftcards: boolean;
walletConnect: boolean;
newWalletConnect: boolean;
};

pushNotifications: {
Expand Down Expand Up @@ -222,7 +223,8 @@ export class ConfigProvider {
buycrypto: true,
exchangecrypto: true,
giftcards: true,
walletConnect: false
walletConnect: false,
newWalletConnect: false
},

pushNotifications: {
Expand Down Expand Up @@ -385,8 +387,8 @@ export class ConfigProvider {
if (this.configCache.showIntegration.coinbase !== false) {
this.configCache.showIntegration.coinbase = this.configDefault.showIntegration.coinbase;
}
if (this.configCache.showIntegration.walletConnect !== true) {
this.configCache.showIntegration.walletConnect = this.configDefault.showIntegration.walletConnect;
if (this.configCache.showIntegration.newWalletConnect !== true) {
this.configCache.showIntegration.newWalletConnect = this.configDefault.showIntegration.newWalletConnect;
}
}
if (!this.configCache.pushNotifications) {
Expand Down
2 changes: 1 addition & 1 deletion src/providers/home-integrations/home-integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as _ from 'lodash';

const exchangeList: object[] = [
{ name: 'coinbase' },
{ name: 'walletConnect' }
{ name: 'newWalletConnect' }
];

@Injectable()
Expand Down
6 changes: 3 additions & 3 deletions src/providers/wallet-connect/wallet-connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ export class WalletConnectProvider {

public register(): void {
this.homeIntegrationsProvider.register({
name: 'walletConnect',
title: this.translate.instant('WalletConnect'),
name: 'newWalletConnect',
title: 'WalletConnect',
icon: 'assets/img/wallet-connect.svg',
showIcon: true,
logo: null,
logoWidth: '110',
background:
'linear-gradient(to bottom,rgba(60, 63, 69, 1) 0,rgba(45, 47, 51, 1) 100%)',
page: 'WalletConnectPage',
show: !!this.configProvider.get().showIntegration['walletConnect'],
show: !!this.configProvider.get().showIntegration['newWalletConnect'],
type: 'external-services'
});
}
Expand Down

0 comments on commit 4127a70

Please sign in to comment.