Status Account::load() { // If the sync dir doesn't exist, create it: ABC_CHECK(syncEnsureRepo(dir(), login.lobby.dir() + "tmp/", login.syncKey())); ABC_CHECK(wallets.load()); return Status(); }
Status Wallet::loadSync() { ABC_CHECK(fileEnsureDir(gContext->paths.walletsDir())); ABC_CHECK(fileEnsureDir(dir())); ABC_CHECK(syncEnsureRepo(syncDir(), dir() + "tmp/", syncKey_)); // Load the currency: CurrencyJson currencyJson; currencyJson.load(syncDir() + WALLET_CURRENCY_FILENAME, dataKey()); ABC_CHECK(currencyJson.currencyOk()); currency_ = currencyJson.currency(); // Load the name (failure is acceptable): NameJson json; json.load(syncDir() + WALLET_NAME_FILENAME, dataKey()); name_ = json.name(); // Load the databases: ABC_CHECK(addresses.load()); ABC_CHECK(txs.load()); return Status(); }