Compare commits
8 Commits
v1.4.4-rc.
...
self-pin-r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe5772fb3b
|
||
|
|
82d0e588c9
|
||
| 89d3d19d77 | |||
|
|
817b523135 | ||
| e0e3d9b6cf | |||
|
|
2cabae1e74
|
||
|
|
f949b83a51
|
||
|
|
d586c41cca
|
@@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libgdbm-dev \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN git clone https://git.defalsify.org/vise.git go-vise
|
||||
RUN git clone https://github.com/nolash/go-vise go-vise
|
||||
COPY . ./sarafu-vise
|
||||
|
||||
WORKDIR /build/sarafu-vise/services/registration
|
||||
|
||||
@@ -79,11 +79,12 @@ func main() {
|
||||
pfp := path.Join(scriptDir, "pp.csv")
|
||||
|
||||
cfg := engine.Config{
|
||||
Root: "root",
|
||||
OutputSize: uint32(size),
|
||||
FlagCount: uint32(128),
|
||||
MenuSeparator: menuSeparator,
|
||||
Root: "root",
|
||||
OutputSize: uint32(size),
|
||||
FlagCount: uint32(128),
|
||||
MenuSeparator: menuSeparator,
|
||||
ResetOnEmptyInput: true,
|
||||
ResetRoot: true, // clear the cache once a user quits
|
||||
}
|
||||
|
||||
if engineDebug {
|
||||
|
||||
@@ -94,11 +94,12 @@ func main() {
|
||||
pfp := path.Join(scriptDir, "pp.csv")
|
||||
|
||||
cfg := engine.Config{
|
||||
Root: "root",
|
||||
OutputSize: uint32(size),
|
||||
FlagCount: uint32(128),
|
||||
MenuSeparator: menuSeparator,
|
||||
Root: "root",
|
||||
OutputSize: uint32(size),
|
||||
FlagCount: uint32(128),
|
||||
MenuSeparator: menuSeparator,
|
||||
ResetOnEmptyInput: true,
|
||||
ResetRoot: true, // clear the cache once a user quits
|
||||
}
|
||||
|
||||
if engineDebug {
|
||||
|
||||
@@ -82,6 +82,7 @@ func main() {
|
||||
MenuSeparator: menuSeparator,
|
||||
EngineDebug: engineDebug,
|
||||
ResetOnEmptyInput: true,
|
||||
ResetRoot: true, // clear the cache once a user quits
|
||||
}
|
||||
|
||||
menuStorageService := storage.NewMenuStorageService(conns)
|
||||
|
||||
@@ -21,6 +21,7 @@ func (h *MenuHandlers) Authorize(ctx context.Context, sym string, input []byte)
|
||||
flag_incorrect_pin, _ := h.flagManager.GetFlag("flag_incorrect_pin")
|
||||
flag_account_authorized, _ := h.flagManager.GetFlag("flag_account_authorized")
|
||||
flag_allow_update, _ := h.flagManager.GetFlag("flag_allow_update")
|
||||
flag_account_pin_reset, _ := h.flagManager.GetFlag("flag_account_pin_reset")
|
||||
|
||||
pinInput := string(input)
|
||||
|
||||
@@ -33,7 +34,9 @@ func (h *MenuHandlers) Authorize(ctx context.Context, sym string, input []byte)
|
||||
AccountPin, err := store.ReadEntry(ctx, sessionId, storedb.DATA_ACCOUNT_PIN)
|
||||
if err != nil {
|
||||
logg.ErrorCtxf(ctx, "failed to read AccountPin entry with", "key", storedb.DATA_ACCOUNT_PIN, "error", err)
|
||||
return res, err
|
||||
logg.InfoCtxf(ctx, "Setting the flag_account_pin_reset flag for the user to set their own PIN")
|
||||
res.FlagSet = append(res.FlagSet, flag_account_pin_reset)
|
||||
return res, nil
|
||||
}
|
||||
|
||||
// verify that the user provided the correct PIN
|
||||
|
||||
@@ -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.",
|
||||
|
||||
@@ -7,6 +7,7 @@ MOUT back 0
|
||||
MOUT quit 9
|
||||
HALT
|
||||
RELOAD authorize_account
|
||||
CATCH self_reset_pin flag_account_pin_reset 1
|
||||
CATCH incorrect_pin flag_incorrect_pin 1
|
||||
INCMP _ 0
|
||||
INCMP quit 9
|
||||
|
||||
@@ -7,6 +7,7 @@ MOUT quit 9
|
||||
HALT
|
||||
LOAD authorize_account 6
|
||||
RELOAD authorize_account
|
||||
CATCH self_reset_pin flag_account_pin_reset 1
|
||||
CATCH incorrect_pin flag_incorrect_pin 1
|
||||
INCMP _ 0
|
||||
INCMP quit 9
|
||||
|
||||
@@ -6,6 +6,7 @@ MOUT quit 9
|
||||
HALT
|
||||
LOAD authorize_account 6
|
||||
RELOAD authorize_account
|
||||
CATCH self_reset_pin flag_account_pin_reset 1
|
||||
CATCH incorrect_pin flag_incorrect_pin 1
|
||||
INCMP _ 0
|
||||
INCMP quit 9
|
||||
|
||||
@@ -6,6 +6,7 @@ MOUT quit 9
|
||||
LOAD authorize_account 6
|
||||
HALT
|
||||
RELOAD authorize_account
|
||||
CATCH self_reset_pin flag_account_pin_reset 1
|
||||
CATCH incorrect_pin flag_incorrect_pin 1
|
||||
INCMP _ 0
|
||||
INCMP quit 9
|
||||
|
||||
@@ -9,6 +9,7 @@ MOUT quit 9
|
||||
LOAD authorize_account 6
|
||||
HALT
|
||||
RELOAD authorize_account
|
||||
CATCH self_reset_pin flag_account_pin_reset 1
|
||||
CATCH incorrect_pin flag_incorrect_pin 1
|
||||
INCMP _ 0
|
||||
INCMP quit 9
|
||||
|
||||
@@ -7,6 +7,7 @@ MOUT quit 9
|
||||
LOAD authorize_account 6
|
||||
HALT
|
||||
RELOAD authorize_account
|
||||
CATCH self_reset_pin flag_account_pin_reset 1
|
||||
CATCH incorrect_pin flag_incorrect_pin 1
|
||||
INCMP _ 0
|
||||
INCMP quit 9
|
||||
|
||||
@@ -4,6 +4,7 @@ MOUT quit 9
|
||||
LOAD authorize_account 6
|
||||
HALT
|
||||
RELOAD authorize_account
|
||||
CATCH self_reset_pin flag_account_pin_reset 1
|
||||
CATCH incorrect_pin flag_incorrect_pin 1
|
||||
INCMP _ 0
|
||||
INCMP quit 9
|
||||
|
||||
@@ -4,6 +4,7 @@ MOUT quit 9
|
||||
LOAD authorize_account 6
|
||||
HALT
|
||||
RELOAD authorize_account
|
||||
CATCH self_reset_pin flag_account_pin_reset 1
|
||||
CATCH incorrect_pin flag_incorrect_pin 1
|
||||
INCMP _ 0
|
||||
INCMP quit 9
|
||||
|
||||
Reference in New Issue
Block a user