From a27007900877d8d847b7aeff5a7374f08142a3b6 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Mon, 23 Feb 2026 16:15:12 +0300 Subject: [PATCH] add a fix for when users input a value when no vouchers exist --- store/vouchers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/store/vouchers.go b/store/vouchers.go index dbdd326..8155e9b 100644 --- a/store/vouchers.go +++ b/store/vouchers.go @@ -159,6 +159,10 @@ func GetOrderedVoucherData(ctx context.Context, store DataStore, sessionId strin // MatchVoucher finds the matching voucher symbol, balance, decimals and contract address based on the input. func MatchVoucher(input, symbols, balances, decimals, addresses string) (symbol, balance, decimal, address string) { + // case for invalid input with no current symbols + if symbols == "" { + return + } symList := strings.Split(symbols, "\n") balList := strings.Split(balances, "\n") decList := strings.Split(decimals, "\n")