File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
pkg/code/server/grpc/transaction/v2 Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -36,10 +36,6 @@ import (
36
36
"github.com/code-payments/code-server/pkg/usdc"
37
37
)
38
38
39
- var (
40
- swapNotificationTimeByOwner = make (map [string ]time.Time )
41
- )
42
-
43
39
func (s * transactionServer ) Swap (streamer transactionpb.Transaction_SwapServer ) error {
44
40
ctx , cancel := context .WithTimeout (streamer .Context (), s .conf .swapTimeout .Get (streamer .Context ()))
45
41
defer cancel ()
@@ -493,15 +489,6 @@ func (s *transactionServer) validateSwap(
493
489
}
494
490
495
491
func (s * transactionServer ) bestEffortNotifyUserOfSwapInProgress (ctx context.Context , owner * common.Account ) error {
496
- // Avoid spamming users chat messages due to retries of the Swap RPC within
497
- // small periods of time. Implementation isn't perfect, but we'll be updating
498
- // notifications later anyways.
499
- lastNotificationTs , ok := swapNotificationTimeByOwner [owner .PublicKey ().ToBase58 ()]
500
- if ok && time .Since (lastNotificationTs ) < time .Minute {
501
- return nil
502
- }
503
- swapNotificationTimeByOwner [owner .PublicKey ().ToBase58 ()] = time .Now ()
504
-
505
492
chatId := chat_util .GetKinPurchasesChatId (owner )
506
493
507
494
// Inspect the chat history for a USDC deposited message. If that message
You can’t perform that action at this time.
0 commit comments