Remove duplication and handle errors from the asset transfer smart contract Signed-off-by: James Taylor <jamest@uk.ibm.com>