Skip to content

Commit

Permalink
feat(payments-plugin): unused helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvdbrug committed Feb 29, 2024
1 parent db75544 commit 3aecc7b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
11 changes: 0 additions & 11 deletions packages/payments-plugin/src/mollie/mollie.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,6 @@ export function toAmount(value: number, orderCurrency: string): Amount {
};
}

/**
* Checks if the Vendure order amount due is the same as the given Mollie amount.
* E.g. does '1000 EUR' equal { value: '10.00', currency: 'EUR'}?
*/
export function isAmountEqual(orderCurrency: CurrencyCode, amountDue: number, mollieAmount: Amount): boolean {
if (orderCurrency !== mollieAmount.currency) {
return false;
}
return amountToCents(mollieAmount) === amountDue;
}

/**
* Return to number of cents. E.g. '10.00' => 1000
*/
Expand Down
1 change: 0 additions & 1 deletion packages/payments-plugin/src/mollie/mollie.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import {
amountToCents,
areOrderLinesEqual,
getLocale,
isAmountEqual,
toAmount,
toMollieAddress,
toMollieOrderLines,
Expand Down

0 comments on commit 3aecc7b

Please sign in to comment.