Skip to content

Commit

Permalink
chore(multisig): Simplify error
Browse files Browse the repository at this point in the history
  • Loading branch information
WaDadidou committed Nov 19, 2024
1 parent 7a2dc38 commit 7666d91
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions packages/screens/Multisig/MultisigCreateScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ type CreateMultisigWalletFormType = {
const emptyPubKeyGroup = () => ({ address: "", compressedPubkey: "" });

export const MultisigCreateScreen = () => {
const { setToast } = useFeedbacks();
const selectedWallet = useSelectedWallet();
const authToken = useMultisigAuthToken(selectedWallet?.userId);
const { wrapWithFeedback } = useFeedbacks();
Expand Down Expand Up @@ -122,7 +121,7 @@ export const MultisigCreateScreen = () => {

try {
const res = await multisigClient.CreateOrJoinMultisig({
authToken,
authToken: { ...authToken, userAddress: "aeae" },
chainId: selectedNetwork.chainId,
bech32Prefix: selectedNetwork.addressPrefix,
multisigPubkeyJson: JSON.stringify(multisigPubkey),
Expand All @@ -133,15 +132,7 @@ export const MultisigCreateScreen = () => {
id: getUserId(selectedNetwork?.id, res.multisigAddress),
});
} catch (err) {
console.error("Failed to create multisig", err);
const message = err instanceof Error ? err.message : "";
setToast({
type: "error",
mode: "normal",
title: "Failed to create multisig",
message,
});
throw new Error("Failed to create multisig: " + message);
throw new Error(`Failed to create multisig: ${err}`);
} finally {
setLoading(false);
}
Expand Down

0 comments on commit 7666d91

Please sign in to comment.