You could look into the following to incoporate that feature
https://wow.gamepedia.com/TRADE_ACCEPT_UPDATE
https://wow.gamepedia.com/TRADE_SHOW
https://wow.gamepedia.com/API_GetUnitName
Of course if the other trade person targetted you first then it may not return a true value unless you make a point of targetting them yourself before completing the trade.
However, this event may help you identify when someone has requested trade with you with arg1 being the result of the string format ERR_TRADE_REQUEST_S where the first word is the other player's name.
The same event with arg1 being the result of the string format ERR_INITIATE_TRADE_S with the last value the players name will handle you trading with them.
https://wow.gamepedia.com/CHAT_MSG_SYSTEM
https://www.townlong-yak.com/framexm...balStrings.lua
It all depends on what is the important element to the functionality. And may take a little play about with those functions to find the best combination of code to make it work.