From 5e9a4c400a421aa63bbb10542a031d4603e14996 Mon Sep 17 00:00:00 2001 From: violog <51th.apprent1ce.f0rce@gmail.com> Date: Thu, 20 Jun 2024 20:51:29 +0300 Subject: [PATCH] Don't do passport scan updates on withdrawal --- internal/service/handlers/withdraw.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/internal/service/handlers/withdraw.go b/internal/service/handlers/withdraw.go index 55f1df1..6883812 100644 --- a/internal/service/handlers/withdraw.go +++ b/internal/service/handlers/withdraw.go @@ -79,15 +79,6 @@ func Withdraw(w http.ResponseWriter, r *http.Request) { var withdrawal *data.Withdrawal err = EventsQ(r).Transaction(func() error { - // If user hasn't provided passport proof yet, do all the necessary updates to - // potentially reduce the number of proofs in UX - if balance.Country == nil { - if err = doPassportScanUpdates(r, *balance, countryCode, true); err != nil { - return fmt.Errorf("do passport scan updates: %w", err) - } - log.Debug("Successfully performed passport scan updates already") - } - err = BalancesQ(r).FilterByNullifier(nullifier).Update(map[string]any{ data.ColAmount: pg.AddToValue(data.ColAmount, -req.Data.Attributes.Amount), })