From 97d6b1e4265553fe74a1076beefca3f5acd6020f Mon Sep 17 00:00:00 2001 From: MayTekayaa <100131287+MayTekayaa@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:55:28 +0100 Subject: [PATCH] feat: Add hold token event for the EVM action - MEED-6663 - Meeds-io/MIPs#118 (#61) This change will fix the evm action when editing the minimum amount. --- .../components/EvmEventForm.vue | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/gamification-evm-webapp/src/main/webapp/vue-app/connectorEventExtensions/components/EvmEventForm.vue b/gamification-evm-webapp/src/main/webapp/vue-app/connectorEventExtensions/components/EvmEventForm.vue index 081b1e7..448b8b1 100644 --- a/gamification-evm-webapp/src/main/webapp/vue-app/connectorEventExtensions/components/EvmEventForm.vue +++ b/gamification-evm-webapp/src/main/webapp/vue-app/connectorEventExtensions/components/EvmEventForm.vue @@ -384,15 +384,29 @@ export default { minAmount: minAmount }; } else { - this.eventProperties = { - contractAddress: this.contractAddress, - blockchainNetwork: this.selected?.providerUrl, - networkId: this.selected?.networkId, - tokenName: this.erc20Token.name, - tokenSymbol: this.erc20Token.symbol, - tokenDecimals: this.erc20Token.decimals, - minAmount: minAmount - }; + if (this.properties?.duration && this.properties?.frequency) { + this.eventProperties = { + contractAddress: this.contractAddress, + blockchainNetwork: this.selected?.providerUrl, + networkId: this.selected?.networkId, + tokenName: this.erc20Token.name, + tokenSymbol: this.erc20Token.symbol, + tokenDecimals: this.erc20Token.decimals, + minAmount: minAmount, + duration: this.properties?.duration, + frequency: this.properties?.frequency + }; + } else { + this.eventProperties = { + contractAddress: this.contractAddress, + blockchainNetwork: this.selected?.providerUrl, + networkId: this.selected?.networkId, + tokenName: this.erc20Token.name, + tokenSymbol: this.erc20Token.symbol, + tokenDecimals: this.erc20Token.decimals, + minAmount: minAmount + }; + } } document.dispatchEvent(new CustomEvent('event-form-filled', {detail: this.eventProperties})); },