Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare for v1.9.0 release with updated full-service #330

Merged
merged 3 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
contents: write
env:
# Pin full service binary version
FULL_SERVICE_VERSION: 'v2.8.0'
FULL_SERVICE_VERSION: 'v2.10.1'
# Apple codesigning certs
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mobilecoin-wallet",
"productName": "MobileCoin Wallet",
"version": "1.8.0",
"version": "1.9.0",
"description": "Desktop hot wallet for your MobileCoin needs.",
"main": "./main.prod.js",
"author": {
Expand Down
22 changes: 18 additions & 4 deletions app/pages/Auth/AuthPage.presenter/AuthPage.presenter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,27 @@ const useStyles = makeStyles((theme: Theme) => ({
}));

/* eslint-disable no-await-in-loop */
const untilFullServiceRuns = async () => {
const untilFullServiceRuns = async (enqueueSnackbar, closeSnackbar) => {
for (let i = 0; i < 25; i++) {
try {
await getAllAccounts();
return true;
} catch (e) {
await new Promise((resolve) => setTimeout(resolve, 1000));
const estr = errorToString(e);
// On certain upgrades, full-service has started, but won't respond to requests while it
// resyncs the wallet db from the ledger.
// keep the user informed of the progress, while waiting for
// full-service to be ready for normal operation.
if (estr.includes('Resync in progress')) {
i = 0;
// rightmost 14 characters of response from full-service is (%xx complete)
const msg = `Wallet DB being upgraded, please standby ${estr.slice(-14)}`;
holtzman marked this conversation as resolved.
Show resolved Hide resolved
const key = enqueueSnackbar(msg, { persist: true, variant: 'warning' });
await new Promise((resolve) => setTimeout(resolve, 30000));
closeSnackbar(key);
} else {
await new Promise((resolve) => setTimeout(resolve, 1000));
}
}
}

Expand All @@ -89,7 +103,7 @@ export const AuthPage: FC = (): JSX.Element => {
const [fullServiceIsRunning, setFullServiceIsRunning] = useState(false);
const [loading, setLoading] = useState(true);
const [accountIds, setAccountIds] = useState<string[]>([]);
const { enqueueSnackbar } = useSnackbar();
const { enqueueSnackbar, closeSnackbar } = useSnackbar();

const offlineStart = localStore.getOfflineStart();
useEffect(() => {
Expand Down Expand Up @@ -139,7 +153,7 @@ export const AuthPage: FC = (): JSX.Element => {
try {
await validatePassphrase(password, encryptedPassword);
await ipcRenderer.invoke('start-full-service', password, null, startInOfflineMode);
await untilFullServiceRuns();
await untilFullServiceRuns(enqueueSnackbar, closeSnackbar);
const accounts = await getAllAccounts();
setAccountIds(accounts.accountIds);
await unlockWallet(password, startInOfflineMode);
Expand Down
2 changes: 1 addition & 1 deletion full-service-bin/mainnet/start-full-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mkdir -p "${WALLET_DB_DIR}"

echo "Starting full-service with ${LEDGER_DB_DIR} and ${WALLET_DB_DIR} and ${WALLET_DB_FILE}"

RUST_LOG=debug,mc_connection=error,mc_ledger_sync=error ./full-service \
RUST_LOG=info,mc_connection=error,mc_ledger_sync=info ./full-service \
--ledger-db "${LEDGER_DB_DIR}" \
--wallet-db "${WALLET_DB_FILE}" \
--chain-id "main" \
Expand Down
2 changes: 1 addition & 1 deletion full-service-bin/testnet/start-full-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mkdir -p "${WALLET_DB_DIR}"

echo "Starting full-service with ${LEDGER_DB_DIR} and ${WALLET_DB_DIR} and ${WALLET_DB_FILE}"

RUST_LOG=debug,mc_connection=error,mc_ledger_sync=error ./full-service \
RUST_LOG=info,mc_connection=error,mc_ledger_sync=info ./full-service \
--ledger-db "${LEDGER_DB_DIR}" \
--wallet-db "${WALLET_DB_FILE}" \
--chain-id "test" \
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mobilecoin-wallet",
"productName": "MobileCoin Wallet",
"version": "1.8.0",
"version": "1.9.0",
"description": "Desktop hot wallet for your MobileCoin needs.",
"scripts": {
"build": "concurrently \"yarn build-main\" \"yarn build-renderer\"",
Expand Down
Loading