From 2eee8cd90f9a7be126c7922606cee591d78cddf0 Mon Sep 17 00:00:00 2001 From: Anni Piragauta Date: Mon, 24 Jun 2024 15:30:59 -0500 Subject: [PATCH 1/2] refactor: updating max value for pegout to 10 --- .env.local.test | 2 +- .github/workflows/deploy_MainNet_UI.yml | 2 +- .github/workflows/deploy_TestNet_UI.yml | 2 +- .../workflows/deploy_staging_MainNet_UI.yml | 2 +- .../workflows/deploy_staging_TestNet_UI.yml | 4 +- ENV_VARIABLES.md | 40 +++++++++---------- src/main.ts | 2 +- 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.env.local.test b/.env.local.test index df393c07..6fb1c22b 100644 --- a/.env.local.test +++ b/.env.local.test @@ -11,7 +11,7 @@ VUE_APP_RSK_EXPLORER=https://explorer.testnet.rsk.co/ # replace VALUE with the clarity id for the environment the app is being deployed to. VUE_APP_PEGOUT_MIN_AMOUNT_ALLOWED_IN_RBTC=0.005 -VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC=1 +VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC=10 #VUE_APP_CLARITY_ID=VALUE ## fee boundaries diff --git a/.github/workflows/deploy_MainNet_UI.yml b/.github/workflows/deploy_MainNet_UI.yml index 27a165fc..fbba0cca 100644 --- a/.github/workflows/deploy_MainNet_UI.yml +++ b/.github/workflows/deploy_MainNet_UI.yml @@ -40,7 +40,7 @@ jobs: VUE_APP_WALLET_ADDRESSES_HARD_STOP=100 VUE_APP_WALLET_ADDRESS_PER_CALL=20 VUE_APP_PEGOUT_MIN_AMOUNT_ALLOWED_IN_RBTC=0.004 - VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC=1 + VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC=10 npm run-script build - name: Configure AWS credentials diff --git a/.github/workflows/deploy_TestNet_UI.yml b/.github/workflows/deploy_TestNet_UI.yml index def65f7e..157fecb6 100644 --- a/.github/workflows/deploy_TestNet_UI.yml +++ b/.github/workflows/deploy_TestNet_UI.yml @@ -40,7 +40,7 @@ jobs: VUE_APP_WALLET_ADDRESSES_HARD_STOP=100 VUE_APP_WALLET_ADDRESS_PER_CALL=20 VUE_APP_PEGOUT_MIN_AMOUNT_ALLOWED_IN_RBTC=0.004 - VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC=1 + VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC=10 npm run-script build - name: Configure AWS credentials diff --git a/.github/workflows/deploy_staging_MainNet_UI.yml b/.github/workflows/deploy_staging_MainNet_UI.yml index fafda183..68aadb3f 100644 --- a/.github/workflows/deploy_staging_MainNet_UI.yml +++ b/.github/workflows/deploy_staging_MainNet_UI.yml @@ -40,7 +40,7 @@ jobs: VUE_APP_WALLET_ADDRESSES_HARD_STOP=100 VUE_APP_WALLET_ADDRESS_PER_CALL=20 VUE_APP_PEGOUT_MIN_AMOUNT_ALLOWED_IN_RBTC=0.004 - VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC=1 + VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC=10 npm run-script build - name: Configure AWS credentials diff --git a/.github/workflows/deploy_staging_TestNet_UI.yml b/.github/workflows/deploy_staging_TestNet_UI.yml index a9c096a9..7baf4836 100644 --- a/.github/workflows/deploy_staging_TestNet_UI.yml +++ b/.github/workflows/deploy_staging_TestNet_UI.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - ref: qa + ref: qa - name: Setup NodeJS uses: actions/setup-node@v3 @@ -40,7 +40,7 @@ jobs: VUE_APP_WALLET_ADDRESSES_HARD_STOP=100 VUE_APP_WALLET_ADDRESS_PER_CALL=20 VUE_APP_PEGOUT_MIN_AMOUNT_ALLOWED_IN_RBTC=0.004 - VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC=1 + VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC=10 VUE_APP_LBC_ADDRESS='0xc2A630c053D12D63d32b025082f6Ba268db18300' npm run-script build diff --git a/ENV_VARIABLES.md b/ENV_VARIABLES.md index 62fa2ee0..264a4c68 100644 --- a/ENV_VARIABLES.md +++ b/ENV_VARIABLES.md @@ -2,25 +2,25 @@ This table was created to guide and centralize the **environment variables** necessary for correct execution. The value of these variables are used in **environment-variables.ts** file. -|NAME | DEV VALUE | DETAILS | -|--------------------------------------------|-------------|-----------------------------------------------------------------------------------------------------------| -|VUE_APP_COIN | `test / main` | The network that will be used for the bitcoin library. Accepted values are `test` or `main` | -|VUE_APP_MANIFEST_EMAIL | | | -|VUE_APP_MANIFEST_APP_URL | | Trezor connect Manifest is described [here](https://github.com/trezor/connect/blob/develop/docs/index.md) | -|VUE_APP_API_BASE_URL | | URL of the API (2wp-api) which is the BackEnd | -|VUE_APP_RSK_NODE_HOST | | RSK node URL to verify RSK data (e.g. POWpeg address | -|VUE_APP_CLARITY_ID | | A Clarity ID is uniquely generated identification for app usage metrics | -|VUE_APP_RSK_EXPLORER | | RSK EXPLORER URL used to verify the transaction status | -|VUE_APP_WALLET_ADDRESSES_HARD_STOP | `100` | Maximum number of addresses derived from wallet | -|VUE_APP_WALLET_ADDRESS_PER_CALL | `5` | Number of addresses obtained per derivation call | -|VUE_APP_PEGOUT_MIN_AMOUNT_ALLOWED_IN_RBTC | `0.004` | 0,004 Minimum allowed value for a PEGOUT transaction | -|VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC | `1` | 1 Maximum allowed value for a PEGOUT transaction | -|VUE_APP_BURN_DUST_VALUE | `30000` | Max value to burn in the tx fee | -|VUE_APP_MIN_FEE_SAT_PER_BYTE_FAST | `8` | Min fee rate (sats/byte) required to broadcast the transaction | -|VUE_APP_MIN_FEE_SAT_PER_BYTE_AVG | `4` | Min fee rate (sats/byte) required to broadcast the transaction | -|VUE_APP_MIN_FEE_SAT_PER_BYTE_SLOW | `1` | Min fee rate (sats/byte) required to broadcast the transaction | -|VUE_APP_LBC_ADDRESS | `0xc2A630c053D12D63d32b025082f6Ba268db18300` | Liquidity bridge contract address on the flyover protocol | -|VUE_APP_DEBUG_MODE | `false` | enable developer messages for debuging | +|NAME | DEV VALUE | DETAILS | +|--------------------------------------------|----------------------------------------------|-----------------------------------------------------------------------------------------------------------| +|VUE_APP_COIN | `test / main` | The network that will be used for the bitcoin library. Accepted values are `test` or `main` | +|VUE_APP_MANIFEST_EMAIL | | | +|VUE_APP_MANIFEST_APP_URL | | Trezor connect Manifest is described [here](https://github.com/trezor/connect/blob/develop/docs/index.md) | +|VUE_APP_API_BASE_URL | | URL of the API (2wp-api) which is the BackEnd | +|VUE_APP_RSK_NODE_HOST | | RSK node URL to verify RSK data (e.g. POWpeg address | +|VUE_APP_CLARITY_ID | | A Clarity ID is uniquely generated identification for app usage metrics | +|VUE_APP_RSK_EXPLORER | | RSK EXPLORER URL used to verify the transaction status | +|VUE_APP_WALLET_ADDRESSES_HARD_STOP | `100` | Maximum number of addresses derived from wallet | +|VUE_APP_WALLET_ADDRESS_PER_CALL | `5` | Number of addresses obtained per derivation call | +|VUE_APP_PEGOUT_MIN_AMOUNT_ALLOWED_IN_RBTC | `0.004` | 0,004 Minimum allowed value for a PEGOUT transaction | +|VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC | `10` | 10 Maximum allowed value for a PEGOUT transaction | +|VUE_APP_BURN_DUST_VALUE | `30000` | Max value to burn in the tx fee | +|VUE_APP_MIN_FEE_SAT_PER_BYTE_FAST | `8` | Min fee rate (sats/byte) required to broadcast the transaction | +|VUE_APP_MIN_FEE_SAT_PER_BYTE_AVG | `4` | Min fee rate (sats/byte) required to broadcast the transaction | +|VUE_APP_MIN_FEE_SAT_PER_BYTE_SLOW | `1` | Min fee rate (sats/byte) required to broadcast the transaction | +|VUE_APP_LBC_ADDRESS | `0xc2A630c053D12D63d32b025082f6Ba268db18300` | Liquidity bridge contract address on the flyover protocol | +|VUE_APP_DEBUG_MODE | `false` | enable developer messages for debuging | ## Example for .env.local.test file @@ -36,7 +36,7 @@ VUE_APP_RSK_EXPLORER=https://explorer.testnet.rootstock.io/ VUE_APP_WALLET_ADDRESSES_HARD_STOP=100 VUE_APP_WALLET_ADDRESS_PER_CALL=5 VUE_APP_PEGOUT_MIN_AMOUNT_ALLOWED_IN_RBTC=0.005 -VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC=1 +VUE_APP_PEGOUT_MAX_AMOUNT_ALLOWED_IN_RBTC=10 VUE_APP_BURN_DUST_VALUE=30000 VUE_APP_MIN_FEE_SAT_PER_BYTE_FAST=8 VUE_APP_MIN_FEE_SAT_PER_BYTE_AVG=4 diff --git a/src/main.ts b/src/main.ts index f582b4f8..fdd2b1f1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -18,7 +18,7 @@ const defaultEnvironmentVariables = { vueAppHotjarId: '', vueAppClarityId: '', pegoutMinValue: 0.005, - pegoutMaxValue: 1, + pegoutMaxValue: 10, minFeeSatPerByte: { fast: 8, average: 4, From b1e18a80e2f342a63e272ec4ee31551521234002 Mon Sep 17 00:00:00 2001 From: Anni Piragauta Date: Fri, 28 Jun 2024 11:09:55 -0500 Subject: [PATCH 2/2] refactor: update twowp_api_max_amount_allowed_in_satoshi environment variable --- src/common/types/SatoshiBig.ts | 5 +++++ src/pegin/components/create/BtcInputAmount.vue | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/types/SatoshiBig.ts b/src/common/types/SatoshiBig.ts index 22065594..9b809e02 100644 --- a/src/common/types/SatoshiBig.ts +++ b/src/common/types/SatoshiBig.ts @@ -53,6 +53,11 @@ export default class SatoshiBig extends Big { return btcString; } + toBTCStringBg(): string { + const btcString = super.div(100_000_000_000_000_000).toFixed(4); + return btcString; + } + tomBTCString(): string { const mBTCString = super.div(100_000).toFixed(5); return mBTCString; diff --git a/src/pegin/components/create/BtcInputAmount.vue b/src/pegin/components/create/BtcInputAmount.vue index 84dfe743..499830f9 100644 --- a/src/pegin/components/create/BtcInputAmount.vue +++ b/src/pegin/components/create/BtcInputAmount.vue @@ -39,7 +39,7 @@ {{ boundaries.minValue.toBTCString().slice(0,5) }} MIN - {{ boundaries.maxValue.toBTCString().slice(0,5) }} MAX + {{ boundaries.maxValue.toBTCStringBg().slice(0,5) }} MAX