Skip to content

Commit

Permalink
Removed currency required validator and default currency in code
Browse files Browse the repository at this point in the history
  • Loading branch information
gvidoou committed Sep 23, 2024
1 parent 4b54d22 commit f095bcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion template.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function getData(accessToken, developerToken) {
const phone = data.hashedPhoneNumber;
const value = data.conversionValue || eventData.value;

let conversionCurrencyCode = 'USD';
let conversionCurrencyCode = '';
if (data.conversionCurrencyCode) conversionCurrencyCode = data.conversionCurrencyCode;
else if (eventData.currencyCode) conversionCurrencyCode = eventData.currencyCode;
else if (eventData.currency) conversionCurrencyCode = eventData.currency;
Expand Down
7 changes: 1 addition & 6 deletions template.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,6 @@ ___TEMPLATE_PARAMETERS___
"name": "conversionCurrencyCode",
"displayName": "Currency Code",
"simpleValueType": true,
"valueValidators": [
{
"type": "NON_EMPTY"
}
],
"defaultValue": "USD"
},
{
Expand Down Expand Up @@ -539,7 +534,7 @@ function getData(accessToken, developerToken) {
const phone = data.hashedPhoneNumber;
const value = data.conversionValue || eventData.value;
let conversionCurrencyCode = 'USD';
let conversionCurrencyCode = '';
if (data.conversionCurrencyCode) conversionCurrencyCode = data.conversionCurrencyCode;
else if (eventData.currencyCode) conversionCurrencyCode = eventData.currencyCode;
else if (eventData.currency) conversionCurrencyCode = eventData.currency;
Expand Down

0 comments on commit f095bcc

Please sign in to comment.