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 (
3636 "github.com/code-payments/code-server/pkg/usdc"
3737)
3838
39- var (
40- swapNotificationTimeByOwner = make (map [string ]time.Time )
41- )
42-
4339func (s * transactionServer ) Swap (streamer transactionpb.Transaction_SwapServer ) error {
4440 ctx , cancel := context .WithTimeout (streamer .Context (), s .conf .swapTimeout .Get (streamer .Context ()))
4541 defer cancel ()
@@ -493,15 +489,6 @@ func (s *transactionServer) validateSwap(
493489}
494490
495491func (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-
505492 chatId := chat_util .GetKinPurchasesChatId (owner )
506493
507494 // Inspect the chat history for a USDC deposited message. If that message
You can’t perform that action at this time.
0 commit comments