Compare commits
No commits in common. "7883063e5365baf89d59a80baee2f6bb9993bbca" and "95b9a6e48632941da862bf4a58964299231c7680" have entirely different histories.
7883063e53
...
95b9a6e486
@ -1970,7 +1970,6 @@ func (h *MenuHandlers) SetDefaultVoucher(ctx context.Context, sym string, input
|
|||||||
}
|
}
|
||||||
|
|
||||||
flag_no_active_voucher, _ := h.flagManager.GetFlag("flag_no_active_voucher")
|
flag_no_active_voucher, _ := h.flagManager.GetFlag("flag_no_active_voucher")
|
||||||
flag_api_error, _ := h.flagManager.GetFlag("flag_api_call_error")
|
|
||||||
|
|
||||||
// check if the user has an active sym
|
// check if the user has an active sym
|
||||||
_, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_ACTIVE_SYM)
|
_, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_ACTIVE_SYM)
|
||||||
@ -1985,10 +1984,9 @@ func (h *MenuHandlers) SetDefaultVoucher(ctx context.Context, sym string, input
|
|||||||
// Fetch vouchers from the API using the public key
|
// Fetch vouchers from the API using the public key
|
||||||
vouchersResp, err := h.accountService.FetchVouchers(ctx, string(publicKey))
|
vouchersResp, err := h.accountService.FetchVouchers(ctx, string(publicKey))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
res.FlagSet = append(res.FlagSet, flag_api_error)
|
res.FlagSet = append(res.FlagSet, flag_no_active_voucher)
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
res.FlagReset = append(res.FlagReset, flag_api_error)
|
|
||||||
|
|
||||||
// Return if there is no voucher
|
// Return if there is no voucher
|
||||||
if len(vouchersResp) == 0 {
|
if len(vouchersResp) == 0 {
|
||||||
@ -2248,7 +2246,6 @@ func (h *MenuHandlers) GetVoucherDetails(ctx context.Context, sym string, input
|
|||||||
res.FlagSet = append(res.FlagSet, flag_api_error)
|
res.FlagSet = append(res.FlagSet, flag_api_error)
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
res.FlagReset = append(res.FlagReset, flag_api_error)
|
|
||||||
|
|
||||||
res.Content = fmt.Sprintf(
|
res.Content = fmt.Sprintf(
|
||||||
"Name: %s\nSymbol: %s\nCommodity: %s\nLocation: %s", voucherData.TokenName, voucherData.TokenSymbol, voucherData.TokenCommodity, voucherData.TokenLocation,
|
"Name: %s\nSymbol: %s\nCommodity: %s\nLocation: %s", voucherData.TokenName, voucherData.TokenSymbol, voucherData.TokenCommodity, voucherData.TokenLocation,
|
||||||
@ -2282,7 +2279,6 @@ func (h *MenuHandlers) CheckTransactions(ctx context.Context, sym string, input
|
|||||||
logg.ErrorCtxf(ctx, "failed on FetchTransactions", "error", err)
|
logg.ErrorCtxf(ctx, "failed on FetchTransactions", "error", err)
|
||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
res.FlagReset = append(res.FlagReset, flag_api_error)
|
|
||||||
|
|
||||||
// Return if there are no transactions
|
// Return if there are no transactions
|
||||||
if len(transactionsResp) == 0 {
|
if len(transactionsResp) == 0 {
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
LOAD check_transactions 0
|
LOAD check_transactions 0
|
||||||
RELOAD check_transactions
|
RELOAD check_transactions
|
||||||
CATCH api_failure flag_api_call_error 1
|
|
||||||
CATCH no_transfers flag_no_transfers 1
|
CATCH no_transfers flag_no_transfers 1
|
||||||
LOAD authorize_account 6
|
LOAD authorize_account 6
|
||||||
MOUT back 0
|
MOUT back 0
|
||||||
|
|||||||
@ -2,7 +2,6 @@ LOAD clear_temporary_value 2
|
|||||||
RELOAD clear_temporary_value
|
RELOAD clear_temporary_value
|
||||||
LOAD set_default_voucher 8
|
LOAD set_default_voucher 8
|
||||||
RELOAD set_default_voucher
|
RELOAD set_default_voucher
|
||||||
CATCH api_failure flag_api_call_error 1
|
|
||||||
LOAD check_vouchers 10
|
LOAD check_vouchers 10
|
||||||
RELOAD check_vouchers
|
RELOAD check_vouchers
|
||||||
CATCH api_failure flag_api_call_error 1
|
CATCH api_failure flag_api_call_error 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user