diff --git a/env.json b/env.json index cc40ff0bb..22ea671a3 100644 --- a/env.json +++ b/env.json @@ -57,7 +57,7 @@ "Polkadot": true, "PolkadotSora": true, "PolkadotAcala": true, - "Liberland": false + "Liberland": true }, "EVM_NETWORKS_IDS": [56, 8217], "ETH_BRIDGE": { diff --git a/package.json b/package.json index c4b5eb58b..cb3579987 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "polkaswap-exchange-web", - "version": "1.33.0", + "version": "1.34.0", "repository": { "type": "git", "url": "https://github.com/sora-xor/polkaswap-exchange-web.git" @@ -27,34 +27,34 @@ }, "dependencies": { "@metamask/detect-provider": "^2.0.0", - "@soramitsu/soraneo-wallet-web": "1.33.1", - "@walletconnect/ethereum-provider": "^2.11.2", + "@soramitsu/soraneo-wallet-web": "1.34.3", + "@walletconnect/ethereum-provider": "^2.12.2", "@walletconnect/modal": "^2.6.2", - "core-js": "^3.36.0", + "core-js": "^3.37.0", "country-code-emoji": "^2.3.0", "country-flag-emoji-polyfill": "^0.1.8", "direct-vuex": "^0.12.1", "echarts": "^5.5.0", "email-validator": "^2.0.4", - "ethers": "6.8.0", + "ethers": "6.12.1", "jwt-decode": "^4.0.0", "lodash": "^4.17.21", "uuidv4": "^6.2.13", "vue": "2.7.14", "vue-class-component": "^7.2.6", - "vue-echarts": "^6.6.9", + "vue-echarts": "^6.7.1", "vue-i18n": "^8.28.2", "vue-property-decorator": "^9.1.2", "vue-router": "^3.6.5", "vuex": "^3.6.2" }, "devDependencies": { - "@babel/runtime": "^7.23.9", + "@babel/runtime": "^7.24.5", "@types/electron-devtools-installer": "^2.2.5", "@types/jest": "^29.5.12", "@types/jsdom": "^21.1.6", - "@types/lodash": "^4.14.202", - "@types/node": "^20.11.21", + "@types/lodash": "^4.17.1", + "@types/node": "^20.12.10", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "@vue/cli-plugin-babel": "5.0.8", @@ -75,7 +75,7 @@ "electron": "^13.0.0", "electron-devtools-installer": "^3.2.0", "eslint": "^7.32.0", - "eslint-plugin-import": "^2.26.0", + "eslint-plugin-import": "^2.29.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-promise": "^5.2.0", @@ -86,10 +86,10 @@ "lint-staged": "^9.5.0", "node-polyfill-webpack-plugin": "^3.0.0", "prettier": "^2.8.8", - "sass": "^1.71.1", - "sass-loader": "^14.1.1", + "sass": "^1.77.0", + "sass-loader": "^14.2.1", "ts-jest": "^27.1.5", - "typescript": "~5.3.3", + "typescript": "~5.4.5", "vue-cli-plugin-electron-builder": "^3.0.0-alpha.4", "vue-cli-plugin-test-attrs": "^0.1.5", "vue-template-compiler": "2.7.14" diff --git a/src/components/mixins/ConfirmDialogMixin.ts b/src/components/mixins/ConfirmDialogMixin.ts index fedc35416..b0f9889a8 100644 --- a/src/components/mixins/ConfirmDialogMixin.ts +++ b/src/components/mixins/ConfirmDialogMixin.ts @@ -1,22 +1,23 @@ import { Component, Mixins } from 'vue-property-decorator'; import TranslationMixin from '@/components/mixins/TranslationMixin'; +import { state } from '@/store/decorators'; @Component export default class ConfirmDialogMixin extends Mixins(TranslationMixin) { - showConfirmDialog = false; + @state.wallet.transactions.isConfirmTxDialogDisabled public isConfirmTxDisabled!: boolean; + + confirmDialogVisibility = false; openConfirmDialog(): void { - this.showConfirmDialog = true; + this.confirmDialogVisibility = true; } - async handleConfirmDialog(func: AsyncFnWithoutArgs): Promise { - try { - await func(); - this.showConfirmDialog = false; - } catch (error: any) { - console.error(error); - this.$alert(this.t(error.message), { title: this.t('errorText') }); + confirmOrExecute(signTxMethod: FnWithoutArgs | AsyncFnWithoutArgs): void { + if (this.isConfirmTxDisabled) { + signTxMethod(); + } else { + this.openConfirmDialog(); } } } diff --git a/src/components/mixins/TranslationMixin.ts b/src/components/mixins/TranslationMixin.ts index a3c98646d..13b981b91 100644 --- a/src/components/mixins/TranslationMixin.ts +++ b/src/components/mixins/TranslationMixin.ts @@ -1,7 +1,7 @@ -import { mixins, WALLET_CONSTS } from '@soramitsu/soraneo-wallet-web'; +import { mixins } from '@soramitsu/soraneo-wallet-web'; import { Component, Mixins } from 'vue-property-decorator'; -import { app } from '@/consts'; +import { TranslationConsts } from '@/consts'; import { state } from '@/store/decorators'; const OrdinalRules = { @@ -20,27 +20,6 @@ const OrdinalRules = { }, } as const; -const TranslationConsts = { - // extending consts - ...WALLET_CONSTS.TranslationConsts, - AppName: app.name, - Ceres: 'Ceres', - APR: 'APR', // Annual percentage rate - APY: 'APY', - TVL: 'TVL', - EVM: 'EVM', - Substrate: 'Substrate', - Kusama: 'Kusama', - ROI: 'ROI', // Return of investment - mbps: 'mbps', - online: 'Online', - offline: 'Offline', - XCM: 'XCM', - Max: 'Max.', - XOR: 'XOR', - VAL: 'VAL', -} as const; - @Component export default class TranslationMixin extends Mixins(mixins.TranslationMixin) { @state.settings.language language!: string; diff --git a/src/components/pages/AddLiquidity/Confirm.vue b/src/components/pages/AddLiquidity/Confirm.vue index 2c7c17957..f8474e045 100644 --- a/src/components/pages/AddLiquidity/Confirm.vue +++ b/src/components/pages/AddLiquidity/Confirm.vue @@ -37,6 +37,7 @@