Skip to content

Commit

Permalink
Merge pull request #6 from stape-io/removing_currency_validator
Browse files Browse the repository at this point in the history
Removed currency required validator and default currency in code
  • Loading branch information
Bukashk0zzz authored Sep 24, 2024
2 parents 4b54d22 + 538c5a5 commit 27a72aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 2 additions & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
homepage: "https://stape.io/"
versions:
- sha: f095bcc583153092f8139f156b84f29e42eef257
changeNotes: Currency not required for now.
- sha: c9b96b1d4e750a9e3cf38cd2d84c5bc120b66b8a
changeNotes: Stape Microsoft Connection.
- sha: 99fc58a53bb02e4486518ec86f9abaef4279d09d
Expand Down
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 27a72aa

Please sign in to comment.