diff --git a/.env.development b/.env.development
deleted file mode 100644
index 1bcb8d37..00000000
--- a/.env.development
+++ /dev/null
@@ -1,5 +0,0 @@
-NEXT_PUBLIC_CENNZ_ASSET_ID=16000
-NEXT_PUBLIC_CPAY_ASSET_ID=16001
-NEXT_PUBLIC_ALLOWED_ASSET_IDS=16000,16001
-NEXT_PUBLIC_GA_ID=
-NEXT_PUBLIC_CENNZ_NETWORK=nikau
diff --git a/.env.production b/.env.production
deleted file mode 100644
index 183792e9..00000000
--- a/.env.production
+++ /dev/null
@@ -1,5 +0,0 @@
-NEXT_PUBLIC_CENNZ_ASSET_ID=1
-NEXT_PUBLIC_CPAY_ASSET_ID=2
-NEXT_PUBLIC_ALLOWED_ASSET_IDS=1,2
-NEXT_PUBLIC_GA_ID="G-8YJT9T1YTT"
-NEXT_PUBLIC_CENNZ_NETWORK=azalea
diff --git a/.env.skel b/.env.skel
new file mode 100644
index 00000000..7b5f5c67
--- /dev/null
+++ b/.env.skel
@@ -0,0 +1,6 @@
+ENABLE_TRANSFERS_TAB=
+NEXT_PUBLIC_ALLOWED_ASSET_IDS=
+NEXT_PUBLIC_CENNZ_ASSET_ID=
+NEXT_PUBLIC_CENNZ_NETWORK=
+NEXT_PUBLIC_CPAY_ASSET_ID=
+NEXT_PUBLIC_GA_ID=
diff --git a/.env.test b/.env.test
index 1bcb8d37..eeb70374 100644
--- a/.env.test
+++ b/.env.test
@@ -1,5 +1,6 @@
+NEXT_PUBLIC_ENABLE_TRANSFERS_TAB=1
+NEXT_PUBLIC_ALLOWED_ASSET_IDS=16000,16001
NEXT_PUBLIC_CENNZ_ASSET_ID=16000
+NEXT_PUBLIC_CENNZ_NETWORK=rata
NEXT_PUBLIC_CPAY_ASSET_ID=16001
-NEXT_PUBLIC_ALLOWED_ASSET_IDS=16000,16001
NEXT_PUBLIC_GA_ID=
-NEXT_PUBLIC_CENNZ_NETWORK=nikau
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 5b0bf708..e2c03488 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,8 +1,8 @@
-## Why
+## Summary
> _Summary of the change in one short paragraph._
-## What is changing
+## Changes
> _Details of the change in bullet points._
diff --git a/.github/workflows/labeled_deployment.yml b/.github/workflows/labeled_deployment.yml
deleted file mode 100644
index a02096f6..00000000
--- a/.github/workflows/labeled_deployment.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-name: "Labeled Deployment"
-
-on:
- pull_request:
- types:
- - labeled
- branches:
- - develop
-
-jobs:
- deploy-rata:
- name: "Rata"
- if: ${{ github.event.label.name == 'deploy:rata' }}
- uses: cennznet/gh-workflows/.github/workflows/_labeled_deployment.yml@develop
- with:
- branch: rata
- deploy-nikau:
- name: "Nikau"
- if: ${{ github.event.label.name == 'deploy:nikau' }}
- uses: cennznet/gh-workflows/.github/workflows/_labeled_deployment.yml@develop
- with:
- branch: nikau
- deploy-main:
- name: "Main"
- if: ${{ github.event.label.name == 'deploy:main' }}
- uses: cennznet/gh-workflows/.github/workflows/_labeled_deployment.yml@develop
- with:
- branch: main
diff --git a/.github/workflows/ci.yml b/.github/workflows/pr.yml
similarity index 95%
rename from .github/workflows/ci.yml
rename to .github/workflows/pr.yml
index a2685483..7615a20d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/pr.yml
@@ -1,12 +1,14 @@
-name: CI
+name: PR
on:
push:
branches:
- develop
+ - "prod/**"
pull_request:
branches:
- develop
+ - "prod/**"
workflow_dispatch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 0b1e70b0..00000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# CHANGELOG
-
-## [Unreleased]
-
-## [1.2.0] - 2022-06-16
-
-- Upgrade code-base to use React 18
-- Add MetaMask support
-
-## [1.1.0] - 2022-04-28
-
-- Update UI when transaction is in progress [#156](https://github.com/cennznet/app-hub/pull/156)
-- Update UI/UX for historical withdrawals [#171](https://github.com/cennznet/app-hub/pull/171)
-- Ask user to confirm before exiting if there is a transaction pending [#173](https://github.com/cennznet/app-hub/pull/173)
-
-## [1.0.2] - 2022-04-01
-
-- Add confirming state to the Bridge [#151](https://github.com/cennznet/app-hub/pull/151)
-- Add a generic missing token [#149](https://github.com/cennznet/app-hub/pull/149)
-
-## [1.0.1] - 2022-03-31
-
-- Update correct icons for CENNZnet
-- Take into account of staking lock amount when retrieving user balance
-- Avoid checking `ethBridge.bridgePaused` status when it's Deposit
-- Explicitly using `assetId` to check if it's CPAY
-- Move BRIDGE / PEG contract address to `constants.ts`
-- Add default timeout value to be 1000 instead of zero
-- Use `sellAsset` extrinsic instead
-- Update Slippage in Swap to target the receiving token
-- Add ">=" or "<=" to Slippage in Swap and Pool
-
-## [1.0.0] - 2022-03-30
-
-- Initial release of the App Hub
diff --git a/libs/components/AppSwitch.tsx b/libs/components/AppSwitch.tsx
index 10f0ae81..0b050afd 100644
--- a/libs/components/AppSwitch.tsx
+++ b/libs/components/AppSwitch.tsx
@@ -5,6 +5,7 @@ import { Theme } from "@mui/material";
import { useSectionUri } from "@/libs/hooks";
import { useMetaMaskExtension } from "@/libs/providers/MetaMaskExtensionProvider";
import { ensureEthereumChain } from "@/libs/utils";
+import { ENABLE_TRANSFERS_TAB } from "@/libs/constants";
const Switch: FC = () => {
const section = useSectionUri();
@@ -33,11 +34,14 @@ const Switch: FC = () => {
Bridge
- {/*
-
- Transfer
-
- */}
+
+ {ENABLE_TRANSFERS_TAB && (
+
+
+ Transfer
+
+
+ )}
);
};
@@ -46,7 +50,7 @@ export default Switch;
export const styles = {
container: ({ shadows }: Theme) => css`
- width: 360px;
+ width: ${ENABLE_TRANSFERS_TAB ? "30em" : "360px"};
display: flex;
flex-direction: row;
justify-content: center;
diff --git a/libs/constants.ts b/libs/constants.ts
index 0c5c4906..e75581b2 100644
--- a/libs/constants.ts
+++ b/libs/constants.ts
@@ -94,3 +94,6 @@ export const ETHEREUM_NETWORK = {
PegAddress: "0x76BAc85e1E82cd677faa2b3f00C4a2626C4c6E32",
},
}[process.env.NEXT_PUBLIC_ETHEREUM_NETWORK ?? CENNZ_NETWORK.LinkedEthChain];
+
+export const ENABLE_TRANSFERS_TAB =
+ process.env.NEXT_PUBLIC_ENABLE_TRANSFERS_TAB === "1";
diff --git a/package.json b/package.json
index 45c1e771..c01b2c02 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@cennznet/app-hub",
- "version": "1.2.0",
+ "version": "0.0.0",
"private": true,
"scripts": {
"clean": "rm -rdf .next",
diff --git a/pages/transfer.tsx b/pages/transfer.tsx
index b284e4c9..a0f5cd69 100644
--- a/pages/transfer.tsx
+++ b/pages/transfer.tsx
@@ -8,12 +8,17 @@ import {
TransferProgress,
} from "@/libs/components";
import { Api } from "@cennznet/api";
-import { CENNZ_NETWORK } from "@/libs/constants";
+import { CENNZ_NETWORK, ENABLE_TRANSFERS_TAB } from "@/libs/constants";
import { fetchCENNZAssets } from "@/libs/utils";
import { CENNZAssets } from "@/libs/types";
export async function getStaticProps() {
+ if (!ENABLE_TRANSFERS_TAB)
+ return {
+ notFound: true,
+ };
+
const api = await Api.create({ provider: CENNZ_NETWORK.ApiUrl.InWebSocket });
return {