RNGethModule.java 文件源码

java
阅读 36 收藏 0 点赞 0 评论 0

项目:react-native-geth 作者:
/**
 * Sets the default account at the given index in the listAccounts.
 *
 * @param accID   index in the listAccounts
 * @param promise Promise
 * @return Return true if sets.
 */
@ReactMethod
public void setAccount(Integer accID, Promise promise) {
    try {
        Account acc = GethHolder.getKeyStore().getAccounts().get(accID);
        GethHolder.setAccount(acc);
        //accounts.set(0, acc);
        promise.resolve(true);
    } catch (Exception e) {
        promise.reject(SET_ACCOUNT_ERROR, e);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号