Commit 9d38754c authored by Will Cory's avatar Will Cory

fix(atst): Default chainId to undefined instead of 10

parent 0e83a2f8
...@@ -10,7 +10,7 @@ export const prepareWriteAttestation = async ( ...@@ -10,7 +10,7 @@ export const prepareWriteAttestation = async (
about: Address, about: Address,
key: string, key: string,
value: string | WagmiBytes | number | boolean, value: string | WagmiBytes | number | boolean,
chainId = 10, chainId: number | undefined = undefined,
contractAddress: Address = ATTESTATION_STATION_ADDRESS contractAddress: Address = ATTESTATION_STATION_ADDRESS
) => { ) => {
let formattedKey: WagmiBytes let formattedKey: WagmiBytes
......
...@@ -14,7 +14,7 @@ type Attestation = { ...@@ -14,7 +14,7 @@ type Attestation = {
export const prepareWriteAttestations = async ( export const prepareWriteAttestations = async (
attestations: Attestation[], attestations: Attestation[],
chainId = 10, chainId: number | undefined = undefined,
contractAddress: Address = ATTESTATION_STATION_ADDRESS contractAddress: Address = ATTESTATION_STATION_ADDRESS
) => { ) => {
const formattedAttestations = attestations.map((attestation) => { const formattedAttestations = attestations.map((attestation) => {
...@@ -27,9 +27,7 @@ export const prepareWriteAttestations = async ( ...@@ -27,9 +27,7 @@ export const prepareWriteAttestations = async (
`key is longer than 32 bytes: ${attestation.key}. Try using a shorter key or using 'encodeRawKey' to encode the key into 32 bytes first` `key is longer than 32 bytes: ${attestation.key}. Try using a shorter key or using 'encodeRawKey' to encode the key into 32 bytes first`
) )
} }
const formattedValue = createValue( const formattedValue = createValue(attestation.value) as WagmiBytes
attestation.value
) as WagmiBytes
return { return {
about: attestation.about, about: attestation.about,
key: formattedKey, key: formattedKey,
......
...@@ -11,4 +11,5 @@ export interface AttestationReadParams { ...@@ -11,4 +11,5 @@ export interface AttestationReadParams {
key: string key: string
dataType?: DataTypeOption dataType?: DataTypeOption
contractAddress?: Address contractAddress?: Address
chainId?: number
} }
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