@@ -13,7 +13,7 @@ import {
13
13
import { LocalRelayer } from '../src/relayer/standard/local'
14
14
import { CAN_RUN_LIVE , RPC_URL } from './constants'
15
15
16
- const ERC20_IMPLICIT_MINT_CONTRACT = '0x041E0CDC028050519C8e6485B2d9840caf63773F'
16
+ const ERC20_IMPLICIT_MINT_CONTRACT = Address . checksum ( '0x041E0CDC028050519C8e6485B2d9840caf63773F' )
17
17
18
18
function randomAddress ( ) : Address . Checksummed {
19
19
return Address . fromPublicKey ( Secp256k1 . getPublicKey ( { privateKey : Secp256k1 . randomPrivateKey ( ) } ) )
@@ -63,7 +63,7 @@ describe('Preconditions', () => {
63
63
type : precondition . type ( ) ,
64
64
chainId : chainId . toString ( ) ,
65
65
data : JSON . stringify ( {
66
- address : precondition . address . toString ( ) ,
66
+ address : precondition . address ,
67
67
min : precondition . min ?. toString ( ) ,
68
68
max : precondition . max ?. toString ( ) ,
69
69
} ) ,
@@ -94,8 +94,8 @@ describe('Preconditions', () => {
94
94
type : precondition . type ( ) ,
95
95
chainId : chainId . toString ( ) ,
96
96
data : JSON . stringify ( {
97
- address : precondition . address . toString ( ) ,
98
- token : precondition . token . toString ( ) ,
97
+ address : precondition . address ,
98
+ token : precondition . token ,
99
99
min : precondition . min ?. toString ( ) ,
100
100
max : precondition . max ?. toString ( ) ,
101
101
} ) ,
@@ -127,9 +127,9 @@ describe('Preconditions', () => {
127
127
type : precondition . type ( ) ,
128
128
chainId : chainId . toString ( ) ,
129
129
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 ,
133
133
min : precondition . min . toString ( ) ,
134
134
} ) ,
135
135
}
@@ -159,8 +159,8 @@ describe('Preconditions', () => {
159
159
type : precondition . type ( ) ,
160
160
chainId : chainId . toString ( ) ,
161
161
data : JSON . stringify ( {
162
- address : precondition . address . toString ( ) ,
163
- token : precondition . token . toString ( ) ,
162
+ address : precondition . address ,
163
+ token : precondition . token ,
164
164
tokenId : precondition . tokenId . toString ( ) ,
165
165
owned : precondition . owned ,
166
166
} ) ,
@@ -194,18 +194,16 @@ describe('Preconditions', () => {
194
194
type : precondition . type ( ) ,
195
195
chainId : chainId . toString ( ) ,
196
196
data : JSON . stringify ( {
197
- address : precondition . address . toString ( ) ,
198
- token : precondition . token . toString ( ) ,
197
+ address : precondition . address ,
198
+ token : precondition . token ,
199
199
tokenId : precondition . tokenId . toString ( ) ,
200
- operator : precondition . operator . toString ( ) ,
200
+ operator : precondition . operator ,
201
201
} ) ,
202
202
}
203
203
204
204
if ( ! CAN_RUN_LIVE ) {
205
205
// 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 ( ) } ` )
209
207
}
210
208
211
209
const isValid = await relayer . checkPrecondition ( intentPrecondition )
@@ -229,8 +227,8 @@ describe('Preconditions', () => {
229
227
type : precondition . type ( ) ,
230
228
chainId : chainId . toString ( ) ,
231
229
data : JSON . stringify ( {
232
- address : precondition . address . toString ( ) ,
233
- token : precondition . token . toString ( ) ,
230
+ address : precondition . address ,
231
+ token : precondition . token ,
234
232
tokenId : precondition . tokenId . toString ( ) ,
235
233
min : precondition . min ?. toString ( ) ,
236
234
max : precondition . max ?. toString ( ) ,
@@ -264,10 +262,10 @@ describe('Preconditions', () => {
264
262
type : precondition . type ( ) ,
265
263
chainId : chainId . toString ( ) ,
266
264
data : JSON . stringify ( {
267
- address : precondition . address . toString ( ) ,
268
- token : precondition . token . toString ( ) ,
265
+ address : precondition . address ,
266
+ token : precondition . token ,
269
267
tokenId : precondition . tokenId . toString ( ) ,
270
- operator : precondition . operator . toString ( ) ,
268
+ operator : precondition . operator ,
271
269
min : precondition . min . toString ( ) ,
272
270
} ) ,
273
271
}
0 commit comments