File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ import BtnBox from '@/popup/components/buttons/BtnBox.vue';
5858import AddIcon from ' @/icons/plus-circle.svg?vue-component' ;
5959import ImportIcon from ' @/icons/import-address-book.svg?vue-component' ;
6060import ExportIcon from ' @/icons/export-address-book.svg?vue-component' ;
61+ import { handleUnknownError } from ' @/utils' ;
6162
6263export default defineComponent ({
6364 components: {
@@ -81,11 +82,10 @@ export default defineComponent({
8182 const addr = aeAccounts .value ?.[0 ]?.address as ` ak_${string } ` ;
8283 if (! addr ) throw new Error (' No æternity account' );
8384 await syncAddressBook (JSON .stringify (addressBook .value ));
84- openDefaultModal ({ title: ' Address Book ' , msg: ' Synced to Superhero ID ' });
85+ openDefaultModal ({ title: ' Superhero ID ' , msg: ' Address Book Sync with SH ID completed ' });
8586 } catch (e ) {
86- openDefaultModal ({ title: ' Address Book' , msg: ' Sync failed' });
87- // eslint-disable-next-line no-console
88- console .error (e );
87+ openDefaultModal ({ title: ' Superhero ID' , msg: ' Sync failed' });
88+ handleUnknownError (e );
8989 } finally {
9090 isSyncing .value = false ;
9191 }
Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ import buyBackground from '@/image/dashboard/buy-ae.webp';
156156import chainNameBackground from ' @/image/dashboard/chain-name.webp' ;
157157import daeppBrowserBackground from ' @/image/dashboard/aepp-browser.webp' ;
158158import OpenTransferReceiveModalBtn from ' @/popup/components/OpenTransferReceiveModalBtn.vue' ;
159+ import { handleUnknownError } from ' @/utils' ;
159160// import BtnPill from '../components/buttons/BtnPill.vue';
160161
161162export default defineComponent ({
@@ -238,8 +239,7 @@ export default defineComponent({
238239 openDefaultModal ({ title: ' Contract' , msg: ` Deployed: ${ct } ` });
239240 } catch (e ) {
240241 openDefaultModal ({ title: ' Contract' , msg: ' Deploy failed' });
241- // eslint-disable-next-line no-console
242- console .error (e );
242+ handleUnknownError (e );
243243 }
244244 }
245245
@@ -249,9 +249,8 @@ export default defineComponent({
249249 const json = await loadAddressBook ();
250250 if (json ) addAddressBookEntriesFromJson (json );
251251 } catch (e ) {
252- openDefaultModal ({ title: ' Contract' , msg: ' Connection to Superhero ID contract failed' });
253- // eslint-disable-next-line no-console
254- console .error (e );
252+ openDefaultModal ({ title: ' Superhero ID' , msg: ' Connection to Superhero ID contract failed' });
253+ handleUnknownError (e );
255254 }
256255 }
257256
You can’t perform that action at this time.
0 commit comments