Skip to content

Commit

Permalink
fix: Switch to using null address
Browse files Browse the repository at this point in the history
  • Loading branch information
richtera committed Dec 7, 2024
1 parent 5f0bd2c commit 447af37
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/up-provider/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,5 @@ export * from './popup'
export const isEmptyAccount = (value: `0x${string}` | undefined) => !value
export const EMPTY_ACCOUNT = '0x0000000000000000000000000000000000000000'
export const cleanupAccounts = (values: Array<`0x${string}` | undefined>): `0x${string}`[] => {
const list = []
for (const value of values) {
if (isEmptyAccount(value)) {
break
}
list.push(value)
}
return list as `0x${string}`[]
return values?.map(value => (isEmptyAccount(value) ? EMPTY_ACCOUNT : value)) || []
}

0 comments on commit 447af37

Please sign in to comment.