Added name to account seed
This commit is contained in:
parent
93e71887a8
commit
0ebc6adfe2
1 changed files with 30 additions and 0 deletions
|
@ -90,6 +90,11 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI
|
||||||
long idAccount = db.cryptoNetAccountDao().insertCryptoNetAccount(fetch)[0];
|
long idAccount = db.cryptoNetAccountDao().insertCryptoNetAccount(fetch)[0];
|
||||||
fetch.setId(idAccount);
|
fetch.setId(idAccount);
|
||||||
db.grapheneAccountInfoDao().insertGrapheneAccountInfo(new GrapheneAccountInfo(fetch));
|
db.grapheneAccountInfoDao().insertGrapheneAccountInfo(new GrapheneAccountInfo(fetch));
|
||||||
|
AccountSeed seed = db.accountSeedDao().findById(grapheneAccount.getSeedId());
|
||||||
|
if(seed.getName() == null || seed.getName().isEmpty()){
|
||||||
|
seed.setName(grapheneAccount.getName());
|
||||||
|
db.accountSeedDao().insertAccountSeed(seed);
|
||||||
|
}
|
||||||
subscribeBitsharesAccount(fetch.getId(),fetch.getAccountId(),context);
|
subscribeBitsharesAccount(fetch.getId(),fetch.getAccountId(),context);
|
||||||
request.success(fetch);
|
request.success(fetch);
|
||||||
}
|
}
|
||||||
|
@ -130,6 +135,11 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI
|
||||||
long[] idAccount = db.cryptoNetAccountDao().insertCryptoNetAccount(grapheneAccount);
|
long[] idAccount = db.cryptoNetAccountDao().insertCryptoNetAccount(grapheneAccount);
|
||||||
grapheneAccount.setId(idAccount[0]);
|
grapheneAccount.setId(idAccount[0]);
|
||||||
db.grapheneAccountInfoDao().insertGrapheneAccountInfo(new GrapheneAccountInfo(grapheneAccount));
|
db.grapheneAccountInfoDao().insertGrapheneAccountInfo(new GrapheneAccountInfo(grapheneAccount));
|
||||||
|
AccountSeed seed = db.accountSeedDao().findById(grapheneAccount.getSeedId());
|
||||||
|
if(seed.getName() == null || seed.getName().isEmpty()){
|
||||||
|
seed.setName(grapheneAccount.getName());
|
||||||
|
db.accountSeedDao().insertAccountSeed(seed);
|
||||||
|
}
|
||||||
subscribeBitsharesAccount(grapheneAccount.getId(),grapheneAccount.getAccountId(),context);
|
subscribeBitsharesAccount(grapheneAccount.getId(),grapheneAccount.getAccountId(),context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,6 +159,11 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI
|
||||||
long idAccount = db.cryptoNetAccountDao().insertCryptoNetAccount(grapheneAccount)[0];
|
long idAccount = db.cryptoNetAccountDao().insertCryptoNetAccount(grapheneAccount)[0];
|
||||||
grapheneAccount.setId(idAccount);
|
grapheneAccount.setId(idAccount);
|
||||||
db.grapheneAccountInfoDao().insertGrapheneAccountInfo(new GrapheneAccountInfo(grapheneAccount));
|
db.grapheneAccountInfoDao().insertGrapheneAccountInfo(new GrapheneAccountInfo(grapheneAccount));
|
||||||
|
AccountSeed seed = db.accountSeedDao().findById(grapheneAccount.getSeedId());
|
||||||
|
if(seed.getName() == null || seed.getName().isEmpty()){
|
||||||
|
seed.setName(grapheneAccount.getName());
|
||||||
|
db.accountSeedDao().insertAccountSeed(seed);
|
||||||
|
}
|
||||||
subscribeBitsharesAccount(grapheneAccount.getId(),grapheneAccount.getAccountId(),context);
|
subscribeBitsharesAccount(grapheneAccount.getId(),grapheneAccount.getAccountId(),context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +177,11 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI
|
||||||
long idAccount = db.cryptoNetAccountDao().insertCryptoNetAccount(grapheneAccount)[0];
|
long idAccount = db.cryptoNetAccountDao().insertCryptoNetAccount(grapheneAccount)[0];
|
||||||
grapheneAccount.setId(idAccount);
|
grapheneAccount.setId(idAccount);
|
||||||
db.grapheneAccountInfoDao().insertGrapheneAccountInfo(new GrapheneAccountInfo(grapheneAccount));
|
db.grapheneAccountInfoDao().insertGrapheneAccountInfo(new GrapheneAccountInfo(grapheneAccount));
|
||||||
|
AccountSeed seed = db.accountSeedDao().findById(grapheneAccount.getSeedId());
|
||||||
|
if(seed.getName() == null || seed.getName().isEmpty()){
|
||||||
|
seed.setName(grapheneAccount.getName());
|
||||||
|
db.accountSeedDao().insertAccountSeed(seed);
|
||||||
|
}
|
||||||
subscribeBitsharesAccount(grapheneAccount.getId(), grapheneAccount.getAccountId(), context);
|
subscribeBitsharesAccount(grapheneAccount.getId(), grapheneAccount.getAccountId(), context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,6 +202,11 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI
|
||||||
info.setAccountId(fetch.getAccountId());
|
info.setAccountId(fetch.getAccountId());
|
||||||
grapheneAccount.setAccountId(fetch.getAccountId());
|
grapheneAccount.setAccountId(fetch.getAccountId());
|
||||||
db.grapheneAccountInfoDao().insertGrapheneAccountInfo(info);
|
db.grapheneAccountInfoDao().insertGrapheneAccountInfo(info);
|
||||||
|
AccountSeed seed = db.accountSeedDao().findById(grapheneAccount.getSeedId());
|
||||||
|
if(seed.getName() == null || seed.getName().isEmpty()){
|
||||||
|
seed.setName(grapheneAccount.getName());
|
||||||
|
db.accountSeedDao().insertAccountSeed(seed);
|
||||||
|
}
|
||||||
subscribeBitsharesAccount(grapheneAccount.getId(),grapheneAccount.getAccountId(),context);
|
subscribeBitsharesAccount(grapheneAccount.getId(),grapheneAccount.getAccountId(),context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,6 +237,11 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
|
AccountSeed seed = db.accountSeedDao().findById(grapheneAccount.getSeedId());
|
||||||
|
if(seed.getName() == null || seed.getName().isEmpty()){
|
||||||
|
seed.setName(grapheneAccount.getName());
|
||||||
|
db.accountSeedDao().insertAccountSeed(seed);
|
||||||
|
}
|
||||||
subscribeBitsharesAccount(grapheneAccount.getId(),grapheneAccount.getAccountId(),context);
|
subscribeBitsharesAccount(grapheneAccount.getId(),grapheneAccount.getAccountId(),context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue