tchanges for new toolchain - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 67780bb8b950d0fbb5679ce7a098db70295607a9 DIR parent 07c5f026394cf1f666a6f9b2bb4cd6b0daa53273 HTML Author: ThomasV <thomasv@electrum.org> Date: Thu, 16 Jun 2016 09:48:30 +0200 changes for new toolchain Diffstat: M gui/kivy/main_window.py | 2 +- M lib/bitcoin.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) --- DIR diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py t@@ -358,7 +358,7 @@ class ElectrumWindow(App): sendIntent.setAction(Intent.ACTION_SEND) sendIntent.setType("text/plain") sendIntent.putExtra(Intent.EXTRA_TEXT, JS(data)) - PythonActivity = autoclass('org.renpy.android.PythonActivity') + PythonActivity = autoclass('org.kivy.android.PythonActivity') currentActivity = cast('android.app.Activity', PythonActivity.mActivity) it = Intent.createChooser(sendIntent, cast('java.lang.CharSequence', JS(title))) currentActivity.startActivity(it) DIR diff --git a/lib/bitcoin.py b/lib/bitcoin.py t@@ -26,6 +26,7 @@ import hashlib import base64 +import os import re import hmac t@@ -208,9 +209,11 @@ def i2o_ECPublicKey(pubkey, compressed=False): ############ functions from pywallet ##################### def hash_160(public_key): - #md = hashlib.new('ripemd') - from Crypto.Hash import RIPEMD - md = RIPEMD.new() + if 'ANDROID_DATA' in os.environ: + from Crypto.Hash import RIPEMD + md = RIPEMD.new() + else: + md = hashlib.new('ripemd') md.update(sha256(public_key)) return md.digest()