Skip to content

Commit

Permalink
feat: Allow to start even if wallet admin key is not ok - Meeds-io/me…
Browse files Browse the repository at this point in the history
…eds#1028

Add the possibility to bypass the wallet admin verification at startup.
  • Loading branch information
rdenarie committed Jul 18, 2023
1 parent c645e9a commit 40a5173
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ public class EthereumWalletTokenAdminService implements WalletTokenAdminService,

private long adminBlockchainNonceLastUpdate;

private boolean checkAdminKey = true;

private FutureCache<String, BigInteger, Object> tokenBalanceFutureCache = null;

private FutureCache<String, BigInteger, Object> etherBalanceFutureCache = null;
Expand Down Expand Up @@ -187,6 +189,7 @@ public void start() {
return;
}
this.adminPrivateKey = System.getProperty("exo.wallet.admin.privateKey", null);
this.checkAdminKey = !"false".equals(System.getProperty("exo.wallet.admin.checkAdminKey"));
this.configuredContractAddress = settings.getContractAddress();
this.websocketURL = getWebsocketURL();
this.networkId = getNetworkId();
Expand Down Expand Up @@ -515,7 +518,7 @@ public void initAdminWallet() {
Wallet adminWallet = getAccountService().getAdminWallet();
if (adminWallet == null || StringUtils.isBlank(adminWallet.getAddress())) {
createAdminWalletAsync();
} else {
} else if (this.checkAdminKey){
checkAdminWallet();
}
}
Expand Down

0 comments on commit 40a5173

Please sign in to comment.