Skip to content

Commit

Permalink
UI kit: add addressesEqual() (#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpierre authored Nov 1, 2024
1 parent 8d40a65 commit 0b27965
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/uikit/src/eth-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ export const ADDRESS_RE = /^0x[0-9a-fA-F]{40}$/;
export function isAddress(address: unknown): address is Address {
return typeof address === "string" && ADDRESS_RE.test(address);
}

export function addressesEqual(a: Address, b: Address) {
return a.toLowerCase() === b.toLowerCase();
}

0 comments on commit 0b27965

Please sign in to comment.