Skip to content

Commit

Permalink
Merge branch 'development' into staging-mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
hiaux0 committed Dec 6, 2022
2 parents a7c9aa1 + a491f1f commit 7381513
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
7 changes: 7 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,13 @@ export class App {
route: ["seed/:address"],
title: "Seed Sale",
},
{
moduleId: PLATFORM.moduleName("./appVersion/appVersion"),
nav: false,
name: "appVersion",
route: ["version"],
title: "Version",
},
{
moduleId: PLATFORM.moduleName("./seedOverview/seedOverview"),
nav: false,
Expand Down
10 changes: 5 additions & 5 deletions src/resources/elements/NetworkFeedback/NetworkFeedback.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@
<div class="dropdown" show.bind="show">
<div class="dropdown__title">Select Network</div>
<div class="dropdown__hr"></div>
<div if.bind="isMainnet" class="${isActive(Networks.Mainnet) ? 'dropdown__item--active' : 'dropdown__item'}" click.delegate="onDropDownItemClick(Networks.Mainnet)">
<div if.bind="envIsMainnet" class="${isActive(Networks.Mainnet) ? 'dropdown__item--active' : 'dropdown__item'}" click.delegate="onDropDownItemClick(Networks.Mainnet)">
<div class="eth"></div>
<div>Ethereum</div>
</div>
<div if.bind="!isMainnet" class="${isActive(Networks.Goerli) ? 'dropdown__item--active' : 'dropdown__item'}" click.delegate="onDropDownItemClick(Networks.Goerli)">
<div if.bind="!envIsMainnet" class="${isActive(Networks.Goerli) ? 'dropdown__item--active' : 'dropdown__item'}" click.delegate="onDropDownItemClick(Networks.Goerli)">
<div class="eth"></div>
<div>Goerli</div>
</div>
<div if.bind="isMainnet" class="${isActive(Networks.Celo) ? 'dropdown__item--active' : 'dropdown__item'}" click.delegate="onDropDownItemClick(Networks.Celo)">
<div if.bind="envIsMainnet" class="${isActive(Networks.Celo) ? 'dropdown__item--active' : 'dropdown__item'}" click.delegate="onDropDownItemClick(Networks.Celo)">
<div class="celo"></div>
<div>Celo</div>
</div>
<div if.bind="!isMainnet" class="${isActive(Networks.Alfajores) ? 'dropdown__item--active' : 'dropdown__item'}" click.delegate="onDropDownItemClick(Networks.Alfajores)">
<div if.bind="!envIsMainnet" class="${isActive(Networks.Alfajores) ? 'dropdown__item--active' : 'dropdown__item'}" click.delegate="onDropDownItemClick(Networks.Alfajores)">
<div class="celo"></div>
<div>Alfajores</div>
</div>

<div if.bind="isLocalhostUrl() && !isMainnet" class="${isActive(Networks.Localhost) ? 'dropdown__item--active' : 'dropdown__item'}" click.delegate="onDropDownItemClick(Networks.Localhost)">
<div if.bind="isLocalhostUrl() && !envIsMainnet" class="${isActive(Networks.Localhost) ? 'dropdown__item--active' : 'dropdown__item'}" click.delegate="onDropDownItemClick(Networks.Localhost)">
<div class="eth"></div>
<div>Localhost</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/resources/elements/NetworkFeedback/NetworkFeedback.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { autoinject, containerless, customElement } from "aurelia-framework";
import { AllowedNetworks, EthereumService, isCeloNetworkLike, isLocalhostUrl, Networks } from "services/EthereumService";
import { AllowedNetworks, EthereumService, isCeloNetworkLike, isLocalhostUrl, isMainnet, Networks } from "services/EthereumService";
import { BrowserStorageService } from "services/BrowserStorageService";

@autoinject
Expand All @@ -9,7 +9,7 @@ import { BrowserStorageService } from "services/BrowserStorageService";
export class NetworkFeedback {

private network: AllowedNetworks;
private isMainnet;
private envIsMainnet: boolean;
private show: boolean;
private Networks = Networks;

Expand All @@ -22,7 +22,7 @@ export class NetworkFeedback {
this.network = EthereumService.targetedNetwork;
this.show = false;

this.isMainnet = process.env.NETWORK === Networks.Mainnet;
this.envIsMainnet = isMainnet(process.env.NETWORK as AllowedNetworks);
this.network = EthereumService.targetedNetwork;
}

Expand Down

0 comments on commit 7381513

Please sign in to comment.