Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Commit 1fd76a5

Browse files
committed
feat: fail to handle error notice
1 parent 7d04406 commit 1fd76a5

1 file changed

Lines changed: 20 additions & 15 deletions

File tree

src/pages/Mint.vue

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -268,23 +268,28 @@ const dialog = async () => {
268268
269269
const mint = async () => {
270270
isMinting.value = true;
271-
await window.unidata?.profiles.set(
272-
{
273-
source: 'Crossbell Profile',
274-
identity: store.state.settings.address!,
275-
platform: 'Ethereum',
276-
action: 'add',
277-
},
278-
{
279-
username: ruleForm.handle,
280-
...(ruleForm.avatar && { avatars: [ruleForm.avatar] }),
281-
...(ruleForm.name && { name: ruleForm.name }),
282-
...(ruleForm.bio && { bio: ruleForm.bio }),
283-
},
284-
);
271+
try {
272+
await window.unidata?.profiles.set(
273+
{
274+
source: 'Crossbell Profile',
275+
identity: store.state.settings.address!,
276+
platform: 'Ethereum',
277+
action: 'add',
278+
},
279+
{
280+
username: ruleForm.handle,
281+
...(ruleForm.avatar && { avatars: [ruleForm.avatar] }),
282+
...(ruleForm.name && { name: ruleForm.name }),
283+
...(ruleForm.bio && { bio: ruleForm.bio }),
284+
},
285+
);
286+
await next();
287+
} catch (e) {
288+
ElMessage.error('Failed to mint handle...');
289+
console.log(e);
290+
}
285291
286292
isMinting.value = false;
287-
await next();
288293
};
289294
290295
const claimENS = async (ens: Profile) => {

0 commit comments

Comments
 (0)