voucher-data #138
@ -77,10 +77,7 @@ func MatchVoucher(input, symbols, balances, decimals, addresses string) (symbol,
|
||||
|
||||
for i, sym := range symList {
|
||||
parts := strings.SplitN(sym, ":", 2)
|
||||
if len(parts) != 2 {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Alfred-mk marked this conversation as resolved
Outdated
|
||||
if input == parts[0] || strings.EqualFold(input, parts[1]) {
|
||||
symbol = parts[1]
|
||||
if i < len(balList) {
|
||||
|
Loading…
Reference in New Issue
Block a user
When will this condition occur?
It will only occur if the string is not well formatted in the "1:SRF" format, such as it being "1SRF" or "1 SRF"
Ideally, this will not be encountered but I added this as an edge case in the unlikely event that it does
but shouldnt that raise an error, as it should never happen?
On further assessment, I see it best to remove the code as the condition would never occur.
The data being matched comes from the db, and for this condition to occur means an issue lies with the functions that process and store the data