Skip to content

Commit

Permalink
Merge branch 'release/0.13.0' into master-cere
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Navoichyk committed Jun 7, 2022
2 parents 86773d2 + c167d29 commit d451b02
Show file tree
Hide file tree
Showing 23 changed files with 888 additions and 805 deletions.
6 changes: 4 additions & 2 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
PORT=3000
HTTPS=true

REACT_APP_ENV=development

REACT_APP_SUPPORT_SERVICE="Telegram"
REACT_APP_SUPPORT_URL="https://t.me/ceretroubleshooting"

## These are only required if using Sentry for error logging
REACT_APP_SENTRY_DSN_URL="https://[email protected]/5987177"
REACT_APP_SENTRY_ENV=development
SENTRY_AUTH_TOKEN="db67ae12222811ecabd2564b6436d30d"
REACT_APP_SENTRY_RELEASE="0.12.0"
REACT_APP_SENTRY_RELEASE="0.13.0"

REACT_APP_MAINTENANCE=false
REACT_APP_CONNECT_WITH_SUBSTRATE_WALLET_ENABLED=true
REACT_APP_TRANSFER_FALLBACK_ENABLED=true
6 changes: 4 additions & 2 deletions .env.prod
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
PORT=3000
HTTPS=true

REACT_APP_ENV=production

REACT_APP_SUPPORT_SERVICE="Telegram"
REACT_APP_SUPPORT_URL="https://t.me/ceretroubleshooting"

## These are only required if using Sentry for error logging
REACT_APP_SENTRY_DSN_URL="https://[email protected]/5987177"
REACT_APP_SENTRY_ENV=production
SENTRY_AUTH_TOKEN="db67ae12222811ecabd2564b6436d30d"
REACT_APP_SENTRY_RELEASE="0.12.0"
REACT_APP_SENTRY_RELEASE="0.13.0"

REACT_APP_MAINTENANCE=false
REACT_APP_CONNECT_WITH_SUBSTRATE_WALLET_ENABLED=true
REACT_APP_TRANSFER_FALLBACK_ENABLED=true
6 changes: 4 additions & 2 deletions .env.stage
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
PORT=3000
HTTPS=true

REACT_APP_ENV=staging

REACT_APP_SUPPORT_SERVICE="Telegram"
REACT_APP_SUPPORT_URL="https://t.me/ceretroubleshooting"

## These are only required if using Sentry for error logging
REACT_APP_SENTRY_DSN_URL="https://[email protected]/5987177"
REACT_APP_SENTRY_ENV=staging
SENTRY_AUTH_TOKEN="db67ae12222811ecabd2564b6436d30d"
REACT_APP_SENTRY_RELEASE="0.12.0"
REACT_APP_SENTRY_RELEASE="0.13.0"

REACT_APP_MAINTENANCE=false
REACT_APP_CONNECT_WITH_SUBSTRATE_WALLET_ENABLED=true
REACT_APP_TRANSFER_FALLBACK_ENABLED=true
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## vNext

- ...

## v0.13.0

- Implemented fallback mechanism for Polygon, Ethereum to Cere, Cere to Polygon transfer flows to be able to update transaction status window in the case blockchain response didn't reach client with GA integration

## v0.12.0

- Updated Testnet/Mainnet urls
Expand Down
31 changes: 31 additions & 0 deletions config/chainbridge-runtime-config.cere.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ const cereTokenDecimals = 10;

window.__RUNTIME_CONFIG__ = {
CHAINBRIDGE: {
ga: {
trackingId: "G-EVYKNM010Y",
appName: "chainbridge-ui",
},
chains: [
{
chainId: 2,
Expand Down Expand Up @@ -32,6 +36,15 @@ window.__RUNTIME_CONFIG__ = {
isDoubleApproval: false,
},
],
transferFallback: [
{
chainId: 1,
delayMs: 4 * 60 * 1000,
blockTimeMs: 6000,
pollingMinIntervalMs: 15000,
pollingMaxIntervalMs: 30000,
},
],
},
{
chainId: 1,
Expand All @@ -58,6 +71,15 @@ window.__RUNTIME_CONFIG__ = {
decimals: cereTokenDecimals,
},
],
transferFallback: [
{
chainId: 2,
delayMs: 3 * 60 * 1000,
blockTimeMs: 3000,
pollingMinIntervalMs: 15000,
pollingMaxIntervalMs: 30000,
},
],
},
{
chainId: 0,
Expand All @@ -83,6 +105,15 @@ window.__RUNTIME_CONFIG__ = {
isDoubleApproval: false,
},
],
transferFallback: [
{
chainId: 1,
delayMs: 6 * 60 * 1000,
blockTimeMs: 6000,
pollingMinIntervalMs: 15000,
pollingMaxIntervalMs: 30000,
},
],
},
],
},
Expand Down
31 changes: 31 additions & 0 deletions config/chainbridge-runtime-config.cere.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ const cereTokenDecimals = 10;

window.__RUNTIME_CONFIG__ = {
CHAINBRIDGE: {
ga: {
trackingId: "G-EVYKNM010Y",
appName: "chainbridge-ui",
},
chains: [
{
chainId: 2,
Expand Down Expand Up @@ -32,6 +36,15 @@ window.__RUNTIME_CONFIG__ = {
isDoubleApproval: false,
},
],
transferFallback: [
{
chainId: 1,
delayMs: 4 * 60 * 1000,
blockTimeMs: 6000,
pollingMinIntervalMs: 15000,
pollingMaxIntervalMs: 30000,
},
],
},
{
chainId: 1,
Expand Down Expand Up @@ -59,6 +72,15 @@ window.__RUNTIME_CONFIG__ = {
decimals: cereTokenDecimals,
},
],
transferFallback: [
{
chainId: 2,
delayMs: 3 * 60 * 1000,
blockTimeMs: 3000,
pollingMinIntervalMs: 15000,
pollingMaxIntervalMs: 30000,
},
],
},
{
chainId: 0,
Expand All @@ -84,6 +106,15 @@ window.__RUNTIME_CONFIG__ = {
isDoubleApproval: false,
},
],
transferFallback: [
{
chainId: 1,
delayMs: 6 * 60 * 1000,
blockTimeMs: 6000,
pollingMinIntervalMs: 15000,
pollingMaxIntervalMs: 30000,
},
],
},
],
},
Expand Down
31 changes: 31 additions & 0 deletions config/chainbridge-runtime-config.cere.stage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ const cereTokenDecimals = 10;

window.__RUNTIME_CONFIG__ = {
CHAINBRIDGE: {
ga: {
trackingId: "G-EVYKNM010Y",
appName: "chainbridge-ui",
},
chains: [
{
chainId: 2,
Expand Down Expand Up @@ -32,6 +36,15 @@ window.__RUNTIME_CONFIG__ = {
isDoubleApproval: false,
},
],
transferFallback: [
{
chainId: 1,
delayMs: 4 * 60 * 1000,
blockTimeMs: 6000,
pollingMinIntervalMs: 15000,
pollingMaxIntervalMs: 30000,
},
],
},
{
chainId: 1,
Expand Down Expand Up @@ -59,6 +72,15 @@ window.__RUNTIME_CONFIG__ = {
decimals: cereTokenDecimals,
},
],
transferFallback: [
{
chainId: 2,
delayMs: 3 * 60 * 1000,
blockTimeMs: 3000,
pollingMinIntervalMs: 15000,
pollingMaxIntervalMs: 30000,
},
],
},
{
chainId: 0,
Expand All @@ -84,6 +106,15 @@ window.__RUNTIME_CONFIG__ = {
isDoubleApproval: false,
},
],
transferFallback: [
{
chainId: 1,
delayMs: 6 * 60 * 1000,
blockTimeMs: 6000,
pollingMinIntervalMs: 15000,
pollingMaxIntervalMs: 30000,
},
],
},
],
},
Expand Down
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@Cerebellum-Network/chainbridge-ui",
"version": "0.12.0",
"version": "0.13.0",
"private": true,
"dependencies": {
"@babel/core": "^7.12.3",
Expand All @@ -13,13 +13,6 @@
"@material-ui/styles": "4.10.0",
"@polkadot/api": "4.2.1",
"@polkadot/extension-dapp": "0.37.1",
"@polkadot/keyring": "5.6.3",
"@polkadot/networks": "5.6.3",
"@polkadot/types": "3.9.3",
"@polkadot/ui-keyring": "0.69.1",
"@polkadot/ui-settings": "0.69.1",
"@polkadot/util": "5.6.3",
"@polkadot/util-crypto": "5.6.3",
"@sentry/react": "^5.26.0",
"@types/history": "^4.7.8",
"bnc-onboard": "1.26.1",
Expand All @@ -30,6 +23,7 @@
"history": "^5.0.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-ga4": "^1.4.1",
"react-scripts": "3.4.3",
"react-toast-notifications": "2.4.0",
"yup": "^0.29.3"
Expand Down
4 changes: 2 additions & 2 deletions scripts/sentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ dotenv.config();

async function createReleaseAndUpload() {
const release = process.env.REACT_APP_SENTRY_RELEASE;
const environment = process.env.REACT_APP_SENTRY_ENV;
const environment = process.env.REACT_APP_ENV;

if (!release || !environment) {
console.warn("REACT_APP_SENTRY_RELEASE or REACT_APP_SENTRY_ENV is not set");
console.warn("REACT_APP_SENTRY_RELEASE or REACT_APP_ENV is not set");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (
) {
init({
dsn: process.env.REACT_APP_SENTRY_DSN_URL,
environment: process.env.REACT_APP_SENTRY_ENV,
environment: process.env.REACT_APP_ENV,
release: process.env.REACT_APP_SENTRY_RELEASE,
});
console.log("Sentry logging is initialized");
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Pages/TransferPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ const TransferPage = () => {
setPreflightModalOpen(false);
preflightDetails &&
deposit(
preflightDetails.tokenAmount,
parseFloat(preflightDetails.tokenAmount.toString()),
preflightDetails.receiver,
preflightDetails.token
);
Expand Down
Loading

0 comments on commit d451b02

Please sign in to comment.