Skip to content

Commit

Permalink
Update src/helpers/muxedAccount.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Iveta <[email protected]>
  • Loading branch information
jeesunikim and quietbits authored Mar 26, 2024
1 parent 751cb99 commit 059fe00
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/helpers/muxedAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ export const muxedAccount = {
baseAddress: string;
muxedAccountId: string;
}): Partial<MuxedAccountFieldType> => {
let muxedAddress = "";
let error = "";

try {
const muxedAccount = new MuxedAccount(
new Account(baseAddress, "0"),
muxedAccountId,
);
return {
muxedAddress: muxedAccount.accountId(),
error: "",
};

muxedAddress = muxedAccount.accountId();
} catch (e: any) {
return {
muxedAddress: "",
error: `Something went wrong. ${e.toString()}`,
};
error = `Something went wrong. ${e.toString()}`;
}

return { muxedAddress, error }
},
parse: ({
muxedAddress,
Expand Down

0 comments on commit 059fe00

Please sign in to comment.