From f662930bba2e43bbaeb7b1faa9b3bab0908f913d Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Mon, 28 Oct 2024 19:44:56 +0700 Subject: [PATCH] Update main.go Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 9576b26..af1048a 100644 --- a/main.go +++ b/main.go @@ -327,7 +327,8 @@ func TransferFunds(sender types.Account, receiverAddress string, amount sdkmath. }, } - ctx := context.Background() + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) + defer cancel() maxRetries := 3 for attempt := 0; attempt < maxRetries; attempt++ {