mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-18 23:04:25 +01:00
try-catch potentially fallible mutiny_wallet calls
This commit is contained in:
@@ -208,7 +208,12 @@ export const Provider: ParentComponent = (props) => {
|
||||
setState({ dismissed_restore_prompt: true });
|
||||
},
|
||||
async listTags(): Promise<MutinyTagItem[]> {
|
||||
return state.mutiny_wallet?.get_tag_items() as MutinyTagItem[];
|
||||
try {
|
||||
return state.mutiny_wallet?.get_tag_items() as MutinyTagItem[];
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
return [];
|
||||
}
|
||||
},
|
||||
setNwc(enabled: boolean) {
|
||||
localStorage.setItem("nwc_enabled", enabled.toString());
|
||||
|
||||
Reference in New Issue
Block a user