Giter Site home page Giter Site logo

ethwallet's Issues

希望能加入转账功能

我想根据你这个钱包实现一个转账功能的钱包,目前不知道该如何着手,你会在后续加入吗。

怎么将私钥转换为助记词

请教一下怎么将私钥转换为助记词,有没有简洁的方法,比如传入一个私钥,返回助记词
现在代码不完善,有问题:以私钥方式导入的钱包,导出助记词时为空。

ModifyPassword

private boolean verifyPassword(String oldPwd, String newPwd, String newPwdAgain) { if (!TextUtils.equals(Md5Utils.md5(oldPwd), walletPwd)) { ToastUtils.showToast(R.string.modify_password_alert4); return false; } else if (TextUtils.equals(newPwd, newPwdAgain)) { // 判断有误 ToastUtils.showToast(R.string.modify_password_alert5); return false; } return true; }

// 内存溢出crash
WalletUtils.generateWalletFile(newPassword, keypair, destinationDirectory, true);

07-20 00:51:55.733 5416-5437/com.gongchuang.ethtoken W/System.err: io.reactivex.exceptions.UndeliverableException: java.lang.OutOfMemoryError: Failed to allocate a 1036 byte allocation with 4194304 free bytes and 29MB until OOM; failed due to fragmentation (required continguous free 16384 bytes for a new buffer where largest contiguous free 8192 bytes)
at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:349)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:69)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.OutOfMemoryError: Failed to allocate a 1036 byte allocation with 4194304 free bytes and 29MB until OOM; failed due to fragmentation (required continguous free 16384 bytes for a new buffer where largest contiguous free 8192 bytes)
at org.spongycastle.util.Arrays.clone(Arrays.java:602)
at org.spongycastle.crypto.generators.SCrypt.SMix(SCrypt.java:126)
at org.spongycastle.crypto.generators.SCrypt.MFcrypt(SCrypt.java:87)
07-20 00:51:55.734 5416-5437/com.gongchuang.ethtoken W/System.err: at org.spongycastle.crypto.generators.SCrypt.generate(SCrypt.java:66)
at org.web3j.crypto.Wallet.generateDerivedScryptKey(Wallet.java:136)
at org.web3j.crypto.Wallet.create(Wallet.java:74)
at org.web3j.crypto.Wallet.createStandard(Wallet.java:93)
at org.web3j.crypto.WalletUtils.generateWalletFile(WalletUtils.java:64)
at com.gongchuang.ethtoken.utils.ETHWalletUtils.modifyPassword(ETHWalletUtils.java:261)
at com.gongchuang.ethtoken.ui.presenter.WalletDetailPresenter$2.subscribe(WalletDetailPresenter.java:40)
at io.reactivex.internal.operators.observable.ObservableCreate.subscribeActual(ObservableCreate.java:40)
at io.reactivex.Observable.subscribe(Observable.java:10981)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:452)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.