Updated on 2026-08-14
This commit is contained in:
parent
0725a039b4
commit
deed5020b6
2 changed files with 9 additions and 6 deletions
|
|
@ -38,6 +38,8 @@ class TradeCryptoHelper {
|
|||
|
||||
private const val TRANSACTION_RECEIPT_PATH = "transaction_receipt?transactionId="
|
||||
|
||||
private const val BASE_CURRENCY_USD = "USD"
|
||||
|
||||
fun getUrl(
|
||||
action: Action,
|
||||
blockchain: Blockchain?,
|
||||
|
|
@ -56,6 +58,7 @@ class TradeCryptoHelper {
|
|||
baseUrl = BASE_URL_BUY
|
||||
originalQuery = API_KEY_PATH + apiKey.urlEncode() +
|
||||
CURRENCY_PATH + cryptoCurrencyName.urlEncode() +
|
||||
BASE_CURRENCY_PATH + BASE_CURRENCY_USD.urlEncode() +
|
||||
WALLET_ADDRESS_PATH + walletAddress.urlEncode() +
|
||||
REDIRECT_URL_PATH + REDIRECT_URL_BUY.urlEncode()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,12 +58,12 @@ class TradeCryptoMiddleware {
|
|||
}
|
||||
|
||||
val url = TradeCryptoHelper.getUrl(
|
||||
exchangeAction,
|
||||
currency?.blockchain,
|
||||
currencySymbol,
|
||||
defaultAddress,
|
||||
config.moonPayApiKey,
|
||||
config.moonPayApiSecretKey
|
||||
action = exchangeAction,
|
||||
blockchain = currency?.blockchain,
|
||||
cryptoCurrencyName = currencySymbol,
|
||||
walletAddress = defaultAddress,
|
||||
apiKey = config.moonPayApiKey,
|
||||
secretKey = config.moonPayApiSecretKey
|
||||
)
|
||||
Timber.d("Moonpay $exchangeAction URL: $url")
|
||||
store.dispatchOnMain(NavigationAction.OpenUrl(url))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue