@@ -13,7 +13,7 @@ import {
1313import { LocalRelayer } from '../src/relayer/standard/local'
1414import { CAN_RUN_LIVE , RPC_URL } from './constants'
1515
16- const ERC20_IMPLICIT_MINT_CONTRACT = '0x041E0CDC028050519C8e6485B2d9840caf63773F'
16+ const ERC20_IMPLICIT_MINT_CONTRACT = Address . checksum ( '0x041E0CDC028050519C8e6485B2d9840caf63773F' )
1717
1818function randomAddress ( ) : Address . Checksummed {
1919 return Address . fromPublicKey ( Secp256k1 . getPublicKey ( { privateKey : Secp256k1 . randomPrivateKey ( ) } ) )
@@ -63,7 +63,7 @@ describe('Preconditions', () => {
6363 type : precondition . type ( ) ,
6464 chainId : chainId . toString ( ) ,
6565 data : JSON . stringify ( {
66- address : precondition . address . toString ( ) ,
66+ address : precondition . address ,
6767 min : precondition . min ?. toString ( ) ,
6868 max : precondition . max ?. toString ( ) ,
6969 } ) ,
@@ -94,8 +94,8 @@ describe('Preconditions', () => {
9494 type : precondition . type ( ) ,
9595 chainId : chainId . toString ( ) ,
9696 data : JSON . stringify ( {
97- address : precondition . address . toString ( ) ,
98- token : precondition . token . toString ( ) ,
97+ address : precondition . address ,
98+ token : precondition . token ,
9999 min : precondition . min ?. toString ( ) ,
100100 max : precondition . max ?. toString ( ) ,
101101 } ) ,
@@ -127,9 +127,9 @@ describe('Preconditions', () => {
127127 type : precondition . type ( ) ,
128128 chainId : chainId . toString ( ) ,
129129 data : JSON . stringify ( {
130- address : precondition . address . toString ( ) ,
131- token : precondition . token . toString ( ) ,
132- operator : precondition . operator . toString ( ) ,
130+ address : precondition . address ,
131+ token : precondition . token ,
132+ operator : precondition . operator ,
133133 min : precondition . min . toString ( ) ,
134134 } ) ,
135135 }
@@ -159,8 +159,8 @@ describe('Preconditions', () => {
159159 type : precondition . type ( ) ,
160160 chainId : chainId . toString ( ) ,
161161 data : JSON . stringify ( {
162- address : precondition . address . toString ( ) ,
163- token : precondition . token . toString ( ) ,
162+ address : precondition . address ,
163+ token : precondition . token ,
164164 tokenId : precondition . tokenId . toString ( ) ,
165165 owned : precondition . owned ,
166166 } ) ,
@@ -194,18 +194,16 @@ describe('Preconditions', () => {
194194 type : precondition . type ( ) ,
195195 chainId : chainId . toString ( ) ,
196196 data : JSON . stringify ( {
197- address : precondition . address . toString ( ) ,
198- token : precondition . token . toString ( ) ,
197+ address : precondition . address ,
198+ token : precondition . token ,
199199 tokenId : precondition . tokenId . toString ( ) ,
200- operator : precondition . operator . toString ( ) ,
200+ operator : precondition . operator ,
201201 } ) ,
202202 }
203203
204204 if ( ! CAN_RUN_LIVE ) {
205205 // Mock the getApproved call
206- ; ( provider as any ) . call . mockResolvedValue (
207- `0x000000000000000000000000${ operator . toString ( ) . slice ( 2 ) . toLowerCase ( ) } ` ,
208- )
206+ ; ( provider as any ) . call . mockResolvedValue ( `0x000000000000000000000000${ operator . slice ( 2 ) . toLowerCase ( ) } ` )
209207 }
210208
211209 const isValid = await relayer . checkPrecondition ( intentPrecondition )
@@ -229,8 +227,8 @@ describe('Preconditions', () => {
229227 type : precondition . type ( ) ,
230228 chainId : chainId . toString ( ) ,
231229 data : JSON . stringify ( {
232- address : precondition . address . toString ( ) ,
233- token : precondition . token . toString ( ) ,
230+ address : precondition . address ,
231+ token : precondition . token ,
234232 tokenId : precondition . tokenId . toString ( ) ,
235233 min : precondition . min ?. toString ( ) ,
236234 max : precondition . max ?. toString ( ) ,
@@ -264,10 +262,10 @@ describe('Preconditions', () => {
264262 type : precondition . type ( ) ,
265263 chainId : chainId . toString ( ) ,
266264 data : JSON . stringify ( {
267- address : precondition . address . toString ( ) ,
268- token : precondition . token . toString ( ) ,
265+ address : precondition . address ,
266+ token : precondition . token ,
269267 tokenId : precondition . tokenId . toString ( ) ,
270- operator : precondition . operator . toString ( ) ,
268+ operator : precondition . operator ,
271269 min : precondition . min . toString ( ) ,
272270 } ) ,
273271 }
0 commit comments