Use the default vouchersResp
This commit is contained in:
parent
1bc2ef94e9
commit
40c8cfa874
@ -1956,22 +1956,22 @@ 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 {
|
||||||
// fmt.Println("setting the flag_no_active_voucher")
|
fmt.Println("setting the flag_no_active_voucher")
|
||||||
// res.FlagSet = append(res.FlagSet, flag_no_active_voucher)
|
res.FlagSet = append(res.FlagSet, flag_no_active_voucher)
|
||||||
// return res, nil
|
return res, nil
|
||||||
// }
|
|
||||||
|
|
||||||
vouchersResp := []dataserviceapi.TokenHoldings{
|
|
||||||
{
|
|
||||||
ContractAddress: "0xcB453B742Bc8BE1BAa03Ce1927e287788d0aF065",
|
|
||||||
TokenSymbol: "PES",
|
|
||||||
TokenDecimals: "6",
|
|
||||||
Balance: "10000000",
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// vouchersResp := []dataserviceapi.TokenHoldings{
|
||||||
|
// {
|
||||||
|
// ContractAddress: "0xcB453B742Bc8BE1BAa03Ce1927e287788d0aF065",
|
||||||
|
// TokenSymbol: "PES",
|
||||||
|
// TokenDecimals: "6",
|
||||||
|
// Balance: "10000000",
|
||||||
|
// },
|
||||||
|
// }
|
||||||
|
|
||||||
fmt.Println("fetched user vouchers in SetDefaultVoucher", "public_key", string(publicKey), "vouchers", vouchersResp)
|
fmt.Println("fetched user vouchers in SetDefaultVoucher", "public_key", string(publicKey), "vouchers", vouchersResp)
|
||||||
|
|
||||||
// Return if there is no voucher
|
// Return if there is no voucher
|
||||||
@ -2050,20 +2050,20 @@ func (h *MenuHandlers) CheckVouchers(ctx context.Context, sym string, input []by
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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 {
|
||||||
// return res, nil
|
return res, nil
|
||||||
// }
|
|
||||||
|
|
||||||
vouchersResp := []dataserviceapi.TokenHoldings{
|
|
||||||
{
|
|
||||||
ContractAddress: "0xcB453B742Bc8BE1BAa03Ce1927e287788d0aF065",
|
|
||||||
TokenSymbol: "PES",
|
|
||||||
TokenDecimals: "6",
|
|
||||||
Balance: "10000000",
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// vouchersResp := []dataserviceapi.TokenHoldings{
|
||||||
|
// {
|
||||||
|
// ContractAddress: "0xcB453B742Bc8BE1BAa03Ce1927e287788d0aF065",
|
||||||
|
// TokenSymbol: "PES",
|
||||||
|
// TokenDecimals: "6",
|
||||||
|
// Balance: "10000000",
|
||||||
|
// },
|
||||||
|
// }
|
||||||
|
|
||||||
fmt.Println("fetched user vouchers", "public_key", string(publicKey), "vouchers", vouchersResp)
|
fmt.Println("fetched user vouchers", "public_key", string(publicKey), "vouchers", vouchersResp)
|
||||||
|
|
||||||
// check the current active sym and update the data
|
// check the current active sym and update the data
|
||||||
|
Loading…
Reference in New Issue
Block a user