add sleep for 1 second between requests
Some checks failed
release / docker (push) Has been cancelled
Some checks failed
release / docker (push) Has been cancelled
This commit is contained in:
parent
518baceee5
commit
d586c41cca
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"git.defalsify.org/vise.git/resource"
|
||||
"git.grassecon.net/grassrootseconomics/common/hex"
|
||||
@ -411,7 +412,10 @@ func (h *MenuHandlers) InitiateGetMpesa(ctx context.Context, sym string, input [
|
||||
return res, nil
|
||||
}
|
||||
|
||||
logg.InfoCtxf(ctx, "poolSwap", "swapTrackingId", poolSwap.TrackingId)
|
||||
logg.InfoCtxf(ctx, "mpesa poolSwap before transfer", "swapTrackingId", poolSwap.TrackingId)
|
||||
|
||||
// TODO: remove this temporary time delay and replace with a swap and send endpoint
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
finalKshStr, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_TEMPORARY_VALUE)
|
||||
if err != nil {
|
||||
|
||||
@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.defalsify.org/vise.git/db"
|
||||
"git.defalsify.org/vise.git/resource"
|
||||
@ -842,7 +843,10 @@ func (h *MenuHandlers) TransactionInitiateSwap(ctx context.Context, sym string,
|
||||
}
|
||||
|
||||
swapTrackingId := poolSwap.TrackingId
|
||||
logg.InfoCtxf(ctx, "poolSwap", "swapTrackingId", swapTrackingId)
|
||||
logg.InfoCtxf(ctx, "send poolSwap before transfer", "swapTrackingId", swapTrackingId)
|
||||
|
||||
// TODO: remove this temporary time delay and replace with a swap and send endpoint
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
// Initiate a send
|
||||
recipientPublicKey, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_RECIPIENT)
|
||||
@ -874,7 +878,7 @@ func (h *MenuHandlers) TransactionInitiateSwap(ctx context.Context, sym string,
|
||||
}
|
||||
|
||||
trackingId := tokenTransfer.TrackingId
|
||||
logg.InfoCtxf(ctx, "TokenTransfer", "trackingId", trackingId)
|
||||
logg.InfoCtxf(ctx, "send TokenTransfer after swap", "trackingId", trackingId)
|
||||
|
||||
res.Content = l.Get(
|
||||
"Your request has been sent. %s will receive %s %s from %s.",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user