From eed64ff17351ead09cff893ac76e3cb69b262005 Mon Sep 17 00:00:00 2001 From: donnyquixotic Date: Wed, 9 Aug 2023 21:48:18 -0500 Subject: [PATCH 001/268] fix: check available ram, update notification --- src/i18n/en-us/index.js | 1 + src/pages/native/balance/DepositEVM.vue | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/i18n/en-us/index.js b/src/i18n/en-us/index.js index 4378d6c5f..0b2055afe 100644 --- a/src/i18n/en-us/index.js +++ b/src/i18n/en-us/index.js @@ -215,6 +215,7 @@ export default { add: 'Add', buying_resources: 'Buying Resources', resources_bought: 'Resources bought', + insufficient_ram: 'You have insufficient RAM to complete this transaction, please select "Resource Management" from the menu to view available resources', }, login: { connect_wallet: 'Connect Wallet', diff --git a/src/pages/native/balance/DepositEVM.vue b/src/pages/native/balance/DepositEVM.vue index f9f264222..95aa32f54 100644 --- a/src/pages/native/balance/DepositEVM.vue +++ b/src/pages/native/balance/DepositEVM.vue @@ -87,6 +87,13 @@ export default { } }, async generateAddress(){ + debugger; + const accountInfo = await this.$store.$api.getAccount(this.accountName); + + if (accountInfo.ram_quota - accountInfo.ram_usage <= 1000){ // If account (often newly created account) does not have sufficient RAM, notify user + this.$errorNotification(this.$t('resources.insufficient_ram')); + return; + } const actions = []; if (!this.evmAddress) { actions.push({ @@ -169,7 +176,7 @@ export default { }, }, watch: { - showDepositEVMDlg() { + async showDepositEVMDlg() { if (this.showDlg) { this.$emit('addEvmNetwork'); }; From 5a10ffaf749971411d4e80c6d4ab7ef8c8e3e83a Mon Sep 17 00:00:00 2001 From: donnyquixotic Date: Wed, 9 Aug 2023 21:48:47 -0500 Subject: [PATCH 002/268] refactor: remove debugger --- src/pages/native/balance/DepositEVM.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/native/balance/DepositEVM.vue b/src/pages/native/balance/DepositEVM.vue index 95aa32f54..6877ab17f 100644 --- a/src/pages/native/balance/DepositEVM.vue +++ b/src/pages/native/balance/DepositEVM.vue @@ -87,7 +87,6 @@ export default { } }, async generateAddress(){ - debugger; const accountInfo = await this.$store.$api.getAccount(this.accountName); if (accountInfo.ram_quota - accountInfo.ram_usage <= 1000){ // If account (often newly created account) does not have sufficient RAM, notify user From a73710c01760238b06c4ef4d710a3f9f49f0c193 Mon Sep 17 00:00:00 2001 From: Viterbo Date: Thu, 17 Aug 2023 16:00:26 -0300 Subject: [PATCH 003/268] WIP --- src/components/evm/AppNav.vue | 1 - src/i18n/en-us/index.js | 7 + src/pages/evm/staking/StakingPage.vue | 22 ++- src/pages/evm/staking/StakingPageHeader.vue | 149 ++++++++++++++++++++ src/router/routes.js | 10 +- 5 files changed, 169 insertions(+), 20 deletions(-) create mode 100644 src/pages/evm/staking/StakingPageHeader.vue diff --git a/src/components/evm/AppNav.vue b/src/components/evm/AppNav.vue index 479ff74ce..a8b47a003 100644 --- a/src/components/evm/AppNav.vue +++ b/src/components/evm/AppNav.vue @@ -261,7 +261,6 @@ export default defineComponent({