Skip to content

Commit

Permalink
Add error message tips
Browse files Browse the repository at this point in the history
Signed-off-by: rovast <rovast@163.com>
  • Loading branch information
rovast committed Sep 4, 2023
1 parent d278d4e commit 92ee281
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions src/components/IgntCrudCreate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,28 @@ const submitItem = async () => {
// auto fill device name value
cloneFormData["deviceName"] = route.params.name;
await (
client[
props.storeName as keyof Omit<
typeof client,
| "plugins"
| "env"
| "signer"
| "registry"
| "plugin"
| "signAndBroadcast"
| "useSigner"
| "useKeplr"
>
] as any
).tx[props.commandName]({
value: { ...cloneFormData, creator }
});
try {
await (
client[
props.storeName as keyof Omit<
typeof client,
| "plugins"
| "env"
| "signer"
| "registry"
| "plugin"
| "signAndBroadcast"
| "useSigner"
| "useKeplr"
>
] as any
).tx[props.commandName]({
value: { ...cloneFormData, creator }
});
} catch (e) {
window.alert(e.message);
}
emit("close");
};
</script>
Expand Down

0 comments on commit 92ee281

Please sign in to comment.