Merge wallettools changes