Skip to content

Commit

Permalink
fix gen address osmosis from bech32 when orai addr undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
haunv3 committed Sep 13, 2024
1 parent 13a5985 commit 5c6948e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/page/bridge/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { fromBech32, toBech32 } from "@cosmjs/encoding";
import { Environment } from "@/constants/ton";

export const getAddressCosmos = (addr, prefix = "osmo") => {
if (!addr) throw "Address not found";
if (!addr) return undefined;
const { data } = fromBech32(addr);
const cosmosAddress = toBech32(prefix, data);
return cosmosAddress;
Expand Down

0 comments on commit 5c6948e

Please sign in to comment.