mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 09:45:18 +00:00
changes for new toolchain
This commit is contained in:
parent
07c5f02639
commit
67780bb8b9
2 changed files with 7 additions and 4 deletions
|
@ -358,7 +358,7 @@ class ElectrumWindow(App):
|
||||||
sendIntent.setAction(Intent.ACTION_SEND)
|
sendIntent.setAction(Intent.ACTION_SEND)
|
||||||
sendIntent.setType("text/plain")
|
sendIntent.setType("text/plain")
|
||||||
sendIntent.putExtra(Intent.EXTRA_TEXT, JS(data))
|
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)
|
currentActivity = cast('android.app.Activity', PythonActivity.mActivity)
|
||||||
it = Intent.createChooser(sendIntent, cast('java.lang.CharSequence', JS(title)))
|
it = Intent.createChooser(sendIntent, cast('java.lang.CharSequence', JS(title)))
|
||||||
currentActivity.startActivity(it)
|
currentActivity.startActivity(it)
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import base64
|
import base64
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
import hmac
|
import hmac
|
||||||
|
|
||||||
|
@ -208,9 +209,11 @@ def i2o_ECPublicKey(pubkey, compressed=False):
|
||||||
############ functions from pywallet #####################
|
############ functions from pywallet #####################
|
||||||
|
|
||||||
def hash_160(public_key):
|
def hash_160(public_key):
|
||||||
#md = hashlib.new('ripemd')
|
if 'ANDROID_DATA' in os.environ:
|
||||||
from Crypto.Hash import RIPEMD
|
from Crypto.Hash import RIPEMD
|
||||||
md = RIPEMD.new()
|
md = RIPEMD.new()
|
||||||
|
else:
|
||||||
|
md = hashlib.new('ripemd')
|
||||||
md.update(sha256(public_key))
|
md.update(sha256(public_key))
|
||||||
return md.digest()
|
return md.digest()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue