Skip to content

Commit

Permalink
fix m2 tests (#11)
Browse files Browse the repository at this point in the history
Signed-off-by: Ruben <rubdeivis@gmail.com>
  • Loading branch information
rubenguc authored May 15, 2023
1 parent 557bf17 commit af9646a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/Extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export default class Extension {
await CacheAuth.cachePassword();
await AccountManager.saveBackup(recoveryPhrase);
} catch (error) {
console.error(error);
throw new Error(error as string);
}
}
Expand Down Expand Up @@ -132,7 +131,6 @@ export default class Extension {
if (!accounts) return false;
return AccountManager.areAccountsInitialized(accounts);
} catch (error) {
console.error(error);
return false;
}
}
Expand Down Expand Up @@ -217,7 +215,10 @@ export default class Extension {
return settings.getAll(SettingType.ADVANCED);
}

static async getSetting(type: SettingType, key: SettingKey): Promise<Setting | undefined> {
static async getSetting(
type: SettingType,
key: SettingKey
): Promise<Setting | undefined> {
const settings = await Settings.get<Settings>();
if (!settings) throw new Error("failed_to_get_settings");
return settings.get(type, key);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/settings/General.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const General = () => {
data-testid="language-select"
className="text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 bg-gray-700 border-gray-600 placeholder-gray-400 text-white"
onChange={(e) => saveLanguage(e.target.value)}
value={selectedLanguage}
value={selectedLanguage || ""}
>
{setting.isLanguageArray() &&
(setting.value as Language[]).map((option, index) => (
Expand Down Expand Up @@ -159,7 +159,7 @@ export const General = () => {
<div className="flex items-center">
<Switch
data-testid="show-testnets-switch"
checked={showTestnets}
checked={showTestnets || false}
onChange={changeShowTestnets}
className={`${
showTestnets
Expand Down

0 comments on commit af9646a

Please sign in to comment.