Skip to content

Commit

Permalink
Fixed loggin of purchased domain price (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg-Pecheneg authored Feb 28, 2024
1 parent cb2c7fc commit a507fad
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -500,14 +500,15 @@ private extension PurchaseDomainsCheckoutView {
Task {
setLoading(true)
do {
let totalPrice = cartStatus.totalPrice
let walletsToMint = try await purchaseDomainsService.getSupportedWalletsToMint()
guard let walletToMint = walletsToMint.first(where: { $0.address == selectedWallet.address }) else {
throw PurchaseError.failedToGetWalletToMint
}

try await purchaseDomainsService.purchaseDomainsInTheCartAndMintTo(wallet: walletToMint)
purchaseDomainsPreferencesStorage.checkoutData.discountCode = ""
logAnalytic(event: .didPurchaseDomains, parameters: [.value : String(cartStatus.totalPrice),
logAnalytic(event: .didPurchaseDomains, parameters: [.value : String(totalPrice),
.count: String(1)])
let pendingPurchasedDomain = PendingPurchasedDomain(name: domain.name,
walletAddress: walletToMint.address)
Expand Down

0 comments on commit a507fad

Please sign in to comment.