Skip to content

Commit 1767eed

Browse files
committed
feat: marketplace on ramp default values
1 parent 0209af0 commit 1767eed

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

src/Packages/Marketplace/Runtime/LinkFactory.cs

+19-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4+
using UnityEngine;
45

56
namespace Immutable.Marketplace
67
{
@@ -35,10 +36,24 @@ public static string GenerateOnRampLink(
3536
var queryParamsDictionary = new Dictionary<string, string>
3637
{
3738
{ "apiKey", apiKey },
38-
{ "cryptoCurrencyList", queryParams.CryptoCurrencyList },
39-
{ "defaultCryptoCurrency", queryParams.DefaultCryptoCurrency },
40-
{ "defaultFiatAmount", queryParams.DefaultFiatAmount },
41-
{ "defaultFiatCurrency", queryParams.DefaultFiatCurrency },
39+
{
40+
"cryptoCurrencyList",
41+
string.IsNullOrEmpty(queryParams.CryptoCurrencyList)
42+
? "imx,eth,usdc"
43+
: queryParams.CryptoCurrencyList
44+
},
45+
{
46+
"defaultCryptoCurrency",
47+
string.IsNullOrEmpty(queryParams.DefaultCryptoCurrency) ? "IMX" : queryParams.DefaultCryptoCurrency
48+
},
49+
{
50+
"defaultFiatAmount",
51+
string.IsNullOrEmpty(queryParams.DefaultFiatAmount) ? "50" : queryParams.DefaultFiatAmount
52+
},
53+
{
54+
"defaultFiatCurrency",
55+
string.IsNullOrEmpty(queryParams.DefaultFiatCurrency) ? "USD" : queryParams.DefaultFiatCurrency
56+
},
4257
{
4358
"defaultPaymentMethod",
4459
extraQueryParams != null &&

0 commit comments

Comments
 (0)