Skip to content

Commit

Permalink
chore: update TestData (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-tbd authored Oct 11, 2024
1 parent 824cc4c commit 89bbc71
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions test/helpers/test_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,16 @@ class TestData {
static FeatureFlag getFeatureFlag(String name, String description) =>
FeatureFlag(name: name, description: description);

static Map<Pfi, List<Offering>> getOfferingsMap() => {
Pfi(did: pfiDid.uri): [getOffering()],
static Map<Pfi, List<Offering>> getOfferingsMap({
List<String>? payoutCurrencies,
}) =>
{
Pfi(did: pfiDid.uri):
(payoutCurrencies != null && payoutCurrencies.isNotEmpty)
? payoutCurrencies
.map((currency) => getOffering(payoutCurrency: currency))
.toList()
: [getOffering()],
};

static List<Pfi> getPfis() => [Pfi(did: pfiDid.uri)];
Expand All @@ -37,6 +45,7 @@ class TestData {
AccountBalance(total: '101', currencyCode: 'USD', balancesMap: {});

static Offering getOffering({
String? payoutCurrency,
PresentationDefinition? requiredClaims,
List<PayinMethod>? payinMethods,
List<PayoutMethod>? payoutMethods,
Expand All @@ -59,7 +68,7 @@ class TestData {
],
),
payout: PayoutDetails(
currencyCode: 'USD',
currencyCode: payoutCurrency ?? 'USD',
methods: payoutMethods ??
[
PayoutMethod(
Expand Down

0 comments on commit 89bbc71

Please sign in to comment.