Commit 07199e83 authored by Will Cory's avatar Will Cory

export stringifyAttestationBytes

parent c9ccd45d
...@@ -5,8 +5,11 @@ import { isAddress, isHexString, toUtf8Bytes } from 'ethers/lib/utils.js' ...@@ -5,8 +5,11 @@ import { isAddress, isHexString, toUtf8Bytes } from 'ethers/lib/utils.js'
import { WagmiBytes } from '../types/WagmiBytes' import { WagmiBytes } from '../types/WagmiBytes'
export const stringifyAttestationBytes = ( export const stringifyAttestationBytes = (
bytes: WagmiBytes | string | Address | number | boolean bytes: WagmiBytes | string | Address | number | boolean | BigNumber
) => { ) => {
if (BigNumber.isBigNumber(bytes)) {
return bytes.toHexString()
}
if (typeof bytes === 'number') { if (typeof bytes === 'number') {
return BigNumber.from(bytes).toHexString() return BigNumber.from(bytes).toHexString()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment