Skip to content

Commit

Permalink
Merge branch 'master' into status-buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
justinenerio authored Dec 16, 2024
2 parents 966295e + 7b792aa commit 67f6ebf
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import '../../tokens/token.dart';
typedef OnRampOrder = ({
String id,
DateTime created,
CryptoAmount submittedAmount,
Amount submittedAmount,
CryptoAmount? receiveAmount,
RampPartner partner,
OnRampOrderStatus status,
Expand Down Expand Up @@ -222,15 +222,22 @@ class OnRampOrderService implements Disposable {
) as FiatAmount,
);

final submittedAmount = row.partner == RampPartner.brij
? FiatAmount(
value: row.amount,
fiatCurrency: currencyFromString(row.fiatSymbol ?? 'USD'),
)
: CryptoAmount(
value: row.amount,
cryptoCurrency: CryptoCurrency(
token: token ?? Token.unk,
),
);

return (
id: row.id,
created: row.created,
submittedAmount: CryptoAmount(
value: row.amount,
cryptoCurrency: CryptoCurrency(
token: token ?? Token.unk,
),
),
submittedAmount: submittedAmount,
receiveAmount: row.receiveAmount?.let(
(amount) => CryptoAmount(
value: amount,
Expand Down

0 comments on commit 67f6ebf

Please sign in to comment.