Skip to content

Commit f7d6199

Browse files
committed
refactor: on ramp params
1 parent c921da3 commit f7d6199

File tree

2 files changed

+7407
-12
lines changed

2 files changed

+7407
-12
lines changed

src/Packages/Marketplace/Runtime/OnRamp/OnRamp.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@ public OnRamp(string environment, string email, string address)
3939
}
4040

4141
/// <summary>
42-
/// Generates a link for the on-ramp flow.
42+
/// Generates a URL for the on-ramp flow.
4343
/// </summary>
44-
/// <param name="fiatCurrency">The fiat currency to be used (default is "USD").</param>
45-
/// <param name="defaultFiatAmount">The default amount of fiat currency (default is "50").</param>
46-
/// <param name="defaultCryptoCurrency">The default cryptocurrency (default is "IMX")..</param>
47-
/// <param name="defaultCryptoCurrencyList">A comma-separated list of available cryptocurrencies to purchase (default is "imx,eth,usdc").</param>
48-
/// <returns>An on-ramp URL</returns>
44+
/// <param name="fiatCurrency">The fiat currency to use (default: "USD").</param>
45+
/// <param name="fiatAmount">The amount of fiat currency to spend when purchasing cryptocurrency (default: "50").</param>
46+
/// <param name="cryptoCurrency">The cryptocurrency to purchase (default: "IMX").</param>
47+
/// <param name="cryptoCurrencyList">A comma-separated list of available cryptocurrencies for purchase (default: "imx,eth,usdc").</param>
48+
/// <returns>The generated on-ramp URL.</returns>
4949
public string GetLink(
5050
string fiatCurrency = "USD",
51-
string defaultFiatAmount = "50",
52-
string defaultCryptoCurrency = "IMX",
53-
string defaultCryptoCurrencyList = "imx,eth,usdc"
51+
string fiatAmount = "50",
52+
string cryptoCurrency = "IMX",
53+
string cryptoCurrencyList = "imx,eth,usdc"
5454
)
5555
{
5656
var baseUrl = BaseUrls[_environment];
@@ -65,14 +65,14 @@ public string GetLink(
6565
{"productsAvailed", "buy"},
6666
{"exchangeScreenTitle", "Buy"},
6767
{"themeColor", "0D0D0D"},
68-
{"defaultCryptoCurrency", defaultCryptoCurrency},
68+
{"defaultCryptoCurrency", cryptoCurrency},
6969
{"email", Uri.EscapeDataString(_email)},
7070
{"isAutoFillUserData", "true"},
7171
{"disableWalletAddressForm", "true"},
72-
{"defaultFiatAmount", defaultFiatAmount},
72+
{"defaultFiatAmount", fiatAmount},
7373
{"defaultFiatCurrency", fiatCurrency},
7474
{"walletAddress", _address},
75-
{"cryptoCurrencyList", defaultCryptoCurrencyList}
75+
{"cryptoCurrencyList", cryptoCurrencyList}
7676
};
7777

7878
var queryString = string.Join("&", queryParams.Select(kvp => $"{kvp.Key}={Uri.EscapeDataString(kvp.Value)}").ToArray());

0 commit comments

Comments
 (0)