The Trade chat sorts by String instead of by (Type, Integer). This causes lower amounts of a certain good to be shown between higher amounts.
Current:
Wood 50
Wood 400
Wood 40
Wood 21
Wood 200
Wood 100
Should be:
Wood 400
Wood 200
Wood 100
Wood 50
Wood 40
Wood 21
And while you're at that part of the code could you make it retain the sorting order when the screen is refreshed?