Skip to content

Commit

Permalink
fix(payments): fix error when missing scheme
Browse files Browse the repository at this point in the history
For payments transactions t ype, we don't need to
fill the scheme as it will always be other.
  • Loading branch information
paul-nicolas committed Jan 29, 2024
1 parent cd821f7 commit d211b22
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ func createBatchElement(
Amount: big.NewInt(balanceTransaction.Source.Refund.Charge.Amount - balanceTransaction.Source.Refund.Charge.AmountRefunded),
InitialAmount: big.NewInt(balanceTransaction.Source.Refund.Charge.Amount),
Asset: currency.FormatAsset(supportedCurrenciesWithDecimal, transactionCurrency),
Scheme: models.PaymentSchemeOther,
RawData: rawData,
Scheme: models.PaymentScheme(balanceTransaction.Source.Refund.Charge.PaymentMethodDetails.Card.Brand),
CreatedAt: time.Unix(balanceTransaction.Source.Refund.Charge.Created, 0),
}

Expand Down Expand Up @@ -306,8 +306,8 @@ func createBatchElement(
Amount: big.NewInt(balanceTransaction.Source.Refund.Charge.Amount - balanceTransaction.Source.Refund.Charge.AmountRefunded),
InitialAmount: big.NewInt(balanceTransaction.Source.Refund.Charge.Amount),
Asset: currency.FormatAsset(supportedCurrenciesWithDecimal, transactionCurrency),
Scheme: models.PaymentSchemeOther,
RawData: rawData,
Scheme: models.PaymentScheme(balanceTransaction.Source.Refund.Charge.PaymentMethodDetails.Card.Brand),
CreatedAt: time.Unix(balanceTransaction.Source.Refund.Charge.Created, 0),
}

Expand Down

0 comments on commit d211b22

Please sign in to comment.