Skip to content

Account Error,encryptedPriKey address password not match #217

@lishuo5263

Description

@lishuo5263

when I use ontio java sdk I want transfer ont to another account,I fllow document ,here is my code:

try {
Transaction tx = ontSdkClient.nativevm().ont()
.makeTransfer(from, to, amount.longValue(), from, 20000, 500);
com.github.ontio.account.Account acct = ontSdkClient.getWalletMgr()
.getAccount(from, walletPwd);
ontSdkClient.signTx(tx, new com.github.ontio.account.Account[][]{{acct}});
ontSdkClient.getConnect().sendRawTransaction(tx.toHexString());
txId = tx.hash().toHexString();
} catch (Exception e) {
e.printStackTrace();
}

But when code executed .getAccount(from, walletPwd); I has something wrong, here is my log:

com.github.ontio.sdk.exception.SDKException: {"Desc":"Other Error,{"Desc":"Account Error,encryptedPriKey address password not match.","Error":51015}","Error":59000}

And I change the pom jar version ,whatever jar version I has same error,please help!!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions