Import compare the owner not the active key, for compatibility with openledger
This commit is contained in:
parent
f6340de2e4
commit
37141d06cd
1 changed files with 6 additions and 5 deletions
|
@ -180,7 +180,8 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI
|
||||||
//TODO change the way to compare keys
|
//TODO change the way to compare keys
|
||||||
|
|
||||||
BrainKey bk = new BrainKey(importRequest.getMnemonic(), 0);
|
BrainKey bk = new BrainKey(importRequest.getMnemonic(), 0);
|
||||||
for(PublicKey activeKey : prop.active.getKeyAuthList()){
|
System.out.println(bk.getPublicAddress("BTS").toString());
|
||||||
|
for(PublicKey activeKey : prop.owner.getKeyAuthList()){
|
||||||
if((new Address(activeKey.getKey(),"BTS")).toString().equals(bk.getPublicAddress("BTS").toString())){
|
if((new Address(activeKey.getKey(),"BTS")).toString().equals(bk.getPublicAddress("BTS").toString())){
|
||||||
importRequest.setMnemonicIsCorrect(true);
|
importRequest.setMnemonicIsCorrect(true);
|
||||||
return;
|
return;
|
||||||
|
@ -245,7 +246,7 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI
|
||||||
//builder.setMemo(new Memo(fromUserAccount,toUserAccount,0,sendRequest.getMemo().getBytes()));
|
//builder.setMemo(new Memo(fromUserAccount,toUserAccount,0,sendRequest.getMemo().getBytes()));
|
||||||
//TODO memo
|
//TODO memo
|
||||||
}
|
}
|
||||||
ArrayList<BaseOperation> operationList = new ArrayList();
|
ArrayList<BaseOperation> operationList = new ArrayList<>();
|
||||||
operationList.add(builder.build());
|
operationList.add(builder.build());
|
||||||
|
|
||||||
ECKey privateKey = sendRequest.getSourceAccount().getActiveKey(sendRequest.getContext());
|
ECKey privateKey = sendRequest.getSourceAccount().getActiveKey(sendRequest.getContext());
|
||||||
|
@ -425,7 +426,7 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI
|
||||||
GrapheneApiGenerator.getAssetById(assets,assetRequest);
|
GrapheneApiGenerator.getAssetById(assets,assetRequest);
|
||||||
|
|
||||||
synchronized (SYNC){
|
synchronized (SYNC){
|
||||||
try {SYNC.wait(3000);} catch (InterruptedException ignore) {}
|
try {SYNC.wait(60000);} catch (InterruptedException ignore) {}
|
||||||
}
|
}
|
||||||
info = db.bitsharesAssetDao().getBitsharesAssetInfoById(transfer.getOperation().getAssetAmount().getAsset().getObjectId());
|
info = db.bitsharesAssetDao().getBitsharesAssetInfoById(transfer.getOperation().getAssetAmount().getAsset().getObjectId());
|
||||||
}
|
}
|
||||||
|
@ -485,7 +486,7 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI
|
||||||
* Class to retrieve the account id or the account name, if one of those is missing
|
* Class to retrieve the account id or the account name, if one of those is missing
|
||||||
*/
|
*/
|
||||||
private class AccountIdOrNameListener implements ApiRequestListener{
|
private class AccountIdOrNameListener implements ApiRequestListener{
|
||||||
Object SYNC;
|
final Object SYNC;
|
||||||
boolean ready = false;
|
boolean ready = false;
|
||||||
|
|
||||||
GrapheneAccount account;
|
GrapheneAccount account;
|
||||||
|
@ -531,7 +532,7 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI
|
||||||
*/
|
*/
|
||||||
TransactionDao transactionDao;
|
TransactionDao transactionDao;
|
||||||
|
|
||||||
public GetTransactionDate(CryptoCoinTransaction transaction, TransactionDao transactionDao) {
|
GetTransactionDate(CryptoCoinTransaction transaction, TransactionDao transactionDao) {
|
||||||
this.transaction = transaction;
|
this.transaction = transaction;
|
||||||
this.transactionDao = transactionDao;
|
this.transactionDao = transactionDao;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue