Skip to content

Commit

Permalink
fix index address
Browse files Browse the repository at this point in the history
  • Loading branch information
starknetdev committed Sep 5, 2024
1 parent fddf9e7 commit 727bb27
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ui/src/app/lib/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ export function formatXP(xp: number): string {
}

export function indexAddress(address: string) {
const newHex =
address.substring(0, 2) + address.substring(3).replace(/^0+/, "");
return newHex;
return address.replace(/^0x0+/, "0x");
}

export function padAddress(address: string) {
Expand Down

0 comments on commit 727bb27

Please sign in to comment.