Skip to content

Commit 5931fdd

Browse files
authored
Merge pull request #1357 from rsksmart/security/3.2
Security fixes
2 parents 6398896 + e0ecc90 commit 5931fdd

33 files changed

+4365
-2051
lines changed

.env.local.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ NODE_ENV=test
2929
VUE_APP_FLYOVER_GET_PROVIDERS_TIMEOUT=5000
3030
VUE_APP_API_RESPONSE_TIMEOUT=5000
3131
VUE_APP_FLYOVER_PEGOUT_QUOTE_DIFF_PERCENTAGE=2
32+
VUE_APP_FLYOVER_DEPOSIT_PEGOUT_GAS=410700
3233
VUE_APP_RECAPTCHA_NEW_TOKEN_TIME=30
3334

3435
VUE_APP_CSP=https://staging.lps.tekscapital.com

.github/workflows/deploy_MainNet_UI.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
VUE_APP_CSP=https://lps.tekscapital.com
6161
VUE_APP_API_RESPONSE_TIMEOUT=10000
6262
VUE_APP_REOWN_PROJECT_ID=${{ secrets.MAINNET_VUE_APP_REOWN_PROJECT_ID }}
63+
VUE_APP_FLYOVER_DEPOSIT_PEGOUT_GAS=410700
6364
npm run-script build
6465
6566
- name: Configure AWS credentials

.github/workflows/deploy_TestNet_UI.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
VUE_APP_CSP=https://staging.lps.tekscapital.com
6161
VUE_APP_API_RESPONSE_TIMEOUT=10000
6262
VUE_APP_REOWN_PROJECT_ID=${{ secrets.TESTNET_VUE_APP_REOWN_PROJECT_ID }}
63+
VUE_APP_FLYOVER_DEPOSIT_PEGOUT_GAS=410700
6364
npm run-script build
6465
6566
- name: Configure AWS credentials

.github/workflows/deploy_staging_MainNet_UI.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
VUE_APP_CSP=https://lps.tekscapital.com
6161
VUE_APP_API_RESPONSE_TIMEOUT=10000
6262
VUE_APP_REOWN_PROJECT_ID=${{ secrets.STAGING_MAINNET_VUE_APP_REOWN_PROJECT_ID }}
63+
VUE_APP_FLYOVER_DEPOSIT_PEGOUT_GAS=410700
6364
npm run-script build
6465
6566
- name: Configure AWS credentials

.github/workflows/deploy_staging_TestNet_UI.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ jobs:
5656
VUE_APP_FLYOVER_PEGOUT_QUOTE_DIFF_PERCENTAGE=20
5757
VUE_APP_RECAPTCHA_NEW_TOKEN_TIME=30
5858
VUE_APP_FLYOVER_PROVIDER_ID=2
59-
VUE_APP_FLYOVER_NETWORK=Development
59+
VUE_APP_FLYOVER_NETWORK=Testnet
6060
VUE_APP_CSP=https://staging.lps.tekscapital.com
6161
VUE_APP_API_RESPONSE_TIMEOUT=10000
6262
VUE_APP_REOWN_PROJECT_ID=${{ secrets.STAGING_TESTNET_VUE_APP_REOWN_PROJECT_ID }}
63+
VUE_APP_FLYOVER_DEPOSIT_PEGOUT_GAS=410700
6364
npm run-script build
6465
6566
- name: Configure AWS credentials

ENV_VARIABLES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ The value of these variables are used in **environment-variables.ts** file.
2828
|VUE_APP_API_RESPONSE_TIMEOUT | `10000` | Sets a timeout for calls made to API on search transaction. |
2929
|VUE_APP_REOWN_PROJECT_ID | `PROJECT_ID` | Reown's AppKit project Id follow [this](https://reown.com/blog/how-to-get-started-with-appkit) instructions to get one. |
3030
|VUE_APP_FLYOVER_NETWORK | `Testnet` | The network to use for Flyover service. Valid values: `Mainnet`, `Testnet`, `Regtest`, `Alphanet`, `Development`. |
31+
|VUE_APP_FLYOVER_DEPOSIT_PEGOUT_GAS | `410700` | Gas units to use for deposit pegout transactions (replaces dynamic gas estimation) |
3132

3233
Example for [.env.local.test](https://github.com/rsksmart/2wp-app/blob/main/.env.local.test) file.

package-lock.json

Lines changed: 4219 additions & 1933 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@
2121
"@ledgerhq/hw-transport-webusb": "6.27.1",
2222
"@mdi/font": "^7.2.96",
2323
"@mdi/js": "^6.9.96",
24-
"@reown/appkit": "^1.7.8",
25-
"@reown/appkit-adapter-bitcoin": "^1.7.8",
26-
"@reown/appkit-adapter-ethers5": "^1.7.8",
24+
"@reown/appkit": "^1.8.15",
25+
"@reown/appkit-adapter-bitcoin": "^1.8.15",
26+
"@reown/appkit-adapter-ethers5": "^1.8.15",
2727
"@rsksmart/bridges-core-sdk": "^0.5.0",
2828
"@rsksmart/flyover-sdk": "^1.8.0",
29-
"@rsksmart/pmt-builder": "^3.0.1",
3029
"@rsksmart/rlogin": "^1.6.1",
3130
"@rsksmart/rlogin-ledger-provider": "^1.0.5-alpha",
3231
"@rsksmart/rlogin-trezor-provider": "^1.0.6",

src/common/components/exchange/BtcWalletDialog.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export default defineComponent({
222222
walletType.value = wallet;
223223
}
224224
225-
function connectReown(): Promise<void> {
225+
function connectReown(): Promise<void | { hash: string }> {
226226
const { walletProvider } = useAppKitProvider<BitcoinConnector>('bip122');
227227
const { open: openModal } = useAppKit();
228228
return new Promise((resolve, reject) => {
@@ -235,7 +235,7 @@ export default defineComponent({
235235
.then(resolve)
236236
.catch(reject);
237237
} else {
238-
reject(new Error('Reown aleready connected'));
238+
reject(new Error('Reown already connected'));
239239
}
240240
});
241241
}

src/common/components/status/TxPegin.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default defineComponent({
4747
const txPeginSummary = computed((): NormalizedSummary => {
4848
const status = txDetails.value as PeginStatus;
4949
const total = new SatoshiBig(status.btc.amountTransferred, 'btc')
50-
.minus(new SatoshiBig(status.btc.fees, 'btc'));
50+
.safeMinus(new SatoshiBig(status.btc.fees, 'btc'));
5151
return {
5252
amountFromString: status.btc.amountTransferred.toString(),
5353
amountReceivedString: total.toBTCTrimmedString(),

0 commit comments

Comments
 (0)