Skip to content

Commit

Permalink
chore: conditions for seprate btc payments
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhart1o1 committed Feb 9, 2024
1 parent acd288c commit 554ba04
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions apps/dashboard/cypress/e2e/batch-payments/batch-payments.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,13 @@ describe("Batch payments test", () => {
cy.loginAndGetToken(testData.PHONE, testData.CODE).then((token) => {
const authToken = token
cy.getTransactions(authToken, 4).then((transactions) => {
const btcTransactions = transactions.filter(
(transaction) => transaction.settlementCurrency === "BTC",
)

btcWalletExpectedTransactions.forEach((expectedBtcTransaction) => {
const found = btcTransactions.some(
const found = transactions.some(
(transaction) =>
transaction.settlementCurrency ===
expectedBtcTransaction.settlementCurrency &&
transaction.settlementCurrency === expectedBtcTransaction.settlementCurrency &&
transaction.status === expectedBtcTransaction.status &&
(expectedBtcTransaction.settlementDisplayAmount
? transaction.settlementDisplayAmount ===
expectedBtcTransaction.settlementDisplayAmount
: true),
(expectedBtcTransaction.settlementDisplayAmount === undefined || transaction.settlementDisplayAmount === expectedBtcTransaction.settlementDisplayAmount) &&
(expectedBtcTransaction.settlementAmount === undefined || transaction.settlementAmount === expectedBtcTransaction.settlementAmount)
)
expect(found).to.be.true
})
Expand Down

0 comments on commit 554ba04

Please sign in to comment.