This function performs the following:
Validates the balance of the client's account
Sets the token allowance
Wraps ETH (when necessary)
Tracks transactions performed in this process
Due its extensive functionality this function provides, we recommend you see it in action.
sdk.validate(tx)