-
Notifications
You must be signed in to change notification settings - Fork 308
/
fixtures.ts
67 lines (65 loc) · 1.37 KB
/
fixtures.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import nock from 'nock'
export const mockGraphQL = (): nock.Scope =>
nock('https://api.studio.thegraph.com', {
encodedQueryParams: true,
})
.persist()
.post('/query/72419/enzyme-core/version/latest')
.reply(
200,
() => ({
data: {
kilnStakingPositions: [
{
id: '0x1214fc85de7549ab363619ca01f2097ae040fe89',
validators: [
{
id: '0x8060ea0c0731fb559bfe0e6c801bc1b01ea94ba38ae7d7b9e2b53acc216fcc9210bb2d690dd31097a7832121d2e44093',
},
],
},
],
},
}),
[
'Content-Type',
'application/json',
'Connection',
'close',
'Vary',
'Accept-Encoding',
'Vary',
'Origin',
],
)
.persist()
export const mockEthBalance = (): nock.Scope =>
nock('http://fake-eth-balance-adapter-url', {
encodedQueryParams: true,
})
.persist()
.post('/')
.reply(
200,
() => ({
data: {
result: [
{
address: 'A',
balance: 100,
},
],
},
}),
[
'Content-Type',
'application/json',
'Connection',
'close',
'Vary',
'Accept-Encoding',
'Vary',
'Origin',
],
)
.persist()