The newbie who created the original version of this code which you are using a copy of, gave up trying to steal other people's money since they never found a reused r a very long time ago. This is why the code was never updated to include the SegWit transaction related stuff!!